LinuxTutorialsUbuntu

How To Install Review Board on Ubuntu 20.04 LTS

Install Review Board on Ubuntu 20.04

In this tutorial, we will show you how to install Review Board on Ubuntu 20.04 LTS. For those of you who didn’t know, Review Board is a free and open-source web-based software tool that is used to Review your developer’s code yet pre-commit and post-commit. It is written in Python and uses either SQLite, MySQL, MariaDB, or PostgreSQL to store its data. Review Board saves time because it allows you to review almost anything during a development lifecycle, including documentation, website designs, artwork, user interface mockups, release announcements, and feature specifications.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Review Board on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 20.04, and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Review Board on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade
sudo apt install libapache2-mod-wsgi
sudo apt install build-essential python-dev libffi-dev libssl-dev patch python-setuptools libjpeg-dev memcached libmysqlclient-dev

Step 2. Installing the LAMP stack.

A Ubuntu 20.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.

Step 3. Configuring MariaDB for Review Board.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next, we will need to log in to the MariaDB console and create a database for the Review Board. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Review Board installation:

CREATE DATABASE review_board_db;
CREATE USER 'reviewboarduser'@'localhost' IDENTIFIED BY 'your-strong-password';
GRANT ALL ON review_board_db.* TO 'reviewboarduser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 4. Installing Python Package.

Now we download and install additional modules and the Review Board application:

sudo curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
sudo python2 get-pip.py
sudo pip install -U pip

Next, install Setuptools using the following command below:

sudo pip install -U setuptools

Step 5. Installing Review Board on Ubuntu 20.04.

Now run the following command to install the Review Board web application:

sudo pip install -U ReviewBoard

After that, connect to the MySQL database you created earlier, install the MySQL client package:

sudo pip install mysqlclient

Step 5. Create a New Review Board Site.

To create your first site, run the command below and replace your-domain.com with your domain name:

sudo rb-site install /var/www/idroot.us

Output:

Domain Name: idroot.us
Root Path [/]: /
Database Type: 1
Database Name [reviewboard]: review_board_db
Database Server [localhost]: localhost
Database Username: reviewboarduser
Database Password: your-strong-passwd
Confirm Database Password: your-strong-passwd
Memcache Server [localhost:11211]: localhost:11211
Username [admin]: admin
Password: YOUR_ADMIN_PASS
Confirm Password: YOUR_ADMIN_PASS
E-Mail Address: your-mail@idroot.us

Once you are done, change the ownership of the Review Board folder to the Apache user with the following command:

sudo chown -R www-data:www-data /var/www/idroot.us

Next, create a virtual host file for Review Board with the following command:

sudo cp /var/www/example.com/conf/apache-wsgi.conf /etc/apache2/sites-available/idroot.us.conf

Now, we can restart the Apache webserver so that the changes take place:

sudo a2enmod rewrite
sudo a2ensite idroot.us.conf
sudo systemctl restart apache2.service

Step 6. Configure Firewall.

In case, you enabled firewall and firewall block requests of the apache web server, open a port in the firewall:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reload

Step 7. Accessing Review Board Web Interface.

Once successfully installed, now open your web browser and type the URL https://idroot.us.

Congratulations! You have successfully installed Review Board. Thanks for using this tutorial for installing the Review Board on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you to check the official Review Board website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button