unicorn
起動
bundle exec unicorn_rails -c config/unicorn.rb
unicorn_rails -c /var/www/rails/(アプリの名前)/config/unicorn.conf.rb -D -E production
状態確認
ps -ef | grep unicorn | grep -v grep
mysql
起動
sudo service mysqld start
production環境でのDB削除
RAILS_ENV=production DISABLE_DATABASE_ENVIRONMENT_CHECK=1 bundle exec rake db:drop
接続
mysql -h エンドポイント -P 3306 -u root -p
DBの文字コードチェック
show variables like "chara%";
nignx
再起動
sudo nginx -s reload
vimコマンド
強制書き込み
$ sudo vim <ファイル名>
:w !sudo tee %
:q!
プリコンパイル
bundle exec rake assets:precompile RAILS_ENV=production