0% found this document useful (0 votes)
41 views4 pages

How To Install Nginx+PHP5/FPM+MYSQL: Learning by Doing - Step One Download Repositry

The document provides instructions for installing Nginx, PHP5/FPM, and MySQL on a server in 4 steps. Step 1 involves downloading repositories and installing MySQL. Step 2 installs Nginx. Step 3 installs PHP5-FPM. Step 4 configures PHP and ensures the services start on boot. When completed, a test PHP file can be accessed via Nginx to confirm the full stack is running.

Uploaded by

FendySempena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views4 pages

How To Install Nginx+PHP5/FPM+MYSQL: Learning by Doing - Step One Download Repositry

The document provides instructions for installing Nginx, PHP5/FPM, and MySQL on a server in 4 steps. Step 1 involves downloading repositories and installing MySQL. Step 2 installs Nginx. Step 3 installs PHP5-FPM. Step 4 configures PHP and ensures the services start on boot. When completed, a test PHP file can be accessed via Nginx to confirm the full stack is running.

Uploaded by

FendySempena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

How to Install Nginx+PHP5/FPM+MYSQL

*learning by doing
- Step One
Download Repositry
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
- Step Two
Installing Mysql
sudo yum install mysql mysql-server
then Run it :
sudo /etc/init.d/mysqld start
Configure Mysql
sudo /usr/bin/mysql_secure_installation
" Press - Enter - and Y and type your Password " easy Testing
mysql -u root -p
Enter password:

- Step Three
Install Nginx Web Server
sudo yum install nginx

Running nginx Web Server


sudo /etc/init.d/nginx start
Configure nano /etc/nginx/nginx.conf
" change line - worker_processes 4 - "
Save and Exit.
Configure Virtual Host
nano /etc/nginx/conf.d/default.conf
" Quote :
- add index.php On index line
- Change " Server Name " by your Domain or IP
- Change the " /usr/share/nginx/html " to " /var/www/ " #your public_html
- Uncoment " location ~ \.php$ { " ... ... " } "
- Change root directory under " location ~ \.php$ { " ... ... " } "
- Change " fastcgi_param " to "fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
"
- Save and Exit . "
Restarting your Nginx Web Server
sudo /etc/init.d/nginx restart
Testing Nginx Web Server
access your server http://192.168.1.20/

- Step Four
Installing php5-fpm
sudo yum --enablerepo=remi install php-fpm php-mysql
Configure php.ini
nano /etc/php.ini

" Uncoment " cgi.fix_pathinfo=1 " and change to " 0 " => Save and Exit "
Configure php5-fpm
sudo nano /etc/php-fpm.d/www.conf
" Repleace user and grup - Apache - with - Nginx "
" Quote :
[...]
user : nginx
[...]
grup : nginx
[...] "
Save and Exit.
Then Restart all Service :
/etc/init.d/mysqld restart
/etc/init.d/nginx restart
/etc/init.d/php5-fpm restart
And Now Testing for all :
cd /var/www/
nano info.php
Put the Script :
phpinfo();
?>
And Now open info.php => http://192.168.1.20/info.php
See my Screen :

- Finishing
Put all Service in startup
sudo chkconfig --levels 235 mysqld on
sudo chkconfig --levels 235 nginx on
sudo chkconfig --levels 235 php-fpm on
Enjoy it :*

By:

http://www.sysadmintutorial.com/
http://www.alldownload.us/

You might also like