LAMP+NFS connection of each system

Source: Internet
Author: User
Tags php server wordpress database

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, it is mod_proxy.

So module expansion, so the two modules are to open 650) this.width=650; "src=" Http:// "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:// "width=" 660 "height=" alt= "2.png"/ >

positioning Index, modified to as shown

650) this.width=650; "src=" Http:// "width=" 660 "height=" 3.png "alt="/ >

3. Configure the virtual host

    1. To enable the virtual host profile in the master configuration file

650) this.width=650; "src=" Http:// "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:// "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:// "width=" 660 "height=" alt= "6.png"/ >

Test Success 650) this.width=650; "src=" Http:// "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:/ "width=" 660 "height=" alt= "8.png"/>

650) this.width=650; "src=" Http:// "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 and

650) this.width=650; "src=" Http:// "width=" 252 "height=" "alt=" 10.png " /> 650) this.width=650; "src=" Http:// "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

650) this.width=650; "src=" Http:// "width=" 660 "height=" 134 "alt=" 12.png "/>

650) this.width=650; "src=" Http:// "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:// "width=" 660 "height=" "alt=" 14.png " />

Extracted separately into the respective WP and PMA directories

[Email protected] ~]#[[email protected] ~]#

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:// "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:// "width=" 660 "height= "311" alt= "16.png"/>

Fill in the website information to save can publish blog 650) this.width=650; "src=" Http:// "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:// "width=" 660 "height=" 273 "alt=" 18.png "/>

[Email protected] pma]#

and edit

650) this.width=650; "src=" Http:// "width=" 660 "height=" 217 "alt=" 19.png "/>

This will be directly logged in if you refresh again.

650) this.width=650; "src=" Http:// "width=" 660 "height=" 219 "alt=" 20.png "/>

This article is from the "Linux Learning path" blog, so be sure to keep this source

LAMP+NFS connection of each system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.