`
kevinye
  • 浏览: 37115 次
文章分类
社区版块
存档分类
最新评论

rails web server deploy guide

阅读更多
web server:

install ubuntu 64bit server edition

then:

################################
1.install necessary software:
################################
sudo apt-get install gcc g++ make

sudo apt-get install mysql-client-5.0

sudo apt-get install ruby ruby1.8-dev rdoc ri

sudo apt-get install libmysqlclient15-dev

sudo apt-get install subversion
sudo apt-get install memcached
sudo apt-get install rcconf      [optional]
sudo apt-get install openssl  libopenssl-ruby
sudo apt-get install iftop

################################
2.install necessary gems:
################################
get latest gem from rubyforge:
wget http://rubyforge.org/frs/download.php/56227/rubygems-1.3.3.tgz
tar zxf rubygems-1.3.3.tgz
cd rubygems-1.3.3
ruby setup.rb

sudo gem install mysql

sudo gem install mongrel mongrel_cluster
sudo gem sources -a http://gems.github.com/
sudo gem install starling-starling
sudo mkdir /var/spool/starling
cp attached file starling  as /etc/init.d and chmod+x  

################################
3.checkout code and config
################################
sudo vim /etc/profile
add line:
export RAILS_ENV="production"
export RAILS_ROOT = "/var/www/xxx/"

checkout code into /var/www/

use rcconf to config the run level of starling

config/database.yml config/workling.yml etc.

mongrel_rails cluster::configure -e production -d -p 8000 -N 10 -c /var/www/xxx

sudo cp /usr/lib/ruby/gems/1.8/gems/mongrel_cluster-1.0.5/resources/mongrel_cluster /etc/init.d/
sudo chmod +x /etc/init.d/mongrel_cluster
sudo /usr/sbin/update-rc.d -f mongrel_cluster defaults
  or use rcconf

or use god to monitor the mongrel proecesses:
sudo gem install god
see attached file: god.zip
  • god.zip (630 Bytes)
  • 下载次数: 1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics