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

Source: Internet
Author: User
Tags mysql in

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

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.