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.
- 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).
non-root sudo useror 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:
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
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: email@example.com
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
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.