1、Apache2及依赖模块安装
sudo apt-get install apache2 libapache2-mod-passenger
2、MysqL安装
sudo apt-get install MysqL-serverMysqL-client
3、Redmine数据库建立
MysqL> create database redmine character set utf8;
MysqL> create user 'redmine'@'localhost' identified by '123456';
MysqL> flush privileges;
MysqL> exit;
4、Ruby安装
sudo apt-get install ruby-full
ruby -v
5、Rubygems安装
sudo apt-get install rubygems
gem -v
6、Railssudo apt-get install rails
rails -v
7、Redmine的MysqL 插件包安装
sudo apt-get install redmine-MysqL
8、Remine安装
sudo apt-get install redmine
9、运行Redmine
(1)Redmine默认安装目录为 /usr/share/redmine;
(2)检测有没有/usr/share/redmine/log/production.log文件,没有则按照目录建立;
(3)切换到目录/usr/share/redmine,运行命令:ruby script/rails server webrick -e production &;
(4)默认打开3000端口,可以通过http://localhost:3000/访问(管理员初始用户名和密码都是admin);
(5)Redmine作为服务运行,加上-d参数即可:ruby script/rails server webrick -e production –d;
(6)端口号修改通过修改redmine/vendor/rails/railties/lib/commands/servers.rb文件解决。
10、防火墙端口开放
sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT
sudo iptables -I INPUT 1 -i lo -j ACCEPT