CentOs7 基本配置
1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
2.关闭图形界面
1,命令模式
systemctl set-default multi-user.target
2,图形模式
systemctl set-default graphical.target
3.更改主机名
hostnamectl set-hostname xxx
设置时间
[root@localhost ~]# timedatectl set-local-rtc 1
[root@localhost ~]# timedatectl set-timezone Asia/Shanghai
[root@localhost ~]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
服务名所在目录
#/usr/lib/systemd/system
#ls
iprutils.target -.slice wpa_supplicant.service
iptables.service slices.target YDService.service
kdump.service smartcard.target zabbix-agent.service