First, configure the HTTP server
1. Enable HTTPD related modules
Here the HTT server and PHP server is connected through fastcgi, with the help of the module is mod_proxy_fcgi.so, it is mod_proxy.
So module expansion, so the two modules are to open 650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A51.png "width=" 660 " height= "alt=" "1.png"/>
2. Modify the main configuration file to support PHP file format
positioning AddType, add such as the following two lines
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A52.png "width=" 660 "height=" alt= "2.png"/ >
positioning Index, modified to as shown
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A53.png "width=" 660 "height=" 3.png "alt="/ >
3. Configure the virtual host
To enable the virtual host profile in the master configuration file
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A54.png "width=" 568 "height=" "alt=" 4.png "/ >
B. Configuring a virtual host
[Email protected] ~]# vim/etc/httpd24/extra/httpd-vhosts.conf
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A55.png "width=" 660 "height=" 508 "alt=" 5.png "/ >
4. Create a Web site directory and mount the NFS file system
[[email protected] ~]# mkdir/{PMA,WP}
Modify /etc/fstab turn on auto Mount
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A56.png "width=" 660 "height=" alt= "6.png"/ >
Test Success 650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A57.png "width=" 660 "height=" 254 "alt=" 7.png "/>
Show mounted
now we're in Any operation on the NFS server for both directories will be updated in real time on the HTTP server
Second, the PHP server configuration
PHP as an HTTP server processing PHP code exists, so it must also have a Web site root directory files, the same need to mount NFS file system;
Create a Directory
[[Email protected]~]# mkdir/{WP,PMA}
Modify /etc/fstab support boot automatically mount, here and above the operation of the HTTP server is the same 650) this.width=650; "src=" http:/ L51cto.qiniudn.com/%e8%bf%9e%e6%8e%a58.png "width=" 660 "height=" alt= "8.png"/>
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A59.png "width=" 660 "height=" 262 "alt=" 9.png "/ >
Third, test whether the HTTP server and PHP connectivity
respectively in NFS Server /wp and /pma create index.php files with the file contents as follows and add the iconic statements wp.stu30.com and Pma.stu30.com
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A510.png "width=" 252 "height=" "alt=" 10.png " /> 650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A511.png "width=" 287 "height=" Bayi "alt=" 11.png "/>
called here. PHP a function of phpinfo () , to test http can the server be opened PHP file
Test results
Wp.stu30.com
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A512.png "width=" 660 "height=" 134 "alt=" 12.png "/>
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A513.png "width=" 660 "height=" 136 "style=" text-indent:28px; "alt=" 13.png "/>
can already be successfully identified PHP file.
Four, WordPress and phpMyAdmin website Building, NFS server operation
1, prepare the source package
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A514.png "width=" 660 "height=" "alt=" 14.png " />
Extracted separately into the respective WP and PMA directories
[Email protected] ~]# unzipphpmyadmin-4.0.5-all-languages.zip-d/web/vhosts/pma/[[email protected] ~]# Unzipwordpress4.0.zip-d/web/vhosts/wp/
Delete the test HTML files and PHP files, log directory reserved, the WordPress directory files moved to the WP directory, and delete the WordPress directory
phpMyAdmin operation is the same
2. Website configuration
A. Generate database and user for website
[[email protected] pma]# MySQL//Enter the database mariadb [(none)]> Create db WP; Create WordPress database mariadb [(none)]> create user wordpress identified by ' WordPress '; Create user mariadb for WordPress database [(None)]> create user phpadmin identified by ' phpadmin '; Create User mariadb [(none)]> grant all on wp.* to WordPress for phpMyAdmin; For the WordPress user authorization, said in WP this library all the tables have all Permissions mariadb [(none)]> grant all on *. * to Phpadmin; phpMyAdmin user authorization, which means that any table in any library has all operation permissions
b, modify the WordPress configuration file
[Email protected]]# cp wp-config-sample.php Wp-config.php[[email protected]]# vim wp-config.php
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A515.png "width=" 660 "height=" 482 "alt=" 15.png "/>
Fill in the information in the database to the appropriate location
At this point we have opened the site has been set up 650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A516.png "width=" 660 "height= "311" alt= "16.png"/>
Fill in the website information to save can publish blog 650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A517.png "width=" 660 "height= "236" alt= "17.png"/>
C, phpMyAdmin Configuration
visit phpMyAdmin URL, will appear directly the website page, but at this time we cannot log in, because did not tell PhpMyAdmin to manage which database.
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A518.png "width=" 660 "height=" 273 "alt=" 18.png "/>
[Email protected] pma]# cpconfig.sample.inc.php config.inc.php
and edit config.inc.php
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A519.png "width=" 660 "height=" 217 "alt=" 19.png "/>
This will be directly logged in if you refresh again.
650) this.width=650; "src=" Http://l51cto.qiniudn.com/%E8%BF%9E%E6%8E%A520.png "width=" 660 "height=" 219 "alt=" 20.png "/>
This article is from the "Linux Learning path" blog, so be sure to keep this source http://linuxu.blog.51cto.com/9471357/1597014
LAMP+NFS connection of each system