Table of Contents
- Step 1: Update the System
- Step 2: Install Dependencies
- Step 3: Install Review Board
- Step 4: Configuring Database
- Step 5: Create Database for Review Board
- Step 6: Creating Review Board Site
If you are using a different system, please check our other tutorials.
Review Board is a free and open source tool for reviewing source code, documentation, images and many more. It is web-based software written in Python and uses either SQLite, MySQL, or PostgreSQL to store its data.
In this tutorial we will install the latest version of Review Board on Ubuntu 16.10.
- An ITWeb.Services Ubuntu 16.10 server instance.
- A Domain name pointed at your server.
- A sudo user.
Step 1: Update the System
Before installing any packages in Ubuntu server instance, it is recommended to update the system. Login using the sudo user and run the following commands to update the system.
sudo apt-get update sudo apt-get -y upgrade
Step 2: Install Dependencies
Before installing Review Board, we must need to install few dependencies first. Install Python, Memcache and required tools using the following command.
sudo apt-get -y install python-setuptools python-dev memcached patch libjpeg-dev python-mysqldb sudo easy_install pip
Now install the support for the revision control system supported by Review Board using the following command.
sudo apt-get -y install cvs git-core subversion python-svn
Step 3: Install Review Board
Run the following command to install Review Board.
sudo pip install ReviewBoard
If you encounter any problems during installation, you might need to install few more dependencies so that Review Board can install.
sudo apt-get -y install python-cffi sudo apt-get -y install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 sudo apt-get -y install zlib1g-dev libxml2-dev libxslt1-dev libssl-dev
Now run the installer again.
sudo pip install ReviewBoard
Step 4: Configuring Database
Review Board can use either SQLite, MySQL or PostgreSQL to store it’s data. In this tutorial we will be using MySQL to store its data. To install MySQL, run the following command.
sudo apt-get -y install mysql-server
Now edit the default MySQL configuration file using the following command.
sudo nano /etc/mysql/my.cnf
Add the following lines at the bottom of the file so that the server is configured to use the UTF-8 encoding for text.
[client] default-character-set=utf8 [mysqld] character-set-server=utf8
Once MySQL is installed, run the following command to start MySQL and enable it to automatically start at boot time using following commands.
sudo systemctl start mysql.service sudo systemctl enable mysql.service
Now secure your MySQL installation using the following command.
You will be asked for current root password. As we have just install MySQL, root password is not set. Press Enter key to proceed. Set a strong root password for your MySQL server and answer
Y for all the other questions asked. All the questions asked are self explanatory.
Once your MySQL server’s security is hardened, proceed further to create a database to store Review Board data.
Step 5: Create Database for Review Board
Login to MySQL shell as root user using the following command.
mysql -u root -p
Provide the password for root user you just set earlier.
Now run the following queries to create the database and database user for Review Board installation.
CREATE DATABASE rb_data; CREATE USER 'rb_user'@'localhost' IDENTIFIED BY 'StrongPassword'; GRANT ALL PRIVILEGES ON rb_data.* TO 'rb_user'@'localhost'; FLUSH PRIVILEGES; EXIT;
Make sure that you use semicolon at the end of each query above. You can replace the database name
rb_data and database username
rb_useraccording to your need. Be sure to change
StrongPassword with a very strong password.
Step 6: Creating Review Board Site
Install Apache web server using the following command.
sudo apt-get install apache2
You can now create a Review Board site. Run the following command to create a new Review Board site.
sudo rb-site install /var/www/reviews.example.net
In above command, change the path to your site according to your actual domain. During the installation it will ask you for few parameters which are as follows.
Domain Name: reviews.example.net #Your actual domain Root Path [/]: #Press enter to use default Database Type: 1 #Enter 1 for MySQL Database Name [reviewboard]: rb_data #Your database name Database Server [localhost]: #Press enter to use default Database Username: rb_user #Your database username Database Password: #Your database password Memcache Server [localhost:11211]: #Press enter to use default Username [admin]: #Provide Administrator account username Password: #Provide Administrator account password E-Mail Address: #Provide Administrator email
Now provide the ownership of the Review Board files to the Apache user using the following command.
sudo chown -R www-data:www-data /var/www/reviews.example.net
Now create a symbolic link of the Apache configuration file using the following command.
sudo cp /var/www/reviews.example.net/conf/apache-wsgi.conf /etc/apache2/sites-available/reviews.example.net.conf sudo ln -s /etc/apache2/sites-available/reviews.example.net.conf /etc/apache2/sites-enabled/reviews.example.net.conf
Now start Memcached and Apache services and enable them to start at boot time using following commands.
sudo systemctl start memcached.service sudo systemctl enable memcached.service sudo systemctl start apache2.service sudo systemctl enable apache2.service
mod-wgsi using the following command.
sudo aptitude install libapache2-mod-wsgi
You can now browse to
http://reviews.example.net to access the Review Board Site. Installation of Review Board is now finished.
Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!