apt-get install ruby-devel rdocgem
apt-get install gemsまたは
cd /usr/local/src wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz tar -xvzf rubygems-0.9.0.tgz cd rubygems-0.9.0 ruby setup.rbruby-postgres
cd /usr/local/src wget http://ruby.scripting.ca/postgres/archive/ruby-postgres-20050407.tar.gz tar -xvzf ruby-postgres-20050407.tar.gz cd ruby-postgres ruby extconf.rb make make installrails
gem install rails --include-dependencies下記エラー出たらもういちどやりなおす。
Bulk updating Gem source index for: http://gems.rubyforge.org ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find rails (> 0) in any repository
趣味で入れる 設定ファイルをUTF-8にしとくとよい http://prdownloads.sourceforge.net/phppgadmin/phpP...
cd /var/lib/gems/1.8/gems/activerecord-2.0.2/test createdb -U postgres -E utf8 activerecord_unittest createdb -U postgres -E utf8 activerecord_unittest2 psql -f fixtures/db_definitions/postgresql.sql activerecord_unittest psql -f fixtures/db_definitions/postgresql.sql activerecord_unittest2 ruby -rubygems -I "connections/native_postgresql" base_test.rb
http://mongrel.rubyforge.org/
gem install mongrel --include-dependenciesserver start
mongrel_rails start -d オプション mongrel_rails start -d -p 8001 -e deveropment -P log/mongrel-1.pidserver stop
mongrel_rails stop
http://d.hatena.ne.jp/drawnboy/20060613/1150170093
httpd.conf
gem install mongrel_cluster --include-dependencies初期設定
mongrel_rails cluster::configure -e production -p 3005 -N 2起動
mongrel_rails cluster::start停止
mongrel_rails cluster::stop
httpd.conf
<Proxy balancer://net> BalancerMember http://127.0.0.1:3005 loadfactor=10 BalancerMember http://127.0.0.1:3006 loadfactor=10 BalancerMember http://127.0.0.1:3007 loadfactor=10 </Proxy> NameVirtualHost *:* <VirtualHost *:*> ServerName hoge.example.com AddDefaultCharset utf-8 </VirtualHost> <VirtualHost *:*> ServerName fuga.example.com ProxyPass / balancer://net/ ProxyPassReverse / balancer://net/ AddDefaultCharset utf-8 </VirtualHost>
<VirtualHost *.*> ServerName fuga.example.com ProxyPass / balancer://net/ ProxyPassReverse / balancer://net/ AddDefaultCharset utf-8 <Location /> AuthName RequireUser AuthType Basic AuthUserFile /usr/local/apache2/fuga.passwd Require user hoge </Location> </VirtualHost>
コメントをかく