日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

reviewboard--ubuntu安装reviewboard

發布時間:2023/12/20 Ubuntu 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 reviewboard--ubuntu安装reviewboard 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

System?version:?Ubuntu?Kylin?15.10,?麒麟版本14也試過可行

?

Tutorial:?Installing?Review?Board?on?Ubuntu

Tags:

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

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 apt-get install libapache2-mod-wsgi

2.?Setting?up?storage

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

sudo?apt-get?install?mysql-serversudo?apt-get?install?python-mysqldb

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

sudo apt-get install memcachedsudo 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 -pmysql> create database reviewboard; Query OK, 1 row affected (0.00 sec) mysql> create user 'rb'@'%' identified by 'rb_password'; Query OK, 0 rows affected (0.00 sec) mysql> grant all on reviewboard.* to 'rb'@'%' 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 patchsudo apt-get install subversionsudo 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.

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

· Domain = localhost · Root Path = /rb/ · 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 = localhost:11211 · Webserver = apache · Python loader = modpython · Admin account - enter your details here (root / root)

Then?wait?for?all?the?little?green?ticks?to?appear.

Allow all user view the page:

sudo rb-site install cd /var/www/html/reviewboard/conf sudo gedit setting_local.py # 修改最后一行 ALLOWED_HOST = ['*'] sudo service apache2 restartif the ReviewBoard server IP has change(DHCP), please flush the memcache

echo "flush_all" | nc localhost 11211

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/html/reviewboard/htdocs/media/uploads sudo chown -R www-data /var/www/html/reviewboard/data

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.

cd /etc/apache2/sites-available cp /var/www/html/reviewboard/conf/apache-wsgi.conf reviewboard.conf cd ../sites-enabled ln -s ../sites-available/reviwboard.conf 000-default.confsudo /etc/init.d/apache2 restart

Note:?if?you?want?update?you?software?and?systemen,?you?can?(可選):

sudo apt-get update && sudo apt-get dist-upgrade

7.?Creating?your?Repository?settings

It's?time?to?fire?up?your?browser?and?head?to?http://localhost/rb/??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.

·?Install?DiffUtils

·?Change?the?name?of?C:\Python25\Scripts\post-review?to?C:\Python25\Scripts\post-review.py

·?Add?C:\Program?Files\GnuWin32\bin?and?C:\Python25\Scripts?to?the?path?environment?variable

·?Changing?environment?variables?in?Windows?XP

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

REVIEWBOARD_URL = "http://localhost/rb/"

If?your?checkout?is?not?on?the?same?machine?as?the?Review?Board?server?you?will?need?to?change?localhost?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/rb/?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.

10.?Integrate?with?SVN不需要安裝

(1) Install hooks script. Download the hooks from http://pypi.python.org/pypi/reviewboard-svn-hooks Unzip and then install the scripts to python env. python setup.py install (2)Configuration the hooks /etc/reviewboard-svn-hooks vi config.ini [common] debug=0 [reviewboard] url=http://localhost/rb username=root // For ReviewBoard password=root // For ReviewBoard [rule] min_ship_it_count=1 min_expert_ship_it_count=0 experts= review_path= ignore_path= (3) Change the pre-commit. sudo cp /home/svn/sns/hooks/pre-commit.tpml /home/svn/sns/hooks/pre-commit chmod 777 /home/svn/sns/hooks/pre-commit (new location: /home/tate/svn/testpro/hooks/pre-commit.tpml) and then change the content of pre-commit as below. #!/bin/sh strict_review $1 $2 exit $?(4) Change the script sudo vi /usr/local/lib/python2.7/dist-packages/reviewboard_svn_hooks-0.2.1_r20-py2.7.egg/reviewboardsvnhooks/strict_review.py (new location: /usr/local/lib/python2.7/dist-packages/reviewboard_svn_hooks-0.2.1_r20-py2.7.egg/reviewboardsvnhooks/strict_review.py)def open(self, path, ext_headers, *a, **k):url = urljoin(self._server, path)return self.abs_open(url, ext_headers, *a, **k) èdef open(self, path, ext_headers, *a, **k):url = self._server + ‘/’ pathreturn self.abs_open(url, ext_headers, *a, **k)


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.

Subclipse

Subclipse?1.4.x?includes?and?requires?Subversion?1.5.x?client?features?and?working?copy?format.

Subclipse?1.6.x?includes?and?requires?Subversion?1.6.x?client?features?and?working?copy?format.

Subclipse?1.8.x?includes?and?requires?Subversion?1.7.x?client?features?and?working?copy?format.

Subclipse?1.10.x?includes?and?requires?Subversion?1.8.x?client?features?and?working?copy?format.

Links?for?1.10.x?Release:

Changelog:?http://subclipse.tigris.org/subclipse_1.10.x/changes.html

Eclipse?update?site?URL:?http://subclipse.tigris.org/update_1.10.x

Zipped?downloads:?http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240

Archived?releases:?http://subclipse.tigris.org/archive?

Links?for?1.8.x?Release:

Changelog:?http://subclipse.tigris.org/subclipse_1.8.x/changes.html

Eclipse?update?site?URL:?http://subclipse.tigris.org/update_1.8.x

Zipped?downloads:?http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240

Archived?releases:?http://subclipse.tigris.org/archive

Links?for?1.6.x?Release:

Changelog:?http://subclipse.tigris.org/subclipse_1.6.x/changes.html

Eclipse?update?site?URL:?http://subclipse.tigris.org/update_1.6.x

Zipped?downloads:?http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240

Links?for?1.4.x?Release:

Changelog:?http://subclipse.tigris.org/subclipse_1.4.x/changes.html

Eclipse?update?site?URL:?http://subclipse.tigris.org/update_1.4.x

Zipped?downloads:?http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240

11.?TaoReviewBoard

參考指南:http://code.taobao.org/p/tao-reviewboard/wiki/index/

請通過EclipseHelp?>?Install?New?Software直接安裝http://abs.taobao.org/updatesite/安裝前請先勾選需要安裝的模塊(請勾選所有模塊)。注意:在Help?>?Install?New?Software頁面,請不要勾選?Contact?all?update?sites?during?install?to?find?required?software。如果勾選了該項,插件安裝將是一個漫長的等待過程。

離線安裝:離線zip包下載地址??http://code.taobao.org/p/tao-reviewboard/file/2852/tao_reviewboard.zip。下載后,將plugins下兩個jar包拷貝至eclipse下的dropins目錄(推薦)或者是plugins目錄下即可。

?

Eclipse?&?TaoReivewBoard?settings

(1)?Eclipse?=>?Perferences?=>?Team?=>?SVN

In?Svn?Interface?section,?set?the?client?to?SVNKit

(2)?TaoReviewBoard?set?the?server?and?user

Server:?http://www.sns.com/rb

User?Id:?test

Password:?zhenbao@

?

12.?ubuntu?server搭建svn服務如引用外部SVN,可不需要安裝

采用apache+svnhttp訪問方式。

先確定安裝了apache,沒有安裝則用以下命令:

sudo apt-get install apache2

然后安裝subversionsvn-apache連接庫:

sudo apt-get install subversion sudo apt-get install libapache2-svn sudo apt-get install apache2-utils

增加svn用戶組,用于管理svn,并加入到www-dataapache組:

sudo addgroup subversion sudo usermod -G subversion -a www-data

然后可以創建svn項目倉庫了:

#?一般可以將項目倉庫建立到/home/svn目錄

#?假設項目名為myproject,先建立空目錄

$ sudo mkdir /home/svn $ sudo chmod -R o+rw /home/svn $ cd /home/svn $ sudo mkdir myproject $ sudo chown -R root:subversion myproject

#創建為svn項目,使用以下命令

$ sudo svnadmin create /home/svn/myproject

#?然后才賦予組成員對所有新加入文件倉庫的文件擁有相應的權限:

#?如果命令順序搞錯,可能會報錯,請參照官方wiki

$ sudo chmod -R g+rws myproject

最后是配置apache,用http協議訪問svn服務:

#?在安裝了libapache2-svn時會自動生成該文件

$ sudo vi /etc/apache2/mods-available/dav_svn.conf

編輯dav_svn.conf配置文件,內有注釋,可以去掉前面的#使語句生效,最后內容大概如下即可:

1 <Location /svn> #/svn表示http://hostname/svn/myproject 2 DAV svn 3 SVNParentPath /home/svn 4 AuthType Basic 5 AuthName "ToFishes Project Svn" 6 AuthUserFile /etc/subversion/passwd 7 AuthzSVNAccessFile /etc/subversion/authz 8 Require valid-user 9 </Location>

svn用戶文件/etc/subversion/passwd?和?授權訪問文件/etc/subversion/authz是不存在的,需要手動創建。

svn用戶文件可以通過命令創建:

1 #首次創建需要加-c選項,同時可以增加一個svn用戶 2 #執行該命令會提示為新用戶user_name設置密碼 3 sudo htpasswd -c /etc/subversion/passwd admin 4 #以后添加新用戶,需要去掉-c選項,否則以前的用戶就被覆滅了 5 sudo htpasswd /etc/subversion/passwd lorry

用戶是可以添加了,同時需要管理授權,用于多個svn項目,劃分不同的用戶組:

vi?/etc/subversion/authz編輯授權文件,無文件則編輯并保存后會自動創建,無需擔心。

授權文件內容格式如下:

1 #用戶組指令 2 [groups] 3 #格式為 組名 = 用戶名1,用戶名2 4 subversion = admin, lorry 5 #other groups... 6 #格式為 svn項目的倉庫名:對應目錄 7 [sns:/] 8 #設置組的權限,r=read, w=write 9 @subversion = rw 10 [sns:/web/css] 11 @group2 = rw

改完最后重啟apache?:???

sudo /etc/init.d/apache2 restart

其中訪問地址是什么呢,只要當前服務器已經綁定了一個域名,并且在apache中啟用了此域名的虛擬主機。

比如能正常訪問?http://www.cssor.com/,?那么svn項目的訪問地址就是?http://www.cssor.com/svn/項目名。

Import the codes to svn: svn import ~/Documents/workspace/Pf4jShell/ http://www.sns.com/svn/sns --username admin --password zhenbao@ -m "init." Checkout the code. svn checkout http://www.sns.com/svn/sns sns --username admin --password zhenbao@ svn ci -m "review:1, for test." --username admin --password zhenbao@ LorrymatoMacBook-Pro:sns lorry$ svn ci -m "review:1, for test." Sending src/log4j.properties Transmitting file data .svn: E165001: Commit failed (details follow): svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output: not enough of ship_it. 評審沒有通過 already in use 這個ID已經評審完成,不能再使用其進行提交

13.?BugZilla安裝(不需要安裝

(0)Config the hosts add bt.sns.com (1)Install env apt-get install apache2 mysql-server libappconfig-perl libdate-calc-perl libtemplate-perl libmime-perl build-essential libdatetime-timezone-perl libdatetime-perl libemail-sender-perl libemail-mime-perl libemail-mime-modifier-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl apache2-mpm-prefork libapache2-mod-perl2 libapache2-mod-perl2-dev libchart-perl libxml-perl libxml-twig-perl perlmagick libgd-graph-perl libtemplate-plugin-gd-perl libsoap-lite-perl libhtml-scrubber-perl libjson-rpc-perl libdaemon-generic-perl libtheschwartz-perl libtest-taint-perl libauthen-radius-perl libfile-slurp-perl libencode-detect-perl libmodule-build-perl libnet-ldap-perl libauthen-sasl-perl libtemplate-perl-doc libfile-mimeinfo-perl libhtml-formattext-withlinks-perl libgd-dev lynx-cur python-sphinx (2)Download bugzilla Unzip to /var/www/bugzilla (3) Config mysql Edit the conf /etc/mysql/my.cnf Set the following values, which increase the maximum attachment size and make it possible to search for short words and terms: 2 Alter on Line 52: max_allowed_packet=100M 3 Add as new line 31, in the [mysqld] section: ft_min_word_len=2 Save and exit. Then, add a user to MySQL for Bugzilla to use: mysql -u root -p -e "GRANT ALL PRIVILEGES ON bugs.* TO bugs@localhost IDENTIFIED BY '$db_pass'" Replace $db_pass with a strong password you have generated. Write it down. When you run the above command, it will prompt you for the MySQL root password that you configured when you installed Ubuntu. You should make $db_pass different to that password. Restart MySQL: service mysql restart (4) Config apache2 Install cgi by running the cmd as below. a2enmod cgi Edit the apache2 config. /etc/apache2/sites-available/apache-wsgi.conf, and all a virtual host as below. <VirtualHost *:80>ServerName bt.sns.comDocumentRoot /var/www/bugzilla<Directory /var/www/bugzilla>AddHandler cgi-script .cgiOptions +ExecCGIDirectoryIndex index.cgi index.htmlAllowOverride Limit FileInfo Indexes Options</Directory> </VirtualHost> (5) Run checksetup.pl to generate the localconfig cd /var/www/bugzilla ./checksetup.pl (6) Install the missing modules. /usr/bin/perl install-module.pl –all (7) Edit the localconfig nano localconfig You will need to set the following values: 4 Line 29: set $webservergroup to www-data Line 67: set $db_pass to the password for the bugs user you created in MySQL a few steps ago (8) Run the checksetup.pl again ./checksetup.pl (9) Test ./testserver.pl http://bt.sns.com/ (10) Config Bugzilla Once you have worked out how to access your Bugzilla in a graphical web browser, bring up the front page, click Log In in the header, and log in as the admin user you defined in step 10. Click the Parameters link on the page it gives you, and set the following parameters in the Required Settings section: 5 urlbase: http://<servername>/ or http://<ip address>/ Click Save Changes at the bottom of the page. There are several ways to get Bugzilla to send email. The easiest is to use Gmail, so we do that here so you have it working. Visit https://gmail.com and create a new Gmail account for your Bugzilla to use. Then, open the Email section of the Parameters using the link in the left column, and set the following parameter values: 1 mail_delivery_method: SMTP 2 mailfrom: new_gmail_address@gmail.com 3 smtpserver: smtp.gmail.com:465 4 smtp_username: new_gmail_address@gmail.com 5 smtp_password: new_gmail_password 6 smtp_ssl: On Click Save Changes at the bottom of the page. And you're all ready to go. :-)

?

總結

以上是生活随笔為你收集整理的reviewboard--ubuntu安装reviewboard的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。