• Get In Touch
May 25, 2017

How to Install Review Board on CentOS 7

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Review Board is a free and open source web-based software tool that can be used for reviewing source code, documentation, images and many more. It is written in Python and uses either SQLite, MySQL, MariaDB or PostgreSQL to store its data.

It scales well from small projects to large companies and offers a variety of tools to simplify code review.

You can install Review Board on any server running Apache or Lighttpd. Review Board is used by lots of companies like, Novell, Cisco, Yahoo, Linkedin, Amazon, KDE, Cloudera, NetApp, Twitter, VMware, HBase, Apache Software Foundation and much more.

Advantages of Review Board are listed below:

  1. Cost and Time saving.
  2. Easily review Pre-commit and Post-commit code.
  3. Code review dramatically helps in the quality of products.

Here, we will install the latest version of Review Board on CentOS 7 server.

Requirements

  • A server running CentOS 7.
  • A normal user with sudo privileges setup on your server.

Getting Started

First, you will need to install EPEL repo to your system. You can install it by running the following command:

sudo yum install epel-release -y

Next, update your system with the latest stable version. You can do this by running the following command:

sudo yum update -y

Once your system is up to date, you can proceed to install Apache web server.

Install Apache Web Server

First, you will need to install Apache web server and other required packages on your system. You can install it with the following command:

sudo yum install httpd openssl mod_ssl mod_wsgi

After installing Apache, start the Apache web server and enable it to start on boot with the following command:

sudo systemctl start httpd
sudo systemctl enable httpd

Once you are done, you can proceed to install and configure Database.

Install and Configure Database

Review Board uses SQLite, MySQL, MariaDB or PostgreSQL to store it’s data. Here, we will install MariaDB to store it’s data.

You can install MariaDb with the following command:

sudo yum install mariadb mariadb-server -y

Once MariaDB is installed, you will need to make some changes in my.cnf file:

Edit the my.cnf file using the following command:

sudo nano /etc/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

Next, start MariaDB service and enable it to start on boot with the following command:

sudo systemctl start mariadb
sudo systemctl enable mariadb

Next, you will need to secure your MariaDB installation. You can secure it by running the following command:

sudo mysql_secure_installation

Answer all the questions as shown below:

Set root password? [Y/n] n
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

Once MariaDB is secured, login to MariaDB shell with the following command:

mysql -u root -p

Enter your root password when prompted, then create a database for Review Board with the following command:

MariaDB [(none)]>CREATE DATABASE reviewdb;

Query OK, 1 row affected (0.00 sec)

Next, create a username and password for Review Board with the following command:

MariaDB [(none)]>CREATE USER 'reviewuser'@'localhost' IDENTIFIED BY 'password';

Query OK, 1 row affected (0.00 sec)

Next, grant privileges to the Review Board database with the following command:

MariaDB [(none)]>GRANT ALL PRIVILEGES ON reviewdb.* TO 'reviewuser'@'localhost';

Query OK, 1 row affected (0.00 sec)

Next, you will need to run the FLUSH PRIVILEGES command so that the privileges table will be reloaded by MariaDB and we can use new credential:

MariaDB [(none)]>FLUSH PRIVILEGES;

Query OK, 1 row affected (0.00 sec)

Next, exit from the MariaDB console with the following command:

MariaDB [(none)]>\q

Once you are done, you can proceed to install Review Board.

Install and Configure Review Board

You can easily install Review Board with the following command;

sudo yum install ReviewBoard memcached -y

Once Review Board is installed, you will need to create a site for Review Board.

You can easily create a new Review Board Site using the rb-site command:

sudo rb-site install /var/www/reviewboard

During the Review Board installation it will ask you following parameters:

Domain Name: yourdomain.com
Root Path [/]:Press Enter
Database Type: 1                      #Enter 1 for MySQL
Database Name [reviewboard]: reviewdb
Database Server [localhost]:          #Press enter to use default
Database Username: reviewuser
Database Password: password
Memcache Server [localhost:11211]:    #Press enter to use default
Username [admin]: siteadmin
Password: your-password
E-Mail Address: hitjethva@gmail.com

Once you are finished, set the ownership of the Review Board files to the Apache user using the following command.

sudo chown -R apache:apache /var/www/reviewboard

Next, create a symbolic link for the Apache configuration file using the following command.

sudo ln -s /var/www/reviewboard/conf/apache-wsgi.conf /etc/httpd/conf.d/reviewboard.conf

Next, restart Apache services with the following command:

sudo systemctl restart httpd

Now start Memcached service and enable it to start at boot time using following commands.

sudo systemctl start memcached
sudo systemctl enable memcached

Access the Review Board Site

Before accessing the Review Board web interface, you will need to allow HTTP service through firewall.

You can do this by running the following command:

sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload

Once you are done, open your web browser and navigate the URL http://yourdomain.com to access the Review Board Site.

Conclusion

Congratulations! you have successfully installed Review Board on CentoS 7 server. You can now easily deploy it for your developers.
Feel free to comment me if you have any questions.

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]