什么是reviewboard?
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It scales well from small projects to large companies and offers a variety of tools to take much of the stress and time out of the code review process.
安装reviewboard需要准备什么?
1、推荐debian/ubuntu服务器
2、apache:wget http://labs.renren.com/apache-mirror//httpd/httpd-2.2.22.tar.gz
3、mod_wsgi:wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
4、mysql
5、reviewboard客户端,推荐:http://code.taobao.org/p/tao-reviewboard/wiki/index/
【步骤】
请详细阅读官网步骤:
http://www.reviewboard.org/docs/manual/dev/admin/installation/linux/
http://www.reviewboard.org/docs/manual/dev/admin/installation/creating-sites/#creating-sites
讲点要点:
1、首先安装官网:http://www.reviewboard.org/docs/manual/dev/admin/installation/linux/
安装常用类库
2、安装apache:
下载压缩包解压之后,以下安装目录仅供参考
./configure --prefix=/home/app/httpd
make && make install
这样子apache安装完毕,但是,并没有mod_wsgi模块
因此必须安装mod_wsgi模块
3、安装mod_wsgi模块:
./configure --with-apxs=/home/app/httpd/bin/apxs --with-python=/usr/bin/python2.6
make && make install
安装完毕之后,在目录下存在:
root@ReviewBoard:/home/app/httpd/modules$ ll
-rwxr-xr-x 1 root root 367380 2月 15 20:06 mod_wsgi.so
4、安装mysql
并且创建数据库:
create database reviewboard default charset utf8 collate utf8_general_ci;
账号:reviewboard
密码:reviewboard
为什么要创建utf8的呢?因为mysql默认是lantin的,中文会出现乱码
同时要修改my.cnf,在[client]和[mysql]中增加:default-character-set=utf8,[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
5、阅读http://www.reviewboard.org/docs/manual/dev/admin/installation/creating-sites/#creating-sites
先启动mysqlrb-site install /home/app/httpd/htdocs/reviewboard按照提示操作域名:reviews.example.co数据库:reviewboard账号:reviewboard密码:reviewboardmemcache:127.0.0.1 记得选:mod_wsgiok到处,就不要参考官网的apache配置了,我告诉你吧。拷贝:/home/app/httpd/htdocs/reviewboard/conf/apache-wsgi.conf到:/home/app/httpd/conf目录下,或者软连接也行 修改apache的httpd.conf文件:修改:ServerName reviews.example.com:80最后一行增加:Include conf/apache-wsgi.conf保存即可。 检查语法:
root@ReviewBoard:/home/app/httpd/conf$ /home/app/httpd/bin/httpd -t
Syntax OK
差不多就要成功了启动apache/home/app/httpd/bin/httpd
root@ReviewBoard:/home/app/httpd/conf$ ps -eff | grep httpd
root 28443 1 0 20:30 ? 00:00:00 /home/app/httpd/bin/httpd
daemon 30544 28443 0 21:31 ? 00:00:00 /home/app/httpd/bin/httpd
daemon 30546 28443 0 21:31 ? 00:00:01 /home/app/httpd/bin/httpd
daemon 30548 28443 0 21:31 ? 00:00:00 /home/app/httpd/bin/httpd
daemon 30549 28443 0 21:31 ? 00:00:01 /home/app/httpd/bin/httpd
daemon 30578 28443 0 21:32 ? 00:00:00 /home/app/httpd/bin/httpd
daemon 30580 28443 0 21:32 ? 00:00:00 /home/app/httpd/bin/httpd
daemon 30636 28443 0 21:36 ? 00:00:00 /home/app/httpd/bin/httpd
daemon 30637 28443 0 21:36 ? 00:00:00 /home/app/httpd/bin/httpd
daemon 30638 28443 0 21:36 ? 00:00:00 /home/app/httpd/bin/httpd
root 30731 27180 0 22:12 pts/0 00:00:00 grep httpd
知道daemon什么意思了,要做什么吗?
chown –R daemon:daemon /home/app/httpd/htdocs/reviewboard
这样子apache对该目录就有权限了
重启apache:
/home/app/httpd/bin/apachectl restart
访问域名:
http://reviews.example.com
开打,以admin/密码成功登录
总结要点:
1、要认证阅读安装文档
2、mysql,创建库要utf8,修改配置文件,因为要用到中文
3、apache必须整合模块mod_wsgi,否则引入的apache-wsgi.conf会报错