linux+python+django+reviewboard

来源:互联网 发布:硬盘分区不破坏数据 编辑:程序博客网 时间:2024/05/15 02:31

system:

linux: centos: 6.4


0. install :

http://www.reviewboard.org/docs/manual/1.7/admin/installation/linux/


1.
yum install python-setuptools python-devel


2. add epel source file epel-release-6-8.noarch [14 KiB]

from: http://mirrors.hustunique.com/epel/6/i386/repoview/epel-release.html


3. yum install ReviewBoard


4. install apache

yum install httpd httpd-devel


5. install sql:

yum install mysql mysql-server mysql-develsudo service mysqld start###创建数据库、数据库用户for ReviewBoard(这块要注意数据库的字符集设置,默认是UTF-8,如果你要用其他中文字符编码标准,这里就需要显式指定,查查mysql的Manual吧)mysql -u root -p  /* 用root用户登录 */mysql> create database reviewboard;Query OK, 1 row affected (0.00 sec)mysql> create user 'reviewboard'@'localhost' identified by 'reviewboard';  /* 前一个reviewboard是访问数据库的用户名,后一个reviewboard是密码 */Query OK, 0 rows affected (0.00 sec)mysql> grant all on reviewboard.* to 'reviewboard'@'localhost';  /* 前一个reviewboard是数据库的名字,而后一个reviewboard则是访问数据库的用户名 */Query OK, 0 rows affected (0.00 sec)mysql> exit 

or:

 easy_install psycopg2

psql - postgrescreate user abc with password 'abc';create database reviewboard owner abc;grant all privileges on reviewboard to abc;



6. configure apache.

If you have a sites-available directory in your Apache configuration directory (for example, /etc/apache2/sites-available, then you should rename your configuration file to match your site (e.g., reviews.example.com.conf) and put it in that directory. Then create a symbolic link from that file to the sites-enableddirectory. This is the most common setup on Debian or Ubuntu-based distributions. So for example:

$ cd /etc/apache2/sites-available$ cp /var/www/reviews.example.com/conf/apache-wsgi.conf reviews.example.com.conf$ cd ../sites-enabled$ ln -s ../sites-available/reviews.example.com.conf .

If you do not have a sites-available or sites-enabled directory, you’ll need to embed the configuration file in your global Apache configuration file (usually/etc/httpd/httpd.conf or /etc/httpd/apache2.conf).

/var/www/reviews.example.com/conf/apache-wsgi.conf
============ IMPORTANT ============ 

IF NO sites-available, In that case, you should do: manually copy content of /var/www/reviews.example.com/conf/apache.wsgi.conf and PASTE them into file: /etc/httpd/http.conf/.

then run /etc/init.d/httpd restart.

cp /var/www/reviews.example.com/conf/apache-wsgi.conf  /etc/httpd/conf.d/sudo service httpd restart


7. you should see your reviewboard website now.



原创粉丝点击