天天看點

Linux 環境部署 CentOS 7

更改主機名

# hostnamectl set-hostname xxxx
# su
# vim /etc/hosts
10.1.1.10 jack           

網卡配置

# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.122.60
NETMASK=255.255.255.0
GATEWAY=192.168.122.1
DNS1=114.114.114.114           

關閉防火牆

# systemctl stop firewalld
# systemctl disable firewalld
# iptables -F 
           

關閉SELINUX

# sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
# sestatus           

時間同步

# yum -y install ntp
# ntpdate time1.aliyun.com
# date           

繼續閱讀