review board 安装和使用系列 ---(三)创建新的 Review Board 站点

来源:互联网 发布:网络信息化领导小组 编辑:程序博客网 时间:2024/05/23 00:04

============================================================
博文原创,转载请声明出处
电子咖啡(原id蓝岩)
============================================================
如果要使用review board,则需要创建以个rb站点,就像我们使用apache需要为其建立站点一样,review board可以是一个域(domain),也可以是subdomain。

我们使用rb-site install命令来创建站点,在创建之前,我们需要新建目录来存放我们的site,比如,下面我们以 /var/www/reviews.example.com 为例来创建我们的站点。 如果路径不存在我们需要手动创建(文档上说是rb-site install可以自动创建,但我试过了不行)。

在创建站点之前,保证我们上一篇review board 安装和使用系列 ---(一)RB简介等依赖包,软件已经全部安装。否则安装不成功。

在命令行输入

$ rb-site install /var/www/reviews.example.com

紧接着你会被问道很多的配置问题,比如数据库的选择,web服务器的选择,如果你已经安装的软件在选择时候并没有提示你选择,则有可能是你软件安装或者配置不成功,请重新检查。

安装过程中会让你输入site的域名以及管理员的用户名,密码,请牢记。

安装成功会有以下提示信息:

The site has been installed    The site has been installed in /var/www/reviews.example.com    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/reviews.example.com/htdocs/media/uploaded        * /var/www/reviews.example.com/data    For more information, visit:    http://www.reviewboard.org/docs/manual/dev/admin/sites/creating-    sites/

创建成功后还需要进行一些配置。

修改权限:

因为rb需要在sitedir/htdocs/media/uploaded 和 sitedir/data 等其他目录读写文件,因此需要修改权限,命令如下:

$ chown -R www-data /var/www/reviews.example.com/htdocs/media/uploaded$ chown -R www-data /var/www/reviews.example.com/data

配置web:

请参考以下文档来找到你对应的配置文件路径

There are two possible Apache configuration files that will be generated, depending on whether you selected mod_wsgi, mod_python or fastcgi during rb-site install.If you selected mod_wsgi, your configuration file will be conf/apache-wsgi.conf.If you selected mod_python, your configuration file will be conf/apache-modpython.conf.If you selected fastcgi, your configuration file will be conf/apache-fastcgi.conf.Depending on your operating system or Linux distribution, the configuration file can be installed in a couple different ways.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-enabled directory. This is the most common setup on Debian or Ubuntu-based distributions.


在配置目录下执行以下命令:

$ 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 .

好了,大功告成,输入ubuntu的网址,会出现reivew board的登陆界面,开始你的rb之旅吧,后面我还会介绍一些rb工具的使用盒服务器的相关配置,可以参考一下。

另外创建site的过程中,会又各种各样的问题,请google之



原创粉丝点击