Skip to content

A simple recipe for building an nginx + passenger RPM for CentOS.

License

Notifications You must be signed in to change notification settings

Kyruus/nginx-passenger-centos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Recipe for an Nginx + Passenger RPM on CentOS

A simplified/revised version of swhitt's centos-apache-passenger, which is similar to jnstq's rails-nginx-passenger-ubuntu recipe but for Nginx + Passenger on CentOS. Also influenced by the deploy scripts used by EngineYard Solo.

Perform the following on a build box as root.

Create an RPM Build Environment

yum install rpmdevtools
rpmdev-setuptree

Install Prerequisites for Nginx + Passenger RPM Creation

yum groupinstall 'Development Tools'
yum install ruby-devel openssl-devel zlib-devel pcre-devel libcurl-devel rubygems git
gem install passenger -v 4.0.36

Hereafter, this process assumes that passenger-config --root returns a usable value for the location of Passenger's installed files. The RPM will build nginx-specific extensions for Passenger (by running rake nginx in Passenger's main directory) and will compile against the module in Passenger's ext/nginx/ directory.

Passenger's ext/nginx/HelperServer file is dynamically linked and must be present at runtime for the nginx integration to work correctly.

Download Nginx

cd ~/rpmbuild
curl http://nginx.org/download/nginx-1.5.9.tar.gz -o SOURCES/nginx-1.5.9.tar.gz

Get Necessary System-specific Configs

cd /tmp
git clone git://github.com/Kyruus/nginx-passenger-centos.git
cp nginx-passenger-centos/{init,conf,patches}/* ~/rpmbuild/SOURCES/
cp nginx-passenger-centos/spec/nginx-passenger.spec ~/rpmbuild/SPECS/

Build the RPM

cd ~/rpmbuild/
rpmbuild -ba SPECS/nginx-passenger.spec

The resulting RPM will be:

~/rpmbuild/RPMS/x86_64/nginx-passenger-1.5.9+4.0.36-2.x86_64.rpm

About

A simple recipe for building an nginx + passenger RPM for CentOS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published