How to install Review Board on a CentOS 7 VPS
What is Review Board?
It is a code review system that saves you time, money and sanity so you can focus on making better software. It can easily track team’s review requests, it has a great diff viewer, it supports uploading and reviewing of all kinds of files, it has nice commenting system and much more.
- CentOS 7 Linux VPS Hosting
- Web server
- Database server
- Python 2.5+
1. UPDATE SYSTEM
Before going any further,
ssh to your CentOS VPS, initiate a
screen session and upgrade your system using
## screen -U -S review-board ## yum update
2. INSTALL MARIADB (MYSQL)
Review Board supports MySQL/MariDB version 5.0.31 or newer, PostgreSQL or Sqlite3 as a database server. In our case we are going to use MariaDB which is the default database server in CentOS 7 and it’s a drop-in replacement for MySQL. Let’s install MariaDB using
## yum install mariadb mariadb-server mysql
Once installed, add
bind-address = 127.0.0.1 to
/etc/my.cnf.d/server.cnf to bind MariaDB to localhost only:
## vim /etc/my.cnf.d/server.cnf [mysqld] #log-bin=mysql-bin #binlog_format=mixed bind-address = 127.0.0.1
Restart the MariaDB database server and enable it to start on system start-up using:
## systemctl restart mariadb ## systemctl status mariadb ## systemctl enable mariadb
Optionally, you can run the
mysql_secure_installation post-installation script to finish the MariaDB set-up.
## mysql_secure_installation Enter current password for root (enter for none): ENTER 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
3. INSTALL APACHE
Review Board can run on Lighttp + fastcgi or Apache + mod_python, Apache + fastcgi, Apache + mod_wsgi. We will be using Apache + mod_wgsi, so let’s install Apache and mod_wsgi on the CentOS VPS system using
## yum install httpd openssl mod_ssl mod_wsgi
Restart Apache and add it to automatically start on your system start-up using:
## systemctl restart httpd ## systemctl status httpd ## systemctl enable httpd
Optionally, configure some extra Apache options, for example, hide its version number, its banner etc… by adding the following to
## vim /etc/httpd/conf.d/options.conf TraceEnable off ## Disable Signature ServerSignature Off ## Disable Banner ServerTokens Prod
Test Apache configuration file and restart the webserver for the changes to take effect:
## apachectl configtest ## systemctl restart httpd ## systemctl status httpd
SETUP REVIEW BOARD
The Review Board in CentOS 7 is provided by the EPEL repository. So, in order to install the package you have to enable EPEL on your Linux VPS.
4. ENABLE EPEL REPOSITORY
You can easily enable EPEL in CentOS 7 using
yum as in:
## yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm
Verify that EPEL has been enabled on your Linux VPS Hosting by running the following command:
## yum repolist
5. INSTALL REVIEW BOARD
Once EPEL has been added to your server, you can install Review Board and its dependencies by running:
## yum install ReviewBoard
6. INSTALL MEMCACHED
Memcached is a high-performance caching server used by Review Board. While optional, it’s strongly recommended in order to have a fast, responsive server. Along with memcached, we need the python-memcached Python bindings.
## yum install memcached python-memcached.noarch
start memcached using:
## systemctl restart memcached ## systemctl enable memcached
7. INSTALL SOURCE CONTROL APPS
Depending on which source control systems you plan to use, you will need some additional components like cvs, git, mercurial etc..
## yum install cvs git subversion python-subvertpy
8. CREATE REVIEW BOARD SITE
Once Review Board is installed, a site must be created. Each site maps to a domain, subdomain, or directory installation. To create a site, you will use the
rb-site install command. We are going to use
reviews.domain.com for our Review Board site and it will be located in
Before you begin with the installation, let’s create a new MySQL database that we’ll be using for our Board Site.
## mysql -u root -p MariaDB> create database reviewboard; MariaDB> grant all on reviewboard.* to [email protected] identified by 'STRONG_PASSWORD'; \q
Begin the installation of your new site by running the following:
## rb-site install /var/www/html/reviews.domain.com
You will now be asked a series of questions about your site setup. It is expected that you will know the answers to these questions. If not, you’ll have to decide what software you want to use for your services and refer to their documentation on how to set them up and configure them.
Domain Name: reviews.domain.com Root Path [/]: / Database Type: 1 Database Name [reviewboard]: reviewboard Database Server [localhost]: localhost Database Username: reviewboard Database Password: STRONG_PASSWORD Confirm Database Password: STRONG_PASSWORD Memcache Server [localhost:11211]: localhost:11211 Username [admin]: admin Password: YOUR_ADMIN_PASS Confirm Password: YOUR_ADMIN_PASS E-Mail Address: [email protected]
Next, setup correct permissions by running:
## chown -R apache: /var/www/html/reviews.domain.com
9. SETUP APACHE VHOST
Final thing to do is to setup an Apache virtual host directive that will serve our Review Board site. An example configuration file should be available in
conf/apache-wsgi.conf, so copy the sample configuration file to
/etc/httpd/conf.d and restart apache for the changes to take effect:
## cp /var/www/html/reviews.domain.com/conf/apache-wsgi.conf /etc/httpd/conf.d/ ## apachectl configtest ## systemctl restart httpd
That’s it. Now you can access your Review Board at http://reviews.domain.com and login with your ‘admin’ username and password you set earlier.
Of course you don’t have to do any of this if you use one of our CentOS Optimized Hosting services, in which case you can simply ask our expert Linux admins to install Review Board. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.