httpd:192.168.1.200
mariadb:192.168.1.202
php:192.168.1.203
Installing with Yum
First, install and configure the httpd:
Operating on the 192.168.1.200
Yum Install-y httpd
vim/etc/httpd/conf.modules.d/00-mpm.conf // Enable event Mode
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8C/51/wKiom1hqGs6AqrUGAAG_gqaCUE4237.png "title=" B.png " alt= "Wkiom1hqgs6aqrugaag_gqacue4237.png"/>
vim/etc/httpd/conf/httpd.conf // Configure httpd
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8C/4D/wKioL1hqGuzQCItFAAB3XggUKAA773.png "title=" B.png " alt= "Wkiol1hqguzqcitfaab3xggukaa773.png"/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8C/51/wKiom1hqGwjSDsoJAAEPvXdfpG4839.png "title=" B.png " alt= "Wkiom1hqgwjsdsojaaepvxdfpg4839.png"/>
httpd-t // Check the httpd configuration
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8C/4D/wKioL1hqGyGDNpdzAAHX8nfYL5Y361.png "title=" B.png " alt= "Wkiol1hqgygdnpdzaahx8nfyl5y361.png"/>
Systemctl Start httpd
Second, install and configure the MARIADB:
Operating on the 192.168.1.202
Yum Install-y mariadb-server
systemctl start mariadb // Start the service
MySQL // login mariadb, create an account
CREATE USER ' root ' @ '% ' identified by ' 12345 ';
Exit // quit MySQL
Third, install and configure PHP:
Operating on the 192.168.1.203
Yum install-y php-fpm Php-mysql php-devel
Cp/etc/php-fpm.d/www.conf{,.bak} // Backup configuration file
Vim/etc/php-fpm.d/www.conf
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/8C/4D/wKioL1hqG1bBDh5GAAHAB9OY8pM059.png "title=" B.png " alt= "Wkiol1hqg1bbdh5gaahab9oy8pm059.png"/>
systemctl start php-fpm // Start PHP Service
Iv. Integration of XCache:
Operating on the 192.168.1.203
1. Prepare the source package
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8C/51/wKiom1hqG3bi9SeMAAB4ittm894601.png "title=" B.png " alt= "Wkiom1hqg3bi9semaab4ittm894601.png"/>
2. Installation
Yumgroupinstall-y "Development Tools" "Server platformdevelopment"
// Installation Environment
TAR-XJVF xcache-3.0.3.tar.bz2
CD xcache-3.0.3
phpize // Generate Configure File
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8C/4D/wKioL1hqG47RCoarAAC_6ltuBT8661.png "title=" B.png " alt= "Wkiol1hqg47rcoaraac_6ltubt8661.png"/>
./configure--enable-xcache--with-php-config=/usr/bin/ Php-config
//php-config path can be used which Php-config View
Make && make install
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8C/51/wKiom1hqG6uQQmlDAAD2BsqPOmw220.png "title=" B.png " alt= "Wkiom1hqg6uqqmldaad2bsqpomw220.png"/>
3. Integrated XCache
CP xcache-3.0.3/xcache.ini/etc/php.d/ // Copying a configuration file
Vim/etc/php.d/xcache.ini
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8C/4D/wKioL1hqG8OSP9TKAAIpH___DZc445.png "title=" B.png " alt= "Wkiol1hqg8osp9tkaaiph___dzc445.png"/>
Systemctl Reload php-fpm // Overloaded Configuration
Five, test:
1. Adding a virtual machine
Operating on the HTTPD server
Vim/etc/httpd/conf.d/test.conf
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8C/4D/wKioL1hqG-nQm8lGAAFE46pdy_Y299.png "title=" B.png " alt= "Wkiol1hqg-nqm8lgaafe46pdy_y299.png"/>
httpd-t // Check the configuration file
Systemctl Reload httpd // Overloaded configuration Files
mkdir-p/mydata/www // Create the appropriate site directory to
2. Prepare the test page
Working on a PHP server
mkdir-p/mydata/www // to be consistent with the site directory defined in the virtual host
vim/mydata/www/index.php
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/8C/51/wKiom1hqHASDMp3ZAAAcPKFEmN4582.png "title=" B.png " alt= "Wkiom1hqhasdmp3zaaacpkfemn4582.png"/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8C/51/wKiom1hqHBnwIlFiAAIfvk0Qmzo563.png "title=" B.png " alt= "Wkiom1hqhbnwilfiaaifvk0qmzo563.png"/>
vim/mydata/www/db.php
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8C/4D/wKioL1hqHC_hS1JMAACYzybpDsM253.png "title=" B.png " alt= "Wkiol1hqhc_hs1jmaacyzybpdsm253.png"/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8C/51/wKiom1hqHEPi4UW8AAHDYl40UQ4704.png "title=" B.png " alt= "Wkiom1hqhepi4uw8aahdyl40uq4704.png"/>
CENTOS7 Deploying LAMP:HTTPD2.4+FPM Mode