Build the lamp platform and install WordPress (i) by NFS Mount shared directory

Source: Internet
Author: User

Install Httpd,php,mariadb,nfs-utils on Host A, and as an NFS client, install Nfs-tuils on Host B as NFS server. A host Ip172.16.252.201,b host IP 172.16.254.164.

    1. Installing the httpd,php,php-mysql,mariadb,nfs-utils on a host

~]# yum install httpd php php-mysql mariadb-server nfs-utils

2. Install Nfs-tuils on Host B, create a shared directory/data/application/web and start the NFS service:

~] #yum Install Nfs-utils

~] #mkdir-pv/data/application/web

~] #systemctl Start Nfs-server.service

3. View the UID of the Apache user on host A, and then create the same user on Host B

A host:

~] #id Apache

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/84/86/wKiom1eS84OQ6mxAAAAMo7KjQao935.png "title=" 1.png " alt= "Wkiom1es84oq6mxaaaamo7kjqao935.png"/>

B Host:

~] #useradd-R-U-Apache

4. Edit the/etc/exports file on Host B, export the/data/application/web directory

~] #chown-R apache:apache/data/application/web

~] #vim/etc/exports

/data/application/web 172.16.0.0/16 (rw)

~] #exportfs-ar

5. Edit a host on/etc/httpd/conf/httpd.conf, modify the default home page to index.php, the domain name is www1.magedu.com, start the httpd service

~] #vim/etc/httpd/conf/httpd.conf

Servernamewww1.magedu.com:80

directoryindexindex.php index.html

~] #systemctl Start Httpd.service

6. Start the database service on a host, create database TestDB, user testuser, password testpasswd, and do authorization:

~] #systemctl Start Mariadb.server

~]# MySQL

mariadb[(none)]>createdatabase TestDB;

mariadb[(none)]>createuser ' testuser ' @ ' 127.0.0.1 ' identified by ' testpasswd ';

mariadb[(None)]>grantall on testdb.* to ' testuser ' @ ' 127.0.0.1 ';

mariadb[(None)]>flushprivileges;

7. Download WordPress on Host B and unzip to/data/application/web directory, edit the wordpress configuration file as follows:

~]# Unzipwordpress_4.3.1_zh_cn.zip

~]# mv-rwordpress/*/data/application/web

~] #cd/data/application/web

~]# mvwp-config-sample.php wp-config.php

~]# Vim wp-config.php

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/84/86/wKioL1eS8_LQqDitAAAs21F05Ig830.png "title=" 2.png " alt= "Wkiol1es8_lqqditaaas21f05ig830.png"/>

8. Modify the Hosts file on the Windows host and test the worepress with your browser:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/84/86/wKiom1eS9BiAqV0qAADRy7AU1Bs268.png "title=" 4.png " alt= "Wkiom1es9biaqv0qaadry7au1bs268.png"/>

Build the lamp platform and install WordPress (i) by NFS Mount shared directory

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: info-contact@alibabacloud.com 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.