2. Install Nginx.
What is Nginx? Nginx (pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption.
I already add the additional repo in Part 1 to install Nginx.
yum install nginxthen create start up link and start it
chkconfig --levels 235 nginx onmake confirmation of Nginx installation by typing server IP address (192.168.0.121) or hostname into my browser, and I got Nginx welcome page. Thats all for installing Nginx :)
/etc/init.d/nginx start
3. Install PHP5
Nginx need PHP-FPM to work with PHP5. PHP-FPM (PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites). I install php-fpm together with php-cli and some PHP5 modules like php-mysql which I need to use MySQL from PHP.
yum install php-fpm php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-magickwand php-magpierss php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidyI also install APC, a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It's similar to other PHP opcode cachers, such as eAccelerator and Xcache. It is strongly recommended to have one of these installed to speed up PHP page.
yum install php-pecl-apcOpen /etc/php.ini find and set cgi.fix_pathinfo=0:
/etc/php.iniI look in my system time zone and then set the same value in date.timezone in /etc/php.ini to avoid error in php error log.
cat /etc/sysconfig/clockCreate the system startup links for php-fpm and start it
chkconfig --levels 235 php-fpm onPHP-FPM is a daemon process (with the init script /etc/init.d/php-fpm) that runs a FastCGI server on port 9000.
/etc/init.d/php-fpm start
End of Part 2