Using apache + mongrel + rails in Fedora9 to easily set up ROR applications

Source: Internet
Author: User
Environment: Fedora91. install ruby [root @ www ~] # Yuminstallruby *-y2. update ruby [root @ www ~] # Gemupdate -- system [root @ www ~] # Gemupdate3.installRailsanddependencies [root @ www ~] Geminstallrails-inc

Environment: Fedora 9

1. Install ruby

[Root @ www ~] # Yum install ruby *-y

2. Update ruby

[Root @ www ~] # Gem update -- system
[Root @ www ~] # Gem update

3. install Rails and dependencies

[Root @ www ~] Gem install rails-include-dependencies

4. Install common gem packages

[Root @ www ~] # Gem install ruby-debug-base sqlite3-ruby
Successfully installed ruby-debug-0.10.2
Building native extensions. This cocould take a while...
Successfully installed ruby-debug-base-0.10.2
Building native extensions. This cocould take a while...
Successfully installed sqlite3-ruby-1.2.4

3 gems installed

Installing ri documentation for ruby-debugging-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-debugging-base-0.10.2...
Installing RDoc documentation for sqlite3-ruby-1.2.4...
[Root @ www ~] #

5. install Mongrel
Method 4

[Root @ www ~] # Gem install mongrel

6. If you are using mysql, you may need to perform the following operations:

[Root @ www ~] # Yum install mysql *
[Root @ www ~] # Gem install mysql

7. install and configure Apache

[Root @ www ~] Yum install httpd

Create/etc/httpd/conf. d/rails. conf as follows:

Listen 8080.

ProxyRequests Off

Balancermemberhttp: // 127.0.0.1: 3001
Balancermemberhttp: // 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

 

ServerName www.laiyunqing.com: 8080
DocumentRoot/var/www/beeblio/public
ProxyPass/image!
ProxyPass/stylesheets!
ProxyPass/javascripts!
ProxyPass/balancer: // myCluster/
ProxyPassReverse/balancer: // myCluster/
ProxyPreserveHost on


Then start mongrel on port 3001,300 2... 3005.

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. Restart apache and enter http: // localhost: 8080 in the address bar. Is this the job now?

[Root @ www ~] Service httpd restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.