HugeServer Knowledgebase

How to install NodeBB with Redis Database on CentOS 7

Introduction

NodeBB is an open-source and free forum software which allows you to engage and retain customers and keeping them up to date with your service or product. You can integrate NodeBB into your existing website and social media networks, so you can establish a close relationship with your customers and users. below are some of the NodeBB 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.

NodeBB Logo

Requirments

First of all, we need to install some third-party softwares 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.

How to install Redis 4 on Centos 6 / 7

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

 
For more information and news you can visit NodeBB official website!

Was this tutorial helpful?

Thank you for your vote.Thank you for your vote.

Similar Posts

One thought on “How to install NodeBB with Redis Database on CentOS 7”

Leave a Reply

Your email address will not be published. Required fields are marked *

*