在ubuntu系统下搭建Review Board代码审查环境

Software and hardware environment:

ubuntu-14.04.5-desktop-amd64.iso
VirtualBox-5.2.4-119785-Win.exe

https://www.reviewboard.org

Installing Review Board on Debian/Ubuntu Linux

There are no official Debian/Ubuntu packages for Review Board. Instead, we’ll walk you through installing using our official Python packages.

   1.First, install all the required dependencies:

sudo apt-get install build-essential python-dev python-setuptools memcached
sudo apt-get install libffi-dev libjpeg-dev libssl-dev patch
sudo pip install -U pip

      If pip isn’t installed, you can install it with:

sudo easy_install pip

   2.Install support for the revision control systems we support. These are optional.

sudo apt-get install cvs git-core subversion python-svn
sudo pip install mercurial p4python

   3.Install support for your database.
      For MySQL:

sudo apt-get install python-mysqldb

   4.Now you can install Review Board!

sudo pip install ReviewBoard

   e.g:

Domin Name:localhost
Root Path[/]:
Database Type:mysql
Database Name[reviewboard]:reviewboard
Database Server[localhost]:localhost
Database Username:db_username
Database Password:db_password
Memcache Server[localhost:11211]:
Username[admin]:admin
Password:password
E-Mail Address:xxx@xxx
Company/Organization Name(optional):
Allow us to collect support data?[Y/n]:

   5.Follow our guide to creating a Review Board site.

For a more detailed guide to all the dependencies, including additional optional dependencies not mentioned here, please see our complete installation instructions.

CMD

sudo apt-get install build-essential python-dev python-setuptools memcached
sudo apt-get remove build-essential python-dev python-setuptools memcached
sudo apt-get install libffi-dev libjpeg-dev libssl-dev patch
sudo apt-get remove libffi-dev libjpeg-dev libssl-dev patch
sudo pip install -U pip

sudo easy_install pip

sudo apt-get install cvs git-core subversion python-svn
sudo apt-get remove cvs git-core subversion python-svn
sudo pip install mercurial p4python
sudo pip uninstall mercurial p4python

sudo apt-get install python-mysqldb
sudo apt-get remove python-mysqldb

sudo apt-get install mysql-server-5.6
sudo apt-get remove mysql-server-5.6
sudo apt-get install apache2
sudo apt-get remove apache2

sudo pip install ReviewBoard
sudo pip uninstall ReviewBoard

sudo gedit ~/.my.cnf
[client]
default-character-set=utf8
[mysqld]
character-set-server=utf8

mysql -u root -p
CREATE DATABASE reviewboard CHARACTER SET utf8;
CREATE USER 'db_username'@'localhost' IDENTIFIED BY 'db_password';
GRANT ALL PRIVILEGES ON reviewboard.* to 'db_username'@'localhost';
flush privileges;
drop user 'db_username'@'localhost';
drop database reviewboard;
show databases;

sudo rb-site install /var/www/reviews.example.com
sudo chown -R www-data /var/www/reviews.example.com/htdocs/media/uploaded
sudo chown -R www-data /var/www/reviews.example.com/data

sudo chown -R www-data /var/www/reviews.example.com/htdocs/media/ext
sudo chown -R www-data /var/www/reviews.example.com/htdocs/static/ext

cd /etc/apache2/sites-available
sudo cp /var/www/reviews.example.com/conf/apache-wsgi.conf reviews.example.com.conf
cd ../sites-enabled
sudo ln -s ../sites-available/reviews.example.com.conf .

sudo apt-get install libapache2-mod-wsgi
a2enmod wsgi

sudo /etc/init.d/apache2 restart
sudo restart mysql

sudo a2dissite 000-default
sudo /etc/init.d/apache2 restart
sudo a2ensite reviewboard
sudo /etc/init.d/apache2 restart

192.168.217.112

telnet 192.168.217.112 80
sudo ufw status
sudo ufw enable
sudo ufw allow 80
sudo ufw delete allow 80

参考:http://blog.csdn.net/hanqingice/article/details/50175551
参考:http://blog.sina.com.cn/s/blog_a6782b6c0102uwcy.html

猜你喜欢

转载自blog.csdn.net/u011958166/article/details/79203727
今日推荐