Review board is free and open source web based collaborative code review tool, available under an MIT license. Review Board can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. It is written in Python and uses either SQLite, MySQL, or PostgreSQL to store its data. There are many companies which uses Review Board and some of them are listed below:
- Apache Software Foundation
You'll need a CentOS 7 server and a normal user with root privileges over it to follow this guide. You'll also need a domain name pointed at your server to install Review Board on your server.
It is recommended to install Review Board on a freshly updated server, so run below given command to upgrade available packages and update your server.
yum -y update
yum -y install epel-release
Install Apache Web Server
Review board requires apache web server for installation and it automatically installs apache web server with it. But if you want then you can install it manually (this is optional). Run below given commands to install apache web server manually.
yum -y install httpd
Now you can start Apache and enable it to start at boot time, using the following commands.
systemctl start httpd.service systemctl enable httpd.service
You can check the status of Apache web server using the following command.
systemctl status httpd
Install Review Board
Run following command to install review board. It will automatically install apache web server.
yum -y install ReviewBoard memcached
We know that Review Board automatically installs apache web server but it does not installs any database server so we you will have to install it manually. To install MariaDB, run the following command.
yum -y install mariadb mariadb-server
Next, edit default configuration file using any text editor, here we are using nano text editor. You can also install it using
yum -y install nano
Add the following lines at the bottom of the file then save the file and exit from text editor.
Once MariaDB is installed, run the following command to start MariaDB and enable it to automatically start at boot time like we have done before for apache web server.
systemctl start mariadb.service
systemctl enable mariadb.service
Next, secure your MariaDB installation using the following command.
You'll be asked to provide root password so enter appropriate password and answer yes to all questions by pressing Y.
Now you'll have to create a database for Review Board so please follow the instructions.
mysql -u root -p
You'll be asked to enter password so simply enter a password and now execute the following queries to create a new database.
CREATE DATABASE rb_data;
The above query will create a database named rb_data. For the database you can use any name you prefer in the place of rb_data. Make sure that you use semicolon at the end of each query as a query always ends with a semicolon. Once the database is created you can create a new user and grant the required permissions to the user for the database.
CREATE USER 'rb_user'@'localhost' IDENTIFIED BY 'StrongPassword';
The above query will create a user with username rb_user. You can use any preferred username instead of rb_user. Replace StrongPassword with a strong password.
Now provide the appropriate privileges to your database user over the database you have created. Run the following query to do so.
GRANT ALL PRIVILEGES ON rb_data.* TO 'rb_user'@'localhost';
Now run the following query to immediately apply the changes on the database privileges.
Now you can exit from MariaDB prompt using following command.
Creating Review Board Site
You can now create a Review Board site. Run the following command to create a new Review Board site.
rb-site install /var/www/reviews.newsite.net
In above command, change the path to your site according to your actual domain and replace
newsite with your review board site. it will ask you for few parameters which are shown below:
Domain Name: reviews.newsite.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
Next, set proper ownership permissions of review board files to Apache user using the following commands.
chown -R apache:apache /var/www/reviews.newsite.net
ln -s /var/www/reviews.newsite.net/conf/apache-wsgi.conf /etc/httpd/conf.d/reviews.newsite.net.conf
Next, start Memcached services and restart your apache web server using following commands.
systemctl start memcached.service
systemctl enable memcached.service
systemctl start httpd.service
systemctl enable httpd.service
systemctl restart httpd
Configure Firewall Services
If in case you don't have firewalld services already installed then you can install it using
yum -y install firewalld and then start and enable it to start at boot time using following command.
systemctl start firewalld systemctl enable firewalld
Now you'll have to change some firewalld rules using following commands:
firewall-cmd --zone=public --permanent --add-service=http
Finally run following commands to avoid SELinux errors.
setsebool -P httpd_can_sendmail 1
setsebool -P httpd_can_network_memcache 1
setsebool -P httpd_can_network_connect_db 1
setsebool -P httpd_unified 1
Next, open up your favorite web browser and browse http://reviews.newsite.net and you'll see Review Board site.
Congratulations! You've installed Review board on your CentOS 7 server successfully.