标签:端口 火墙 one base ati tag bootproto rem 工具
网卡:
nmcli d
网络查看:
ip addr
网络配置文件:
/etc/sysconfig/network-scripts/ifcfg-enoXXX
BOOTPROTO=none;IPADDR=;GATEWAY=;NETMASK=255.255.255.0;ONBOOT=yes
重启网络服务:
systemctl restart network.service
或:service network restart
配置DNS:
/etc/resolv.conf
nameserver 8.8.8.8
yum源查看:
yum repolist
阿里云镜像配置:
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源:
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
php7源:
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
# 查询端口是否开放
firewall-cmd --query-port=8080/tcp
# 开放80端口
firewall-cmd --permanent --add-port=80/tcp
# 移除端口
firewall-cmd --permanent --remove-port=8080/tcp
#重启防火墙(修改配置后要重启防火墙)
firewall-cmd --reload
# 参数解释1、firwall-cmd:是Linux提供的操作firewall的一个工具;2、--permanent:表示设置为持久;3、--add-port:标识添加的端口;
标签:端口 火墙 one base ati tag bootproto rem 工具
原文地址:https://www.cnblogs.com/sdbq/p/10983009.html