Construction of the Wishing Wall website based on Apache+php+mysql in the CentOS system

Source: Internet
Author: User

1. In the first step, we prepare two virtual machines (centos7,linux text).

2. Configure the network environment for two virtual machines in bridged mode CentOS7 IP is 192.168.100.139, 24,linux text IP is 192.168.100.239/24, and then each configuration yum source configuration file.

3. Install httpd, PHP, Php-mysql in CentOS7, and then restart the service and turn off the firewall:

Systemctl Restart Httpd.service       //Restart HTTPD service systemctl stop Firewalld.service      //Temporarily turn off firewall Setenforce 0                         // Turn off SELinux

4. Next, modify the Yum configuration file and install the Mysql-server and shut down the firewall in the Linux text:

Yum-y Install Mysql-server          //installation of MySQL Services service mysqld restart//restart               mysqlservice iptables stop                // Shutting down the firewall Setenforce 0

5. Upload the Wishing wall file to CentOS7, use IP login on FZ,

6. Enter the MySQL command in the Linux text and enter the database management

7. Next enter the command: show databases; See which databases are Mysql-server

8. Re-enter the command: create user ' xia ' @ ' 192.168.100.139 ' identified by ' 123456 '; Create a user for 192.168.100.139, that is, the user created can only log on at 139.

9. Re-enter the command:create Databa Xyq; Create a XYQ database

10. You can view the database again and there will be xyq this database

11. Next, you can set the text permissions, enter the command:grant all privileges the xyq.* to ' xia ' @ ' 192.168.100.139 ';

12. Input command: Use xyq; Enter the XYQ database.

and upload files to the database

13. Input:quit; Exit database

14. Enter CentOS7/etc into/var/www/html and enter the command: VI connec.php Press I to modify the configuration file:

15. Finally, you can verify and enter ip192.168.100 in the browser. 139 can be.

16. Complete!

Construction of the Wishing Wall website based on Apache+php+mysql in the CentOS system

Related Article

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.