1. Redmine部署到本机。
(1)安装ruby环境。
curl -L https://get.rvm.io | bash
source /etc/profile.d/rvm.sh
rvm list known
rvm install 2.2
(2)安装mariadb
yum install mariadb mariadb* -y
(3)安装Redmine
下载redmine-3.1.1,解压,并放入/opt目录
cd /opt/redmine-3.1.1/config
bundle install (可能会出现依赖缺失的错误,使用yum安装依赖即可)
数据库配置和redmine剩余配置参照http://www.redmine.org.cn/index.php/news/v_16_34.html
(4)Apache配置(重点)
yum -y install httpd
/bin/systemctl restart httpd.service
浏览器地址栏输入localhost,应该能看到测试页面。
cd /opt/redmine-3.1.1/public
cp dispatch.fcgi.example dispatch.fcgi
cp htaccess.fcgi.example htaccess.fcgi
chmod 755 dispatch.fcgi
cd /etc/httpd/conf.d
新建redmine.conf,内容如下:
LoadModule passenger_module /home/richard/.rvm/gems/ruby-2.2.3/gems/passenger-5.0.20/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/richard/.rvm/gems/ruby-2.2.3/gems/passenger-5.0.20
PassengerDefaultRuby /home/richard/.rvm/gems/ruby-2.2.3/wrappers/ruby
</IfModule>
<VirtualHost *:3000>
ServerName 192.168.3.200
DocumentRoot /opt/redmine-3.1.1/public
ErrorLog "/opt/redmine-3.1.1/wwwlogs/error.log"
CustomLog "/opt/redmine-3.1.1/wwwlogs/access.log" common
<Directory /opt/redmine-3.1.1/public>
Options FollowSymlinks
AllowOverride none
Require all granted
</Directory>
</VirtualHost>
vim /etc/httpd/conf/httpd.conf
添加一行:Listen 192.168.3.200:3000
/bin/systemctl restart httpd.service