1.修改redmine运行参数
Vim /var/www/html/redmine/config/environment.rb(增加以下内容)
ENV[‘RAILS_ENV‘] ||= ‘production‘
2.重命名CGI文件
Cd /var/www/html/redmine/public
mvdispatch.fcgi.example dispatch.fcgi
mvhtaccess.fcgi.example htaccess.fcgi
3.安装passenger(使用gem安装即可)
gem install passenger
4.安装passenger的Apache模块(确保httpd-devel安装)
依赖关系包:yum install libcurl*
passenger-install-apache2-module
回车即可
回车开始安装
5.配置Apache
安装完成passenger会提示把这段话放到vim /etc/httpd/conf.d/passenger.conf中
6.创建redmine CGI 软连接到Apache根目录下
ln -s /mnt/redmine/public/ /var/www/html/redmine
切记一定要把/public指定到/var/www/html/redmine 并不是指定整个redmine
Vim /etc/httpd/conf/httpd.conf(添加以下内容)
RailsEnv production
RailsBaseURI /redmine
<directory"/var/www/html/redmine">
OptionsIndexes MultiViews FollowSymLinks ExecCGI
Orderallow,deny
Allowfrom all
AllowOverride all
</directory>
7.重启Apache
[[email protected] ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
8.游览器测试访问