May 26

centos 安装 daemontools 不指定

felix021 @ 2017-5-26 00:10 [随想] 评论(0) , 引用(0) , 阅读(10290) | Via 本站原创
09年在B公司实习的时候从运维同学偷师知道了daemontools这个package,有个supervise命令特别好用(很符合B公司当时宣传的“简单可依赖”),以前用ubuntu/debian,apt-get直接就装上了。现在线上用的是centos,需要自己编译安装,稍微麻烦点。具体的过程在官网 http://cr.yp.to/daemontools/install.html 说得还是比较详细了,不过编译的时候可能会报错
引用
./load envdir unix.a byte.a
/usr/bin/ld: errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS reference in envdir.o
/lib64/libc.so.6: could not read symbols: Bad value
collect2: error: ld returned 1 exit status

搜了一下,解决方案也很简单:
引用
The fix is quite simple: explicitly add #include <errno.h> to the offending file and then recompile.

按照说明,在 src/error.h 里面添加了这句再编译就通过了。
May 25
$ vi /config/environments/production.rb

注释掉 “config.action_mailer.delivery_method = :sendmail”,

并在下面添加
引用

  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true

  config.action_mailer.smtp_settings = {
      :address              => "smtp.exmail.qq.com",
      :port                => 465,
      :domain              => 'yourdomain.com',
      :user_name            => '发信帐号',
      :password            => '密码',
      :authentication      =>  'login',
      :enable_starttls_auto => true,
      :tls                  => true,
      :email_from          => '发信帐号'
  }
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]