CentOS安装ReviewBoard记录

前端之家收集整理的这篇文章主要介绍了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

猜你在找的CentOS相关文章