1.安装mysql
2.安装rvm
3.安装ruby
4.安装rails
5.在安装redmine目录下用gem安装依赖包
二 配置
1.创建数据库
2.配置~/redmine/config/database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: my_password
encoding: utf8
3.配置邮件功能~/redmine/config/configuration.yml
configuration
email_delivery:
delivery_method: :sendmail
4.配置postfix
sudo vim /etc/postfix/sasl_passwd 添加 smtp邮箱服务器:端口 邮箱地址:密码
sudo postmap /etc/postfix/sasl_passwd 保存密码
sudo cp /etc/postfix/main.cf /etc/postfix/main.cf.orig 复制main.cf.orig配置文件 并改名为main.cf
修改main.cf.orig配置
# Minimum Postfix-specific configurations.
mydomain_fallback = localhost
mail_owner = _postfix
setgid_group = _postdrop
relayhost = smtp.exmail.qq.com:25
# Enable SASL authentication in the Postfix SMTP client.
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
# Enable Transport Layer Security (TLS), i.e. SSL.
smtp_use_tls = yes
smtp_tls_security_level = encrypt
#tls_random_source = dev:/dev/urandom
sudo postfix start
sudo postfix reload
date | mail -s test youremailaddress@yourdomain.com
参考:
https://ruby-china.org/wiki/install_ruby_guide
http://www.redmine.org/projects/redmine/wiki/RedmineInstall
nginx配置(/usr/local/nginx/conf/nginx.conf):
worker_processes 2;
events {
worker_connections 1024;
}
http {
passenger_root /Users/fengfang/.rvm/gems/ruby-2.3.0/gems/passenger-5.0.30;
passenger_ruby /Users/fengfang/.rvm/wrappers/ruby-2.3.0/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
client_max_body_size 500M;
server_name localhost;
root /Users/fengfang/redmine-3.3.0/public;
passenger_enabled on;
rails_env production;
}
}