Linux build PHP website wishing wall

Source: Internet
Author: User
Tags php website

Site material in: https://i.cnblogs.com/Files.aspx

First, you need to build a local Yum source, for more information:

Http://www.cnblogs.com/jw35/p/5967677.html

I use CentOS 7 as a Web server, CentOS 5 store data

Configure CentOS 7 First

Configure IP

vi/etc/sysconfig/network-scripts/ifcfg-eno16777736 #编辑网卡配置文件, eno16777736 for NIC name

My CentOS 7 is set to IP 192.168.100.135

Yum Install httpd-y           #安装Apache服务 yuminstall php-y             #安装php服务 Yum  Install php-mysql-y       #使php与mysql相连接systemctl stop firewalld.service      0                                 #临时关闭selinux

Upload the Web file to the/var/www/html directory

Modify the connect.php file

$host ="192.168.100.235";          #地址 $db _user="aa01";                  #用户名 $db _pass="123";                   #密码 $db _name="xyq";                   #库名

Restart Apache

Systemctl Restart Httpd.service

CentOS 5 Configuration

Configure IP

Ifconfig eth0 192.168.100.235 255.255.255.0 #给eth0网卡临时添加IP

Service Iptables Stop #临时关闭防火墙

Setenforce 0 #临时关闭selinux

Build local Yum Source

Yum InstallMysql-server-y #安装mysqlservice mysqld restart #重启mysqlmysql #进入数据库show dat                       abases; #查看所有数据库create User'AA01'@'192.168.100.135'Identified by'123'; #给192.168.100.135 Create a user, that is, create a user only in 192.168.100. 135 login CREATE DATABASE Xyq; #创建xyq数据库grant all privileges on XYQ.* To'AA01'@'192.168.100.135'; #给某个用户加上指定数据库的权限, *represent all tables with use XYQ; #进入数据库show Tables #查看表

Then copy the SQL statement in

Quit #退出数据库

As a result

Linux build PHP website wishing wall

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.