Before getting started with nginx, it is recommended that you update PHP to the latest version.
Create a /etc/yum.repos.d/nginx.repo with the following content:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
We are going to use php-fpm package to handle PHP fast-cgi.