mac+mysql+nginx+passsenger+ruby on rails+redmine+postfix配置

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;
  }
}





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值