Tutorial yang berasal dari blognya XNITRO untuk melakukan instalasi NginX, PHP5 dan MySQL pada CentOS 5 dengan kernel yang di gunakan adalah :
$ uname -a
Linux spid3y.local 2.6.18-164.el5xen #1 SMP Thu Sep 3 04:03:03 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
$ rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/$(uname -m)/epel-release-5-3.noarch.rpm
$ yum install nginx
$ chkconfig --level 345 on
$ yum install -y mysql-server mysql-devel
$ service mysqld start
$ mysql_secure_installation
Enter current password for root (enter for none): Enter
Set root password? [Y/n] Y
New password: rootpasssql
Re-enter new password: rootpasssql
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
$ yum install -y wget patch gcc libtool libmcrypt-devel libxml2-devel\
flex bison make pcre-devel zlib-devel openssl-devel gd-devel
$ cd /usr/local/src
$ wget http://www.magnet-id.com/download/php/php-5.2.6.tar.gz
$ wget http://www.magnet-id.com/download/php/php-5.2.6-fpm-0.5.8.diff.gz
$ tar xzvf php-5.2.6.tar.gz
$ gzip -cd php-5.2.6-fpm-0.5.8.diff.gz | patch -d php-5.2.6 -p1
$ cd php-5.2.6
$ ./configure \
--enable-fastcgi \
--enable-fpm \
--enable-cli \
--with-mcrypt \
--with-zlib \
--enable-mbstring \
--with-openssl \
--with-mysql \
--with-mysql-sock \
--with-gd \
--with-jpeg-dir=/usr/lib64 \
--enable-gd-native-ttf \
--without-sqlite \
--disable-pdo \
--disable-reflection \
--with-libdir=lib64 \
--with-xpm-dir=/usr/lib64 \
--enable-gd-jis-conv \
--with-freetype-dir=/usr/include/freetype2 \
--with-ttf=/usr/include/freetype2 \
--enable-shared
$ make all install
$ strip /usr/local/bin/php-cgi
$ cd /usr/lib64
$ ln -s libXpm.so.4.11.0 libXpm.so
$ ln -s libX11.so.6.2.0 libX11.so
$ nano /usr/local/etc/php-fpm.conf
Unix user of processes
Unix group of processes
Unix user of processes
nobody
Unix group of processes
nobody
$ cd /usr/local/src
$ wget http://www.magnet-id.com/download/php/xcache-1.2.2.tar.gz
$ tar xzvf xcache-1.2.2.tar.gz
$ cd xcache-1.2.2
$ phpize
$ ./configure --with-php-config=/usr/local/bin/php-config --enable-xcache
$ make install
$ nano /usr/local/lib/php.ini
magic_quotes_gpc=0
[xcache-common]
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 64M
$ php -v
PHP 5.2.6 (cli) (built: Oct 4 2009 02:37:45)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with XCache v1.2.2, Copyright (c) 2005-2007, by mOo
$ nano /etc/nginx/nginx.conf
user nobody;
worker_processes 5;
error_log /var/log/nginx/error.log;
events {
worker_connections 768;
}
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nodelay on;
keepalive_timeout 10 10;
gzip on;
gzip_comp_level 1;
gzip_proxied any;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
server {
listen 80;
server_name _;
autoindex on;
index index.php index.html index.htm;
root html;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /var/www/nginx/html;
index index.php index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /var/www/nginx/html;
}
}
$ /etc/init.d/php-fpm start
$ service nginx start
Microsoft Windows 2003 SP2 ERRATICGOPHER SMB Remote Code Execution
Mercurial Custom hg-ssh Wrapper Remote Code Execution
SquirrelMail 1.4.22 Remote Code Execution
Trend Micro Threat Discovery Appliance 2.6.1062r1 log_query_dlp.cgi Remote Code Execution
Trend Micro Threat Discovery Appliance 2.6.1062r1 log_query_dae.cgi Remote Code Execution