Monday , December 10 2018
Trang chủ / Lập trình / Ruby / Phusion Passenger with Apache on RHEL 6 / CentOS 6 / SL 6 with SELinux

Phusion Passenger with Apache on RHEL 6 / CentOS 6 / SL 6 with SELinux

1. Require install Ruby, Gem before: Install Ruby 1.9.3 + RubyGems 1.8.7 + Rails 3.2.1 with libyaml on CentOS

2. Install ruby and passenger dependencies

1
yum -y install ruby zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel

3. Install and build a Passenger for Apache

1
2
gem install passenger
passenger-install-apache2-module

4. Create passenger.conf file in /etc/httpd/conf.d

1
2
3
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11
PassengerRuby /usr/bin/ruby

5. Create conf file for your Rails application

6. Temporarily go into SELinux permissive mode

1
setenforce 0

7. Restart Apache

1
service httpd restart

8. Start using your Rails application

9. Walk through SELinux log and generate new SELinux policy module

1
grep httpd /var/log/audit/audit.log | audit2allow -M passenger

10. Install newly created SELinux module

1
semodule -i passenger.pp

11. Switch SELinux back into enforcing mode

1
setenforce 1

I wish you success!

About admin

Check Also

[video] Hướng dẫn cài đặt Ruby trên Windows

Trong tutorial sẽ hướng dẫn các bạn biết cách cài đặt Ruby trên windows. Link …

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Đăng Ký Nhận Tin Qua Email

Nhận thông tin bổ ích về WordPress, Hosting, Thủ thuật website, Download miễn phí....và các phần quà hấp dẫn qua email.

* là bắt buộc