centos7 configuration php runtime environment

 

1.  Network Configuration

NIC:

nmcli d

Network View:

ip addr

Network configuration file:

/etc/sysconfig/network-scripts/ifcfg-enoXXX

BOOTPROTO=none;IPADDR=;GATEWAY=;NETMASK=255.255.255.0;ONBOOT=yes

Restart network services:

systemctl restart network.service

Or: Service Network restart

Configuring the DNS :

/etc/resolv.conf 

nameserver 8.8.8.8 

2.  yum configuration

yum source View :

yum repolist

Ali cloud mirrored configuration:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum makecache

nginx source:

rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

php7 Source:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml

 

3.  Open Ports

# Query whether the port open
Firewall-cmd --query-Port = 8080 / tcp
# 80 open ports
Firewall-cmd = --permanent --add-Port 80 / tcp
# remove port
firewall-cmd --permanent --remove- port = 8080 / tcp

 

# Restart the firewall (firewall to restart after configuration changes)
Firewall-cmd --reload

# Of parameters 1, firwall-cmd: the operation is a tool provided for Linux firewall; 2, - permanent: provided persistent represented; 3, - add-port: the port identifier added;

 

Guess you like

Origin www.cnblogs.com/sdbq/p/10983009.html