代码审查-Linux安装与配置Review Board

简介

  • 代码审查不必如此困难
  • Review Board让你消除代码审查的痛点,节省你的时间,金钱,头脑,让你更关注创造伟大的软件
  • 代码审查是敏捷开发重要内容
  • Review Board 是一个基于Web的代码审查工具
  • 用户可以异步审查代码
  • 支持pre-review与post-review
  • 支持常用版本管理工具SVN, Git
  • 支持Apache与lighttpd
  • 支持REST接口

官方网站

https://www.reviewboard.org/

代码审查-Linux安装与配置Review Board_第1张图片
image.png


推荐使用bitnami一键安装

https://bitnami.com/stack/reviewboard


安装环境

  1. CentOS 6.5 64位
  2. Python 2.6.6
  3. MySQL 5.6
  4. Apache

安装过程

  1. yum install ReviewBoard
  2. yum install python-setuptools
  3. yum install python-devel
  4. yum install memcached
  5. easy_install python-memcached (pip install ReviewBoard)
  6. yum install patch
  7. easy_install ReviewBoard(pip install ReviewBoard)
  8. easy_install mysql-python(pip install mysql-python)
  9. yum install subversion
  10. yum install pysvn

创建Review Board站点

  1. 创建MySql数据库,使用UTF-8编码
  2. 开始安装,按提示输入相关配置信息,后面可以在/var/www/reviews.game4f.cn/conf/ settings_local.py修改
$rb-site install /var/www/reviews
  1. 修改权限
  $ chown -R apache /var/www/reviews/htdocs/media/uploaded
  $ chown -R apache /var/www/reviews/data
  1. 拷贝apache-wsgi.conf
$cp /var/www/reviews/conf/apache-wsgi.conf /etc/httpd/conf.d/
  1. 重启httpd服务
$service httpd restart
  1. 浏览器输入"http://120.25.91.146/" 就可以访问

安装失败,错误处理

  • 执行 easy_install ReviewBoard 提示失败1
$ easy_install ReviewBoard
代码审查-Linux安装与配置Review Board_第2张图片
没有libffi包
  • 安装libffi-devel
yum install libffi-devel
代码审查-Linux安装与配置Review Board_第3张图片
安装libffi-devel
  • 执行 easy_install ReviewBoard 提示失败2


    代码审查-Linux安装与配置Review Board_第4张图片
    缺openssl
  • 安装安装openssl-devel

yum install openssl-devel
代码审查-Linux安装与配置Review Board_第5张图片
安装openssl-devel
  • http访问失败Bad Request (400)

solution is: /var/www/reviews/conf/settings_local.py

ALLOWED_HOSTS = ['localhost'] to
ALLOWED_HOSTS = ['*'].
Hi All,I have installed reviewboard on a remote machine(Ubuntu with root user).During installation I followed all the steps mentioned on reviewboard site.I used most of configuration default, i mean localhost. But afterinstallation and disabling 000-default site, when I am trying to accessreviewboard url, Its always displayingBad Request (400) message. Now I am very confused why its happening. I amsearching solution for last 3 days, but still could not find anything.If any body have any Idea about it, Please help.Thanks
http://reviewboard.narkive.com/d6b4IHSH/review-board-installation-bad-request-400

  • 修改setting_local.py文件
\\\\\\\\#修改前
\\\\\\\\#ALLOWED_HOSTS = ['reviews.game4f.cn']
\\\\\\\\#修改后
ALLOWED_HOSTS = ['*']
  • 重启httpd
service httpd restart

配置svn

  • 终于安装成功了
代码审查-Linux安装与配置Review Board_第6张图片
reviewboard
  • 在国内不能使用gravatar,可以在设置里面关闭
    http://120.25.91.146:8418/admin/settings/general/
代码审查-Linux安装与配置Review Board_第7张图片
关闭gravatar
  • 设置repository
代码审查-Linux安装与配置Review Board_第8张图片
svn repository
  • 通过svn提交记录创建review request
代码审查-Linux安装与配置Review Board_第9张图片
review request
  • 编辑review,指定给相关人员
代码审查-Linux安装与配置Review Board_第10张图片
编辑review

参考

  • Review Board Manual Installing on Linux
  • Review Board Manual Creating a Review Board Site

你可能感兴趣的:(代码审查-Linux安装与配置Review Board)