1. 安装 ruby
- [root@www ~]# yum install ruby* -y
2. 更新ruby
- [root@www ~]# gem update --system
- [root@www ~]# gem update
- [root@www~]gem install rails –include-dependencies
- [root@www ~]# gem install ruby-debug ruby-debug-base sqlite3-ruby
- Successfully installed ruby-debug-0.10.2
- Building native extensions. This could take a while...
- Successfully installed ruby-debug-base-0.10.2
- Building native extensions. This could take a while...
- Successfully installed sqlite3-ruby-1.2.4
- 3 gems installed
- Installing ri documentation for ruby-debug-0.10.2...
- Installing ri documentation for ruby-debug-base-0.10.2...
- Installing ri documentation for sqlite3-ruby-1.2.4...
- Installing RDoc documentation for ruby-debug-0.10.2...
- Installing RDoc documentation for ruby-debug-base-0.10.2...
- Installing RDoc documentation for sqlite3-ruby-1.2.4...
- [root@www ~]#
方法同4
- [root@www ~]# gem install mongrel
- [root@www ~]# yum install mysql*
- [root@www ~]# gem install mysql
7. 安装 & 配置Apache
- [root@www~]yum install httpd
- Listen 8080
- ProxyRequests Off
- <Proxy balancer://myCluster>
- BalancerMember http://127.0.0.1:3001
- BalancerMember http://127.0.0.1:3002
- #BalancerMember http://127.0.0.1:3003
- #BalancerMember http://127.0.0.1:3004
- #BalancerMember http://127.0.0.1:3005
- </Proxy>
- <VirtualHost *:8080>
- ServerName www.laiyunqing.com:8080
- DocumentRoot /var/www/beeblio/public
- ProxyPass /image !
- ProxyPass /stylesheets !
- ProxyPass /javascripts !
- ProxyPass / balancer://myCluster/
- ProxyPassReverse / balancer://myCluster/
- ProxyPreserveHost on
- </VirtualHost>
mongrel_rails start -e production -p 3001 -d -c /var/www/beeblio/ -P /var/www/beeblio/log/mongrel-3001.pid
mongrel_rails start -e production -p 3001 -d -c /var/www/beeblio/ -P /var/www/beeblio/log/mongrel-3002.pid
...
8. 重启apache,试试地址栏中输入http://localhost:8080,该工作了吧?
- [root@www~]service httpd restart