Installing PHP on Linux is a little more complex than Windows, and it's not as easy to integrate as Windows. Technology is about tossing.
Linux version can be referenced prior to the release of Linux installation php mongodb extension
Installation Environment
System environment: CentOS 6.5 64-bit
First, set up the Yum Warehouse
In the first step, set up the Yum repositories you need to install apache,php and MySQL, add remi,epel,webtatiche and MySQL server repositories.
Yum-y Install Epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
RPM-UVH https://mirror.webtatic.com/yum/el6/latest.rpm
RPM-UVH http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
wget https://centos6.iuscommunity.org/ius-release.rpm
RPM-UVH ius-release*.rpm
Yum-y Update
II. Installation of PHP 5.6
1, installation PHP5.6
There are many ways to install PHP 5.6, the following is just one of them, only as a reference.
Yum-y Install php55u php55u-opcache php55u-xml php55u-mcrypt php55u-gd php55u-devel php55u-mysql php55u-intl php55u-mbst Ring Php55u-bcmath
2, let Apache parse PHP, in httpd.conf Add the following sentence:
LoadModule Php5_module modules/libphp5.so
<ifmodule mod_php5.c>
AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Phps
</IfModule>
Third, install MySQL 5.6 and set the boot start
1. Install MySQL and set up boot
Yum Install Mysql-server
Chkconfig mysqld on
2. Set MySQL password
mysql> use MySQL;
mysql> UPDATE user SET Password=password (' newpassword ') WHERE user= ' root ';
mysql> FLUSH privileges;
3. Allow Remote Login
Mysql> Grant all privileges on * * to ' user name ' @ '% ' identified by ' password ' with GRANT OPTION;
Iv. test whether PHP can be parsed by Apache
Create a new test.php file in/var/www/html/, write the following, and then save the run.
<? Phpinfo ();?>
End
Linux install PHP and MySQL