Some notes from my as yet incomplete installation of Review Board on Ubuntu. I haven’t integrated with Perforce or set up other bits and pieces yet.
Download & Install
Apache (2.2.9-7ubuntu) & MySql (5.0.67ubuntu6)
Using synaptic, I installed the following packages (and their dependencies) from the Ubuntu repositories
I think this was installed by default (or I had previously picked it up as a dependency for something else). I didn’t have to install this specifically.
sudo apt-get install python-setuptools
Or you can download setuptools-0.6c9-py2.5.egg from http://pypi.python.org/pypi/setuptools.
Then to install just:
sudo sh http://pypi.python.org/pypi/setuptools
sudo easy_install mysql-python
Review Board (and all other dependencies)
sudo easy_install ReviewBoard
Install the g++ and python2.5-dev Ubuntu packages
sudo apt-get install g++ sudo apt-get install python2.5-dev
Download the p4API package from ftp://ftp.perforce.com/perforce/r08.2/bin.linux26x86/p4api.tgz
Download the p4python package from ftp://ftp.perforce.com/perforce/r08.2/bin.tools/p4python.tgz
Unzip the p4api package somewhere (creates folder p4api-2008.2.179173/)
tar -zxvf p4api.tgz
Unzip the p4python package somewhere else (creates folder P4Python-2008.2/)
tar zxvf p4python.tgz
Change to the P4Python-2008.2 directory.
Edit setup.cfg to set p4_api to the unzipped p4api folder.
At the command line:
python setup.py build python p4test.py python setup.py install
At the shell prompt:
mysql -u root -p
Then once connected to mysql, create a database and user forReview Board:
CREATE DATABASE reviewboarddb; GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP,REFERENCES ON reviewboarddb.* TO reviewboard@localhost IDENTIFIED BY 'password'; FLUSH PRIVILEGES;
sudo rb-site install /var/www/reviewboard
Used the same settings as my Windows install, namely:
- Domain Name: Your hostname
- Root Path: URL path to ReviewBoard excluding hostname/domain and port, e.g. /reviewboard/
- Media URL: Hit return to accept the default
- Database Type: Enter 1 for MySQL
- Database Name: Name of the database created in MySQL. I used “reviewboarddb”
- Database Server: Hit return to accept default localhost
- Database Username: Enter “reviewboard” – the user I created during MySQL setup above.
- Database Password: Enter “password” – the temporary password I assigned above.
- Cache Type: To keep life simple, select “File”
- Cache Directory: Accept default
- Web Server: Select Apache
- Python Loader: Select modpython
- Username: Hit return for default “admin”
- Password: Choose an admin password
- E-Mail Address: As you’re setting up, I guess this should be your email address!
Copy the apache config file into the apache available sites folder:
cd /var/www/reviewboard/conf sudo cp apache-modpython.conf /etc/apache2/sites-available/reviewboard.conf
Edit the file:
sudo vi /etc/apache2/sites-available/reviewboard.conf
I had to add prefix “/reviewboard” on all references to locations “/errordocs” and “/media”. I don’t think I should have had to do this – something is amiss somewhere. Save the changes.
Link the reviewboard config file into the enabled sites config folder:
sudo ln -s /etc/apache2/sites-available/reviewboard.conf /etc/apache2/sites-enabled/reviewboard.conf
sudo /etc/init.d/apache2 restart
Open a browser and point it to http://localhost/reviewboard