How to install NodeBB with Redis Database on CentOS 7?

NodeBB Forum Software is powered by Node.js and built on either a Redis or MongoDB database. It utilizes web sockets for instant interactions and real-time notifications. NodeBB has many modern features out of the box such as social network integration and streaming discussions, while still making sure to be compatible with older browsers.
                                                           

Features:

  • NodeBB is Mobile-First and allows you to create an awesome experience on any screen.
  • Built-in localization support with over 50 languages actively translated.
  • You can enhance your rankings with human-readable URLs, semantic HTML with embedded microdata, and more.
  • Your Analytics Dashboard has the real-time tools to show what content your users enjoy most.
  • Easy sharing of content to Facebook, Google, and Twitter bringing more visitors to your community.

Requirments

First of all, we need to install some third-party software which we are going to need during the installation:

yum install epel-release git nano ImageMagick
yum groupinstall 'Development Tools'

Install Node.JS and NPM

In this section, we are going to install the latest stable version of Node.JS which is “v8.9.4 LTS” at the time of writing. Add the official repository with the following command:

curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

Then execute the following command to install Node.JS and NPM:

yum install nodejs

Install Redis

You can also use “MongoDB” as your database, but we are recommending you to use Redis because of its stability and simpleness.
We highly recommend you to check out the following article in order to install the latest version of Redis from source.

https://www.ucartz.com/clients/index.php?rp=/knowledgebase/279/How-to-install-Redis-4-on-Centos-6-or-7-Ubuntu-16-and-Debian-8-Updated.html

Also, you can use RHEL official package manager which provide you older version (3.6):

yum install redis

After installation you have to start and enable Redis service with the following command:

systemctl start redis
systemctl enable redis

Install NodeBB

At the time of writing this article, the latest stable version of NodeBB is 1.6.x so we are going to download it from the official Github repository:

cd /opt/
git clone -b v1.6.x https://github.com/NodeBB/NodeBB nodebb

Now you can execute the installer script for initial configurations:

cd nodebb
./nodebb setup

You will prompt for some configuration like below:

URL used to access this NodeBB (http://localhost:4567) ENTER

Please enter a NodeBB secret (42a724d8-5495-41cb-a4e8-caf3ed04c1a4) ENTER

Which database to use (mongo) redis

Now configuring redis database:
prompt: Host IP or address of your Redis instance: (127.0.0.1) ENTER

prompt: Host port of your Redis instance: (6379)  ENTER 

prompt: Password of your Redis database: ENTER

prompt: Which database to use (0..n):  (0) ENTER

After that, you can set a username and password for NodeBB Administrator.
Now you can start and stop your NodeBB with the following commands:

./nodebb start
./nodebb stop

Your application is running on:

http://YOUR_DOMAIN_OR_IP:4567

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)