Mar 142011
 

I’m not going have much words to say, here we go..

first download nginx source rpm from this excellent contributor/packager and install the source

$ wget http://centos.alt.ru/pub/nginx/0.9/RHEL/SRPMS/nginx-0.9.5-1.el5.src.rpm
$ rpm -Uvh  nginx-0.9.5-1.el5.src.rpm

Change to /path/rpm/SOURCE and download ngx_cache_purge

$ cd `rpm --eval '%{_sourcedir}'`
$ wget http://labs.frickle.com/files/ngx_cache_purge-1.2.tar.gz

Now we need to modified nginx.spec a bit, so it will include ngx_cache_purge module when compiled

$ cd `rpm --eval '%{_specdir}' `
$ vi nginx.spec

Add ngx_cache_source-1.2.tar.gz module to source list as Source20

Source11:       nginx_mod_h264_streaming-2.2.7.tar.gz
Source20:       ngx_cache_purge-1.2.tar.gz

In %prep section add this line %setup -T -D -a 20

%setup -T -D -a 11
%setup -T -D -a 20
%setup -T -D -a 21

In %build section add this line –add-module=%{_builddir}/nginx-%{version}/ngx_cache_purge-1.2 \

...
    --add-module=%{_builddir}/nginx-%{version}/nginx_upload_module-2.2.0 \
    --add-module=%{_builddir}/nginx-%{version}/ngx_cache_purge-1.2 \
    --add-module=%{_builddir}/nginx-%{version}/nginx_mod_h264_streaming-2.2.7
...

Continue reading »

Jun 282009
 

Di compile pada system centos 5, kernel 2.6.18 dan iptables 1.3.5

1. Persiapan

Download kernel source yg sekarang dipakai di centos 5 kita

# mkdir ~/geoip
# cd ~/geoip/
# uname -a
Linux host.domain.com 2.6.18-53.1.13.el5 #1 SMP Tue Feb 12 13:02:30 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

# wget ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/kernel-2.6.18-53.1.13.el5.src.rpm

kita cuma mau mengambil linux-2.6.18.tar.bz2 nya saja(patch2 yg lain tidak kita perlukan).

# rpm2cpio kernel-2.6.18-53.1.13.el5.src.rpm | cpio -idv linux-2.6.18.tar.bz2
linux-2.6.18.tar.bz2
172734 blocks
# tar xjf linux-2.6.18.tar.bz2

Continue reading »