- CentOS 6.4 64bit
- Nginx + Unicorn
- Ruby(RVM) + Rails
- Oracle Database XE 11.2
同一マシンでOracleを動かす
- How To Deploy Rails Apps Using Unicorn And Nginx on CentOS 6.5
- CentOS 6.4 に Oracle Database XE をインストール
Oracle の設定時、ポート8080が衝突するので8081に変更する。
ruby-oci8 gem のインストール(ビルド)前に LD_LIBRARY_PATH を設定する。
cat /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh >> .bash_profile
vi ~/.bash_profile
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
Nginxのメモ
chkconfig nginx on
Unicornのメモ
bundle exec unicorn_rails -c config/unicorn.rb -D
kill -QUIT `cat /var/www/my_app/pids/unicorn.pid`
kill -USR2
bundle exec rake assets:precompile RAILS_ENV=production
bundle exec unicorn_rails -c config/unicorn.rb -E production -D
tail -f /var/www/ora_demo/log/unicorn.log
ssl
vi /etc/nginx/conf.d/default.conf