名字和防火墙:
vi /etc/hostname #主机名配置
setenforce 0 # 临时关闭selinux
vim /etc/selinux/config # 永久关闭selinux,重启之后生效,修改内容SELINUX=disabled
systemctl stop firewalld# 临时关闭防火墙:
systemctl disable firewalld# 永久关闭防火墙,重启后生效:
启动命令:
systemctl restart network #重启网卡
systemctl restart *** #重启xx服务
systemctl stop *** #停止xx服务
systemctl start *** #开启xx服务
systemctl status *** #查看xx服务
systemctl enable *** #设置开机自启动xx服务
systemctl disable *** #关闭开机自启动xx服务
网卡配置文件vi /etc/sysconfig/network-scripts/ifcfg-ens33#名字不一定是这个tab看看差不多的
BOOTPROTO=none #静态获取 dhcp动态获取
IPADDR=192.168.70.88 #IP地址
NETMASK=255.255.255.0 #子网页码
GATEWAY=192.168.70.1 #网关
DNS1=8.8.8.8 #DNS
万兆万卡需要修改:
网卡mtu永久修改方案 vim /etc/rc.local #开机会启动的文件
ifconfig eth0 mtu 9000 #万兆万卡使用
chmod +x /etc/rclocal#赋予执行权限,开机自启动
配置没问题没网络这个关了试下:
systemctl stop NetworkManager开机没有网络设置没问题试下
systemctl disable NetworkManager