CentOS Linux安装Redmine
安装 openssl 环境 www.zhishiwu.com
1
yum install openssl openssl-dev
安装 Ruby 环境
1
tar zxf ruby-1.8.7.tar.gz
2
cd ruby-1.8.7
3
./configure
4
make
5
make install
6
ruby -v
安装 rubygems 环境
1
tar zxf rubygems-1.8.24.tgz
2
cd rubygems-1.8.24
3
ruby setup.rb
在线安装 rails 及 rack 环境
1
gem install rails -v=2.3.5
2
gem install rack -v=1.0.1
3
gem install rake -v=0.8.7
4
gem install mysql
5
gem install tlsmail
安装 新建 Mysql 帐号
1
create database redmine character set utf8;
2
grant all privileges on redmine.* to 'redmine'@'localhost' identified by '123456';
配置数据连接
01
# vim /opt/redmine-1.2.1/config/database.yml
02
03
# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
04
#
05
# Get the fast C bindings:
06
# gem install mysql
07
# (on OS X: gem install mysql -- --include=/usr/local/lib)
08
# And be sure to use new-style password hashing:
09
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
10
11
production:
12
adapter: mysql
13
database: redmine
14
host: localhost
15
port: 3306
16
username: redmine
17
password: 123456
18
encoding: utf8<span></span>
安装
1
cd /opt/redmine-1.2.1
2
rake generate_session_store
3
RAILS_ENV=production rake db:migrate
4
RAILS_ENV=production rake redmine:load_default_data
5
6
mkdir tmp public/plugin_assets
7
sudo chown -R redmine:redmine files log tmp public/plugin_assets
8
sudo chmod -R 755 files log tmp public/plugin_assets
启动
1
cd /opt/redmine-1.2.1
2
ruby script/server webrick -e production -p 3002 &
此时可以通过 http://127.0.0.1:3002 来访问 redmine 了
redmine 邮件配置
01
# vim /opt/redmine-1.2.1/config/email.yml
02
03
# Outgoing email settings
04
production:
05
delivery_method: :async_smtp
06
smtp_settings:
07
enable_starttls_auto: true
08
address: smtp.gmail.com
09
port: 587
10
domain: gmail.com
11
authentication: :login
12
user_name: ping.bao.cn@gmail.com
13
password: redmine123456
14
tls: true
对于gmail启用了ssl的情况下,需要修改如下配置
01
# Gmail tls_mail Trouble Shootting ......
02
03
cd /usr/local/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/
04
cp * /opt/redmine-1.2.1/lib/redmine/ -r
05
vim /opt/redmine-1.2.1/lib/redmine/net/smtp.rb
06
07
class SMTP
08
09
Revision = %q$Revision: 10709 $.split[1]
10
11
# The default SMTP port, port 25.
12
def SMTP.default_port
13
25
14
end
15
16
@use_tls = true
17
@verify = nil
18
@certs = nil
19
20
def SMTP.enable_tls(verify = OpenSSL::SSL::VERIFY_PEER, certs = nil)
21
@use_tls = true
22
@verify = verify
23
@certs = certs
24
end
25
26
def initialize(address, port = nil)
27
@address = address
28
@port = (port || SMTP.default_port)
29
@esmtp = true
30
@socket = nil
31
@started = false
32
@open_timeout = 30
33
@read_timeout = 60
34
@error_occured = false
35
@debug_output = nil
36
@use_tls = SMTP.use_tls?
37
@certs = SMTP.certs
38
@verify = SMTP.verify
39
end