在ubuntu上搭建reviewboard

review board 2.0.5python

ubuntu ubuntu-12.04.1-desktop-amd64mysql

基本上基於這個教程:http://alephnullplex.appspot.com/blog/view/2009/07/09/tutorial-installing-review-board-on-ubuntu sql

Notes:apache

1. 我沒能成功安裝mod-python。做爲替代,我安裝了mod_wsgi:ubuntu

sudo apt-get install libapache2-mod-wsgi
sudo a2enmod wsgi
sudo service apache2 restart
所以
sudo cp /var/www/reviewboard/conf/apache-modpython.conf /etc/apache2/sites-available/reviewboard
這一步就變成了
sudo cp /var/www/reviewboard/conf/apache-wsgi.conf /etc/apache2/sites-available/reviewboard


2. 建立rb site的時候要把Domain指定成你的dns name 或者ip,不然沒法從外部訪問。若是你設置成了localhost,那麼就算是從本機127.0.0.1也沒法訪問

3. 若是你的apahcer server host不是固定IP,那麼在ip變化以後,
3.1 須要修改/etc/apache2/sites-enabled目錄下的站點文件,把ip手動更新爲新的ip。
3.2 須要修改/var/www/reviewboard/conf下面的apache-wsgi.conf。
3.3 須要修改/var/www/reviewboard/conf下面的settings_local.py,替換其中的ip。rm settings_local.pyc,從新編譯生成該pyc文件。
import compileall
compileall.compile_dir(r'/var/www/reviewboard/conf')

 

 

-----------------------------------------windows

09
Jul

Tags:ide

Review Board is an open source tool that allows you to conduct code reviews in an easy informal yet structured manner.memcached

It does away with 'over-the-shoulder' reviews and makes email review hell a thing of the past. Each review has its own set of comments and patches in one place, which all developers on the project can see.

I have just finished installing Review Board on Ubuntu Jaunty and thought it might be useful to set out.

This is a step-by-step nothing missing tutorial from a clean Ubuntu install to your first review request.

1. Setting up a Server

I chose to use Apache2 with mod_python, as advised by the Review Board team. Apparently there are some issues with running it as fastcgi. To get an apache install capable of serving python pages:

sudo apt-get install apache2
sudo apt-get install libapache2-mod-python
sudo a2enmod python

2. Setting up storage

First we need to get MySQL and the python bindings for MySQL

sudo apt-get install mysql-server
sudo apt-get install python-mysqldb

For faster responses, we are going to install memcache and its python bindings.

sudo apt-get install memcached
sudo apt-get install memcached-dev
sudo apt-get install python-memcache

You will need to create a database and a database user for Review Board using the following.

mysql -uroot -p
mysql> create database reviewboard;
Query OK, 1 row affected (0.00 sec)
mysql> create user 'rb'@'localhost' identified by 'rb_password';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on reviewboard.* to 'rb'@'localhost'
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye

3. Setting up Subversion

Review Board requires a Subversion client and python bindings, as well as the patch tool.

sudo apt-get install patch
sudo apt-get install subversion
sudo apt-get install python-svn

4. Getting Review Board

Review Board is installed using easy_install. If you don't already have setup tools installed you will need to install it first.

sudo apt-get install python-setuptools
sudo easy_install reviewboard

5. Creating your site

In this tutorial I am assuming that you are creating a dedicated server for Review Board. This means that Review Board will be default site. Installing as a subdomain is readily supported but I have not tested it.

Start the site creator with:

sudo rb-site install /var/www/reviewboard

To serve Review Board as the root site, use the following settings:

  • Domain = localhost
  • Root Path = /
  • Media URL = media/
  • Database Type = mysql
  • Database Name = reviewboard
  • Database server = localhost
  • Database username = 'rb' & password = 'rb_password' or whatever you used earlier in step 2
  • Cache Type = memcache
  • Memcache Server = memcached://localhost:11211/ (This should be the default)
  • Webserver = apache
  • Python loader = modpython
  • Admin account - enter your details here

Then wait for all the little green ticks to appear.

6. Configuring your site

First you need to allow the apache server to manage the uploads directory with:

sudo chown -R www-data /var/www/reviewboard/htdocs/media/uploads

Then you need to copy the site configuration into apache and enable. We are also going to disable the default site and then restart the apache server.

sudo cp /var/www/reviewboard/conf/apache-modpython.conf /etc/apache2/sites-available/reviewboard
sudo a2dissite default
sudo a2ensite reviewboard
sudo /etc/init.d/apache2 restart

7. Creating your Repository settings

It's time to fire up your browser and head to http://localhost/ and log in with the administrator credentials.

Head to Admin -> Repositories -> Add Repository and fill in the details and hit save.

8. post-review

post-review is a little tool that makes it easy to send review requests to Review Board. Withoutpost-review you have to manually create the diff file and upload it.

Installation is via easy_install:

sudo easy_install RBTools

On windows you will have to do a few extra steps to get post-review working nicely.

At the top of your subversion checkout create a file called .reviewboardrc and add this line to it:

REVIEWBOARD_URL = "http://localhost"

If your checkout is not on the same machine as the Review Board server you will need to changelocalhost to either the servers IP address or domain name.

9. Your first Review Request

Go make some changes in your code and save them. On the command line cd into the directory that contains your checkout and .reviewboardrc file and run post-review or post-review.py if you are using windows.

The first time you will be asked to enter your Review Board login username and password.

Go to http://localhost and click on 'Outgoing Reviews'. There will one item with a title of [Draft]. Click on [Draft] to complete the Review Request. Fill in all the necessary fields and then click on publish.

All done

By now you should have a running install of Review Board with your first Review Request. At this point you will need to get others to sign up and start submitting and reviewing.

There is a comprehensive User Guide available.

相關文章
相關標籤/搜索