是不是要写个 shell 脚本
export RAILS_ENV=production rails s
https://github.com/gitlabhq/gitlabhq/blob/master/lib/support/init.d/gitlab 参考一下 gitlab
Download the init script (will be /etc/init.d/gitlab):
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
And if you are installing with a non-default folder or user copy and edit the defaults file:
sudo cp lib/support/init.d/gitlab.default.example /etc/default/gitlab
If you installed GitLab in another directory or as a user other than the default you should change these settings in /etc/default/gitlab. Do not edit `/etc/init.d/gitlab as it will be changed on upgrade.
Make GitLab start on boot:
sudo update-rc.d gitlab defaults 21
LoadModule passenger_module modules/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21 PassengerRuby /usr/bin/ruby 换了 passenger,明显比 webrick 快多了 thin 和 rainbow 相对 passenger 有什么优势吗?
gem install rainbows WARNING: RubyGems 1.2+ index not found for:
RubyGems will revert to legacy indexes degrading performance. ERROR: Could not find a valid gem 'rainbows' (>= 0) in any repository