#add nginx repo
nano /etc/yum.repos.d/nginx.repo
#paste this one
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=1 -------------
yum install nginx
yum install php-fpm   #upload foler nginx to /etc/
stop apache2/httpd
service nginx start nano -w /etc/php-fpm.d/www.conf #replace
listen = 127.0.0.1:9000;
#
listen=/var/run/php5-fpm.sock;   #start php-fpm service
service php-fpm start #install memache
pecl install memcache
yum install php-pecl-memcache