CentOS安装ReviewBoard记录

一、安装Apache
1.#yum install httpd
2. #systemctl enable httpd.service (开机自启动httpd)
3. #yum install mod_wsgi (Python网关接口模块)
如果安装好的mod_wsgi后,有/etc/httpd/conf.modules.d/10.wsgi.conf文件,就不需要做 额外配置;
否则需要在/etc/httpd/conf/httpd.conf中插入

LoadModule wsgi_module modules/mod_wsgi.so

4 #service httpd restart (重启,访问localhost验证结果)

二、安装MySQL(或mariadb,mysql增强版)

  1. #yum install MySQL mysql-devel mysql-server
    (mysql:mysql客户端,mysql-devel:mysql开发库,mysql-server:mysql服务端)或
#yum install mariadb mariadb-devel mariadb-server
  1. #systemctl enable mysqld.service(或mariadb.service) (开机自启动mysql或mariadb)
  2. #service mysqld(mariadb) start (启动服务)
  3. 连接mysql验证结果
(初始root密码为空)
[root@localhost ~]# /usr/bin/mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.52-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]> 

三、安装Python
1. #yum install python-setuptools (easy_install简易Python安装工具)
2. #yum install python-devel (Python开发库)

四、安装Reviewboard所需依赖
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

五. 配置mysql

sudo vim /etc/my.cnf
# 加入如下配置
[client]
default-character-set=utf8

[mysqld]
character-set-server=utf8
mysql -u root -p
mysql> CREATE DATABASE reviewboard CHARACTER SET utf8;
mysql> CREATE USER 'reviewboard'@'localhost' IDENTIFIED BY 'reviewboard';
mysql> GRANT ALL PRIVILEGES ON reviewboard.* to 'reviewboard'@'localhost';
mysql> quit

熟悉mysql基本命令如

show databases;
show tables;
use reviewboard;
//由于我多次执行了添加用户操作导致,用户名存在无法添加用户
MariaDB [mysql]> CREATE USER 'reviewboard'@'localhost' IDENTIFIED BY 'reviewboard';
ERROR 1396 (HY000): Operation CREATE USER failed for 'reviewboard'@'localhost'

//删除该用户重新添加即可,执行如下命令
use mysql;
delete from user where User = 'reviewboard';

六。创建站点,需要确定reviewboard站点存储位置,例如为/var/www/reviewboard,注意这个目录当前不应当存在

sudo rb-site install /var/www/html/reviewboard
Domain Name: 192.168.1.249(假设本机ip作为web站点,最好使用域名)
Root Path [/]: (回车)
Database Type: 1
Database Name [reviewboard]: (reviewboard的数据库名,回车)
Database Server [localhost]: (回车)
Database Username: reviewboard(数据库用户名)
Database Password: reviewboard(数据库用户密码)
Confirm Database Password:reviewboard
Memcache Server [localhost:11211/]: (回车)
Username [admin]: admin(管理员名称)
Password: 123456(管理员登陆密码)
Confirm Password :123456 
E-Mail Address: yours@email.com.cn(邮箱地址)
Company/Organization Name (optional):(公司名,可选填,回车即可)
Allow us to collect support data? [Y/n]: n

执行成功后提示如下:


OK
Setting up support ... OK


* The site has been installed

    The site has been installed in /var/www/html/reviewboard

    Sample configuration files for web servers and cron are available
    in the conf/ directory.

    You need to modify the ownership of the following directories and
    their contents to be owned by the web server:
        * /var/www/html/reviewboard/htdocs/media/uploaded
        * /var/www/html/reviewboard/htdocs/media/ext
        * /var/www/html/reviewboard/htdocs/static/ext
        * /var/www/html/reviewboard/data

    For more information, visit:

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


* Get more out of Review Board

    To enable PDF document review, enhanced scalability, GitHub
    Enterprise support, and more, download Power Pack at:

    https://www.reviewboard.org/powerpack/

    Your install key for Power Pack is:
    d9f69d3fb619cb929b194717e6719d39e1ca79d0

    Support contracts for Review Board are also available:

    https://www.beanbaginc.com/support/contracts/

七。配置站点

sudo chown -R apache:apache /var/www/html/reviewboard/htdocs/media/uploaded
sudo chown -R apache:apache /var/www/html/reviewboard/data
sudo chown -R apache:apache /var/www/html/reviewboard/htdocs/media/ext
sudo chown -R apache:apache /var/www/html/reviewboard/htdocs/static/ext
sudo cp /var/www/html/reviewboard/conf/apache-wsgi.conf /etc/httpd/conf.d/reviewboard.conf
# 重启服务
sudo service httpd restart

八。其他设置

# 假如有selinux和iptables
sudo setenforce 0
sudo /sbin/iptables -I INPUT -p tcp –dport 80-j ACCEPT
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值