CentOS Linux 安装 Redmine
jopen
12年前
yum install openssl openssl-dev
tar zxf ruby-1.8.7.tar.gz cd ruby-1.8.7 ./configure make make install ruby -v
tar zxf rubygems-1.8.24.tgz cd rubygems-1.8.24 ruby setup.rb
gem install rails -v=2.3.5 gem install rack -v=1.0.1 gem install rake -v=0.8.7 gem install mysql gem install tlsmail
create database redmine character set utf8; grant all privileges on redmine.* to 'redmine'@'localhost' identified by '123456';
# vim /opt/redmine-1.2.1/config/database.yml # MySQL (default setup). Versions 4.1 and 5.0 are recommended. # # Get the fast C bindings: # gem install mysql # (on OS X: gem install mysql -- --include=/usr/local/lib) # And be sure to use new-style password hashing: # http://dev.mysql.com/doc/refman/5.0/en/old-client.html production: adapter: mysql database: redmine host: localhost port: 3306 username: redmine password: 123456 encoding: utf8
cd /opt/redmine-1.2.1 rake generate_session_store RAILS_ENV=production rake db:migrate RAILS_ENV=production rake redmine:load_default_data mkdir tmp public/plugin_assets sudo chown -R redmine:redmine files log tmp public/plugin_assets sudo chmod -R 755 files log tmp public/plugin_assets
cd /opt/redmine-1.2.1 ruby script/server webrick -e production -p 3002 &
此时可以通过 http://127.0.0.1:3002 来访问 redmine 了
- redmine 邮件配置
# vim /opt/redmine-1.2.1/config/email.yml # Outgoing email settings production: delivery_method: :async_smtp smtp_settings: enable_starttls_auto: true address: smtp.gmail.com port: 587 domain: gmail.com authentication: :login user_name: ping.bao.cn@gmail.com password: redmine123456 tls: true
- 对于gmail启用了ssl的情况下,需要修改如下配置
# Gmail tls_mail Trouble Shootting ...... cd /usr/local/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/ cp * /opt/redmine-1.2.1/lib/redmine/ -r vim /opt/redmine-1.2.1/lib/redmine/net/smtp.rb class SMTP Revision = %q$Revision: 10709 $.split[1] # The default SMTP port, port 25. def SMTP.default_port 25 end @use_tls = true @verify = nil @certs = nil def SMTP.enable_tls(verify = OpenSSL::SSL::VERIFY_PEER, certs = nil) @use_tls = true @verify = verify @certs = certs end def initialize(address, port = nil) @address = address @port = (port || SMTP.default_port) @esmtp = true @socket = nil @started = false @open_timeout = 30 @read_timeout = 60 @error_occured = false @debug_output = nil @use_tls = SMTP.use_tls? @certs = SMTP.certs @verify = SMTP.verify end