随笔-35  评论-33  文章-0  trackbacks-0
因为这个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,在最后面追加这样一段
<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/


我的微信公众号,欢迎沟通学习。
posted on 2015-11-11 14:59 alexcai 阅读(3586) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: