64位centos6.2 安装 redmine 2.x

1.用root登录

2. 安装ruby with libyaml
下载最新版LibYAML
tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make && make install


下载最新版Ruby
cd bury
tar xzvf ruby-xxx.tar.gz
./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
make && make install


3. 安装 gem
下载最新版
tar xzvf rubygems-xxx.tgz
cd rubygems
ruby setup.ruby


4. 安装rake 和 rails
yum install ruby-devel ruby-irb ruby-rdoc ruby-ri curl-devel
gem install rake
gem install rdoc
gem install rails
gem install sqlite3-ruby
gem install bundler



5. nginx
下载最新版
yum install pcre-devel
tar xzvf nginx-xxx.tar.gz 
./configure --sbin-path=/usr/local/sbin --with-http_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module
make && make install
ln -s /usr/local/nginx/conf /etc/nginx
gem install passenger
passenger-install-nginx-module


6. PostgreSQL
[color=gray]
yum install postgresql postgresql-server postgresql-devel pg
service postgresql initdb
service postgresql start
su postgres
psql 
CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'redmine' NOINHERIT VALID UNTIL 'infinity';
CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;
\q
exit
[/color]

放弃PostgreSQL,换用MySQL

7. 安装redmine
下载最新版
教程
yum install ImageMagick ImageMagick-devel ImageMagick-c++-devel mysql-devel sqlite-devel
gem install rmagick
cd redmine
bundle install --without development test
gem install mysql2
rake generate_secret_token
RAILS_ENV=production rake db:migrate


执行上面最后一句,发现安装mysql后相应位置没有mysql.sock,于是加个链接
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock 


继续
RAILS_ENV=production rake redmine:load_default_data


添加用户组、用户及授权
groupadd redmine
useradd -g redmine redmine
chown -R redmine:redmine files log tmp public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets


测试
ruby script/rails server webrick -e production

如成功可通过 http://localhost:3000/ 访问

你可能感兴趣的:(redmine)