千家信息网

Apache+SVN+Review Board代码审核服务器搭建流程

发表于:2025-02-03 作者:千家信息网编辑
千家信息网最后更新 2025年02月03日,Apache+SVN+Review Board代码审核服务器搭建流程一、简介代码审查(CodeReview)不但可以提高质量,而且还是一个知识共享和指导的极好的手段。ReviewBoard是一款比较优
千家信息网最后更新 2025年02月03日Apache+SVN+Review Board代码审核服务器搭建流程

Apache+SVN+Review Board代码审核服务器搭建流程

一、简介

代码审查(CodeReview)不但可以提高质量,而且还是一个知识共享和指导的极好的手段。ReviewBoard是一款比较优秀的,开源的基于WEB的代码审查工具。

二、准备工作

2.1、安装依赖包

yum -y install gcc gcc-c++ make cmake autoconfautomake libffi libffi-devel ncurses* bison* zlib* expat* openssl* apr* neon*


2.2、安装Apache

yum -y install httpd httpd-devel


2.3、安装MySQL

yum -y install mysql mysql-server mysql-devel mysql-pythonservice mysqld start


登录MySQL创建reviewboard数据库和reviewboard用户

mysql -uroot -p>create database reviewboard default charset utf8collate utf8_general_ci;>grant all on reviewboard.* to'reviewboard'@'localhost' identified by 'reviewboard';


2.4、安装memcached

yum -y install memcached python-memcachedservice memcached start


2.5、安装patch

yum -y install patch


2.6、安装Python

yum -y install python python-devel


2.7、安装python-subvertpy pysvn

如果python版本为2.6CentOS6.x),可以采用EPEL yum源进行下载

(1)、rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmyum -y installpython-subvertpy pysvn

(安装yumEPEL红帽企业库,centos默认yum源库中没有pysvn


(2)、yum --enablerepo=epel install pysvnpython-subvertpy

(指定在EPEL yum源中,下载pysvnpython-subvertpy

CentOS7.x 安装EPEL

rpm -ivhhttp://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm


三、开始安装

3.1、安装easy_install

distribute0.7版本后就和setuptools合并在一起了,所以先删除旧版(setuptoolseasy_install

第一步:删除easy_install

rm -f /usr/bin/easy_install*rm -f /usr/local/bin/easy_install*


第二步:安装distribute

wget https://svn.apache.org/repos/asf/oodt/tools/oodtsite.publisher/trunk/distribute_setup.pypython distribute_setup.pyrm distribute_setup.py


3.2、安装ReviewBoard

easy_install reviewboardrb-site install /var/www/html/reviewboard


根据情况配置以下内容

Domain Name: 192.168.2.41Root Path [/]:Database Type: mysqlDatabase Name [reviewboard]:Database Server [localhost]:Database Username: reviewboardDatabase Password: Confirm Database Password:Memcache Server [localhost:11211]:Username [admin]: adminPassword: Confirm Password: E-Mail Address: public@unilifemedia.comCompany/Organization Name (optional): unilifemediaAllow us to collect support data? [Y/n]:


3.3、配置reviewboard目录权限

chown -R apache.apache/var/www/html/reviewboard/htdocs/chown -R apache.apache /var/www/html/reviewboard/data


3.4、配置reviewboard

apache-wsgi.conf配置文件放到Apacheconf.d目录下

cp /var/www/html/reviewboard/conf/apache-wsgi.conf/etc/httpd/conf.d/


配置允许访问reviewboard的域名或IP

vi/var/www/html/reviewboard/conf/settings_local.py

ALLOWED_HOSTS =['192.168.2.41','codereviewboard.unilifemedia.com']


重启Apache

service httpd restart


四、后台配置

登录:http://192.168.2.41/

输入刚才配置的admin密码

4.1、进入管理员后台

4.2、配置发送邮件

4.3、配置审核代码仓库


输入名称,SVN仓库地址,用户名密码。

4.4、添加用户



0