How to Install Review Board on Ubuntu 16.04

来源:互联网 发布:学说普通话软件 编辑:程序博客网 时间:2024/06/14 23:22

How to Install Review Board on Ubuntu 16.04

# Requirements
#    A server running Ubuntu 16.04.
#    A normal user with sudo privileges setup on your server.

# Update the System
sudo apt-get update -y
sudo apt-get upgrade -y

# Install Apache Web Server
sudo apt-get install apache2 libapache2-mod-wsgi -y
sudo systemctl start apache2
sudo systemctl enable apache2

# Install Required Dependencies
sudo apt-get install python-setuptools python-dev memcached python-mysqldb patch libjpeg-dev -y
sudo easy_install pip
sudo apt-get install cvs git-core subversion python-svn -y

# Install Review Board
sudo apt-get install python-cffi 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 zlib1g-dev libxml2-dev libxslt1-dev libssl-dev -y
sudo pip install ReviewBoard

# Install and Configure MySQL
sudo apt-get install mysql-server -y
sudo vi /etc/mysql/my.cnf
[client]
default-character-set=utf8

[mysqld]
character-set-server=utf8

# Start MySQL and enable it to automatically start at boot time using following commands.
sudo systemctl start mysql
sudo systemctl enable mysql

# Next, you will also need to secure your MySQL installation. You can do this by running
sudo mysql_secure_installation

# Once MySQL is secured, log in to the MySQL shell and create a database for Review Board:
mysql -u root -p

# Enter your root password when prompt, then create a database for Review Board. It is recommended to set secure password:
CREATE DATABASE reviewboard;

# Next, create a username and password for Review Board with the following command:
CREATE USER 'reviewboard'@'localhost' IDENTIFIED BY 'password';

# Next, grant privileges to the Review Board database with the following command:
GRANT ALL PRIVILEGES ON reviewboard.* TO 'reviewboard'@'localhost';

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

# Next, exit from the MySQL console with the following command:
\q;

# Once you are done, you can proceed to the next step.

# Configure Review Board Site
sudo rb-site install /var/www/reviewboard

# Once you are done, change the ownership of the Review Board folder to the Apache user with hte following command:
sudo chown -R www-data:www-data /var/www/reviewboard

# Next, create a virtual host file for Review Board with the following command:
sudo cp /var/www/reviewboard/conf/apache-wsgi.conf /etc/apache2/sites-available/reviewboard.conf

# Next, enable the virtual host with the following command:
sudo a2dissite 000-default.conf
sudo a2ensite reviewboard.conf
sudo service apache2 reload

# Finally, restart Memcached and Apache services and enable Memcached service to start at boot with the following command:
sudo systemctl restart memcached
sudo systemctl enable memcached
sudo systemctl restart apache2


原创粉丝点击