Install and Setup NodeBB with Redis and Nginx on Ubuntu 12.04

In the next publish we’ll present you methods to install and configure NodeBB on an Ubuntu VPS. NodeBB is a contemporary and open-supply Forum Software powered by Node.js . It is a strong dialogue platform providing one-click on plugin install, social community connectivity and responsive design.



Login to your server utilizing SSH

ssh [email protected]

Update the system and install all the required packages.

~ # ❯❯❯ sudo apt-get -y update && apt-get -y upgrade
~ # ❯❯❯ sudo apt-get -y install python-software program-properties git imagemagick sed supervisor

Install the newest model of Nodejs

~ # ❯❯❯ sudo add-apt-repository ppa:chris-lea/node.js
~ # ❯❯❯ sudo apt-get update && sudo apt-get install nodejs

Install the the newest model of Redis

~ # ❯❯❯ sudo add-apt-repository -y ppa:rwky/redis
~ # ❯❯❯ sudo apt-get update && sudo apt-get install -y redis-server

Pull down the newest NodeBB code

~ # ❯❯❯ mkdir ~/myNodebbApp && cd $_
~ # ❯❯❯ git clone . # don't forget the dot on the finish

Configure NodeBB

Install all NodeBB’s dependencies

 # ❯❯❯ sudo npm install

Type the next, whereas within the NodeBB root directory:

~ # ❯❯❯ node app --setup=' 
    "base_url": "",
    "admin:username": "adminUsername", 
    "admin:password": "adminPassword", 
    "admin:password:affirm": "adminPassword",
    "admin:e mail": "[email protected]"

Using Nginx as a proxy for NodeBB

Install and Configure the the newest model of Nginx

~ # ❯❯❯ sudo add-apt-repository -y ppa:nginx/secure
~ # ❯❯❯ sudo apt-get update
~ # ❯❯❯ sudo apt-get install -y nginx

Set the worker_processes to the variety of processors in your system. To discover out the variety of processors in your system and set the worker_processes, run the next command:

~ # ❯❯❯ sudo sed -i "zero,/^worker_processes/ s/^worker_processes .*$/worker_processes `grep -c processor /proc/cpuinfo`;/"  /etc/nginx/nginx.conf

Create a brand new nginx digital host

~ # ❯❯❯ sudo apt-get vim /etc/nginx/websites-obtainable/
    pay attention       eighty;
    location / 
        proxy_pass        http://localhost:4567/;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_redirect off;
        proxy_buffering   off;

        proxy_http_version B.M;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade"
~ # ❯❯❯ sudo ln -s /etc/nginx/websites-obtainable/ /etc/nginx/websites-enabled/
~ # ❯❯❯ sudo /etc/init.d/nginx restart

That’s it. Now open your browser and navigate to your area.

Leave a Reply