1. Install gem and passenger dependencies
yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel
2. 下载ruby,注意安装包的名字
mkdir downloads
cd ~/Downloads # YOUR FOLDER OF CHOICE
ftp ftp.ruby-lang.org
cd /pub/ruby
get ruby-1.8.7.pXXX.tar.gz
tar zxvf ruby-1.8.7.pXXX.tar.gz ruby-1.8.7.pXXX
cd ruby-1.8.7.pXXX
./configure
make
make install
ruby -v
which ruby
cd ..
3. 安装gems1.3.7
wget http://production.cf.rubygems.org/rubygems/rubygems-1.x.tgz
tar zxvf rubygems-1.x.tgz rubygems-1.x
cd rubygems-1.x
ruby setup.rb
gem -v
which gem
cd ..
4. 安装passenger
gem install passenger
passenger-install-apache2-module
5. 重启apache
service httpd restart
6. 下载redmine
wget http://rubyforge.org/frs/download.php/75097/redmine-1.2.1.tar.gz # GET LATEST VERSION ON RUBYFORGE
tar zxvf redmine-1.2.1.tar.gz
7. 拷贝文件到http根路径
进入/var/www/ 创建redmine文件夹.
mkdir redmine
回到/root/downloads/ 运行 cp -av redmine-1.2.1/* /var/www/redmine
8. 安装mysql
# wget http://download.mysql.cn/download_file/gz/5.0/mysql-5.0.22.tar.gz
# tar zxvf mysql-5.0.22.tar.gz
# cd mysql-5.0.22
# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data/ --without-innodb --without-debug --with-extra-charsets=gbk --with-extra-charsets=all --enable-assembler --with-pthread --enable-thread-safe-client --with-client-ldflags=-all-static
(如果出错缺少curses/xxx,yum -y install ncurses-devel)
# make && make install
9. 生成会话密钥
rake config/initializers/session_store.rb
如缺少rake,则要安装 gem install -v=0.4.2 i18n
10. 建表,初始化默认数据
rake db:migrate RAILS_ENV="production"
rake redmine:load_default_data RAILS_ENV="production"
如果缺少rack 1.1.0,则需要卸载rake 1.0.1,安装1.1.0
gem uninstall rack
gem install rack -v=1.1.0
11. 安装mongrel
gem install mongrel
启动服务
ruby script/server mongrel -e production
编辑iptables允许访问3000
vi /etc/sysconfig/iptables/
添加 -A RH-firewall-1-INPUT -m state --state NEW -m tcp -p --dport 3000 -j ACCEPT
重启iptables
/sbin/service iptables restart
12. lsof -i tcp:3000
查看pid
kill -9 pid
13. 配置邮件
14. 配置ad
15. 拷贝mysql data