一、防火墙相关
1.查询防火墙状态
systemctl status firewalld
当显示 firewalld.service Loaded: not-found (Reason: No such file or directory)时
2.安装iptables-services
yum install firewalld
3.关闭防火墙
systemctl stop firewalld.service
4.禁止防火墙开机自启
systemctl disable firewalld.service
5.启动防火墙
systemctl start firewalld.service
6.设置防火墙开机自启
systemctl enable firewalld.service
二、主机名
1.查看主机名
hostname
2.设置主机名
hostnamectl set-hostname server001
一旦修改了主机名,/etc/hostname 会自动更新。但是,/etc/hosts 不会更新,在修改主机名后需要手动更新/etc/hosts,之后再重启CentOS 7。
在/etc/hsots中添加如下内容
三、上传文件
1.查看是否安装lrzsz,输入rz命令,当没有安装时使用如下命令安装
yum -y install lrzsz