1. First, we need two virtual machines (centos7,linux text).
2. Configure the network environment for two virtual machines to bridge mode CentOS7 IP to 192.168.100.137, 24,linux text IP to 192.168.100.237/24, and then configure the Yum Source configuration file (http:// www.cnblogs.com/zxbdbk/p/6020679.html).
3. Install httpd, PHP, Php-mysql in CentOS7, and then restart the service and turn off the firewall:
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 install MySQL service mysqld restart //restart mysql // Turn off firewall 0
5. Place the Web file in the/var/www/html directory in CentOS7.
6.Linux Text Database Processing
[email protected] ~]# mysql #进入数据库Welcome to the MySQL monitor. Commands End With; or\g.your MySQL Connection ID is 2to server version:5.0. AType'Help ;' or '\h'For help. Type'\c'To clear the Buffer.mysql>create user ' zxb ' @ ' 192.168.100.137 ' identified by ' 123456 '; #创建新用户Query OK,0Rows Affected (0.00sec) MySQL>show databases; #查看数据库+--------------------+| Database |+--------------------+| information_schema | | | mysql | | sjk | | | test |+--------------------+4Rows in Set (0.00sec) MySQL>Grant all privileges the sjk.* to ' zxb ' @ ' 192.168.100.137 '; #将数据库的权限给用户Query OK,0Rows Affected (0.00Sec
Use SJK; #进入数据库
{mysql>/*!40101 SET [email protected]_character_set_client */;
Query OK, 0 rows Affected (0.00 sec)
mysql>/*!40101 SET [email protected]_character_set_results */;
Query OK, 0 rows Affected (0.00 sec)
mysql>/*!40101 SET [email protected]_collation_connection */;
Query OK, 0 rows Affected (0.00 sec)} #上传数据库文件
quit #退出数据库
Service mysqld Restart #重启mysql
7. Enter CentOS7/etc into/var/www/html and enter the command: VI connec.php Modify the configuration file:
8..
Construction of the Wishing Wall website based on Apache+php+mysql in the CentOS system