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