Apache+SVN+Review Board代碼審核服務(wù)器搭建流程

Apache+SVN+Review Board代碼審核服務(wù)器搭建流程?
一、簡(jiǎn)介代碼審查(CodeReview)不但可以提高質(zhì)量,而且還是一個(gè)知識(shí)共享和指導(dǎo)的極好的手段。ReviewBoard是一款比較優(yōu)秀的,開源的基于WEB的代碼審查工具。?
二、準(zhǔn)備工作2.1、安裝依賴包yum-yinstallgccgcc-c++makecmakeautoconfautomakelibffilibffi-develncurses*bison*zlib*expat*openssl*apr*neon*?
2.2、安裝Apacheyum-yinstallhttpdhttpd-devel?
2.3、安裝MySQLyum-yinstallmysqlmysql-servermysql-develmysql-pythonservicemysqldstart?
登錄MySQL創(chuàng)建reviewboard數(shù)據(jù)庫(kù)和reviewboard用戶?
mysql–uroot–p>createdatabasereviewboarddefaultcharsetutf8collateutf8_general_ci;>grantallonreviewboard.*to'reviewboard'@'localhost'identifiedby'reviewboard';?
2.4、安裝memcachedyum-yinstallmemcachedpython-memcachedservicememcachedstart?
2.5、安裝patchyum-yinstallpatch?
2.6、安裝Pythonyum-yinstallpythonpython-devel?
2.7、安裝python-subvertpy pysvn如果python版本為2.6(CentOS6.x),可以采用EPEL yum源進(jìn)行下載?
(1)、rpm-ivhhttp://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmyum-yinstallpython-subvertpypysvn(安裝yum源EPEL紅帽企業(yè)庫(kù),centos默認(rèn)yum源庫(kù)中沒有pysvn)?
(2)、yum--enablerepo=epelinstallpysvnpython-subvertpy(指定在EPEL yum源中,下載pysvn,python-subvertpy)?
CentOS7.x?安裝EPEL源?
rpm-ivhhttp://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm?
三、開始安裝3.1、安裝easy_installdistribute從0.7版本后就和setuptools合并在一起了,所以先刪除舊版(setuptools)easy_install。?
第一步:刪除easy_install?
rm-f/usr/bin/easy_install*rm-f/usr/local/bin/easy_install*?
第二步:安裝distribute?
wgethttps://svn.apache.org/repos/asf/oodt/tools/oodtsite.publisher/trunk/distribute_setup.pypythondistribute_setup.pyrmdistribute_setup.py?
3.2、安裝ReviewBoardeasy_installreviewboardrb-siteinstall/var/www/html/reviewboard?
根據(jù)情況配置以下內(nèi)容?
DomainName:192.168.2.41RootPath[/]:DatabaseType:mysqlDatabaseName[reviewboard]:DatabaseServer[localhost]:DatabaseUsername:reviewboardDatabasePassword:ConfirmDatabasePassword:MemcacheServer[localhost:11211]:Username[admin]:adminPassword:ConfirmPassword:E-MailAddress:public@unilifemedia.comCompany/OrganizationName(optional):unilifemediaAllowustocollectsupportdata?[Y/n]:?
3.3、配置reviewboard目錄權(quán)限chown-Rapache.apache/var/www/html/reviewboard/htdocs/chown-Rapache.apache/var/www/html/reviewboard/data?
3.4、配置reviewboard把a(bǔ)pache-wsgi.conf配置文件放到Apache的conf.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?
servicehttpdrestart?
四、后臺(tái)配置登錄:http://192.168.2.41/?
輸入剛才配置的admin密碼
了解更多網(wǎng)絡(luò)知識(shí)關(guān)注:http://www.vecloud.com/