您的位置:首页 > 运维架构 > Linux

在Centos上安装代码评审工具ReviewBoard的相关支持插件点滴(第二篇)

2015-11-11 14:59 597 查看

因为这个codereview的数据是要安装到数据库中,所以先要配置数据库:

1 设置编码集
[client] default-character-set=utf8

上面这段红色,亲测非必须
[mysqld] character-set-server=utf8

2 创建数据库

$ mysql -u root -p mysql> CREATE DATABASE reviewboard CHARACTER SET utf8; mysql> CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypassword'; mysql> GRANT ALL PRIVILEGES ON reviewboard.* to 'myuser'@'localhost';
个人建议,就使用root账号进行替换

开始安装:
rb-site install /var/www/reviews.example.com
里面会有一系列配置,能用默认的就不要修改,尽量选推荐的。注意两点,数据库连接提示的时候,请填127.0.1.1,默认是localhost,另外就就是应用服务器选中apache

应用服务器配置:
找到httpd.conf,在最后面追加这样一段
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><VirtualHost *:80>
        ServerName demo.codereview.com
        DocumentRoot "/var/www/reviews.example.com/htdocs"
        # Error handlers
        ErrorDocument 500 /errordocs/500.html
        WSGIPassAuthorization On
        WSGIScriptAlias "/" "/var/www/reviews.example.com/htdocs/reviewboard.wsgi/"
        <Directory "/var/www/reviews.example.com/htdocs">
                AllowOverride All
                Options -Indexes +FollowSymLinks
                Allow from all
        </Directory>
        # Prevent the server from processing or allowing the rendering of
        # certain file types.
        <Location "/media/uploaded">
                SetHandler None
                Options None
                AddType text/plain .html .htm .shtml .php .php3 .php4 .php5 .phps .asp
                AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht .jsp .sh .rb
                <IfModule mod_php5.c>
                        php_flag engine off
                </IfModule>
        </Location>
        # Alias static media requests to filesystem
        Alias /media "/var/www/reviews.example.com/htdocs/media"
        Alias /static "/var/www/reviews.example.com/htdocs/static"
        Alias /errordocs "/var/www/reviews.example.com/htdocs/errordocs"
        Alias /favicon.ico "/var/www/reviews.example.com/htdocs/static/rb/images/favicon.png"
</VirtualHost>

完了之后,重启apache service httpd restart
有可能还会提未文件权限访问问题,不要怕,跟据提示,执行一下就OK了。基本就是开放apache去读写 reviews.exaple.com下面的数据。大功告成。
参考的官网地址:https://www.reviewboard.org/docs/manual/2.0/admin/installation/linux/

https://www.reviewboard.org/docs/manual/2.0/admin/installation/creating-sites/#creating-sites

 

https://www.reviewboard.org/docs/manual/2.0/admin/installation/linux/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐