Personal tools
You are here: Home Web Reverse Proxy And Cache Compiling EPEL Nginx 0.8.53 SRC.RPM with TLS SNI Support for CentOS 5

Compiling EPEL Nginx 0.8.53 SRC.RPM with TLS SNI Support for CentOS 5

When I first compiled Nginx with TLS SNI Extensions for CentOS v5.x the version in EPEL was not newer that 0.7.65.  Since the Nginx v0.6 branch is no longer supported, EPEL has moved to the Nginx v0.8 branch. This document describes compiling the EPEL Nginx v0.8 src rpm against the openssl v1.x libraries, and should be read as an addendum to the original howto.


Compiling the binary RPM can be done with no changes to the source RPM, however a newer version (or the same version with a higher priority) in the EPEL repository will over-write the TLS SNI RPM. To get around this the RPM 'Epoch' is set to '1' in the spec file. It is important that the 'openssl-devel-1.0.0-2.RHL5' or later RPM is installed.

$ rpm -ivh nginx-0.8.53-1.el5.src.rpm

Edit the '<rpmbuild>/SPECS/nginx.spec' file and add the line 'Epoch: 1'

rpmbuild -ba nginx.spec


Install the binary RPM's (as per the previous howto, only x86_64 binary RPM's and depencies are provided)

# rpm -Uvh openssl-1.0.0-2.RHL5.x86_64.rpm \
      openssl098e-0.9.8e-12.RHL5.6.x86_64.rpm \
      ca-certificates-2009-2.RHL5.noarch.rpm \


The RPM's used in this howto are available via http and https.


Note: The RPM files are not signed, and they are not in a yum repository. Either install using RPM, or use the yum '--nogpgcheck' option.



Nginx version information

/usr/sbin/nginx -V
nginx version: nginx/0.8.53
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
TLS SNI support enabled
configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx 
  --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log
  --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy
  --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi 
  --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/ --lock-path=/var/lock/subsys/nginx 
  --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module 
  --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module 
  --with-http_flv_module --with-http_gzip_static_module --with-http_random_index_module 
  --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module
  --with-http_perl_module --with-mail --with-file-aio --with-mail_ssl_module --with-ipv6 
  --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 
  --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'

Additional dependencies

The newer version of Nginx has additional dependencies.

 Package               Arch     Version                      Repository                     Size
 nginx                 x86_64   0.8.53-1.RHL5                /nginx-0.8.53-1.RHL5.x86_64   953 k
Installing for dependencies:
 GeoIP                 x86_64   1.4.7-0.1.20090931cvs.el5    epel                          710 k
 fontconfig            x86_64   2.4.1-7.el5                  base                          175 k
 freetype              x86_64   2.2.1-28.el5_5.1             updates                       311 k
 gd                    x86_64   2.0.33-9.4.el5_4.2           base                          155 k
 libX11                x86_64   1.0.3-11.el5                 base                          798 k
 libXau                x86_64   1.0.1-3.1                    base                           18 k
 libXdmcp              x86_64   1.0.1-2.1                    base                           19 k
 libXpm                x86_64   3.5.5-3                      base                           44 k
 libjpeg               x86_64   6b-37                        base                          139 k
 libpng                x86_64   2:1.2.10-7.1.el5_5.3         updates                       234 k
 libxslt               x86_64   1.1.17-2.el5_2.2             base                          488 k
 pkgconfig             x86_64   1:0.21-2.el5                 base                           61 k
 xorg-x11-filesystem   noarch   7.1-2.fc6                    base                          5.4 k

Transaction Summary
Install      13 Package(s)
Upgrade       1 Package(s)
Document Actions