0.1 安装
- 
最小安装 CentOS Linux release 7.9.2009 (Core) $ cat /etc/redhat-release # 查看当前系统发行版 $ cat /etc/os-release # 详细信息
- 
网卡:桥接 
- 
Selinux:关闭 
0.2 网络
- 
安装工具 $ yum -y install net-tools elinks psmisc $ ip addr show # 查看ip $ ifconfig
- 
关闭防火墙 $ iptables -F # 清空防火墙规则 $ systemctl stop firewalld # 关闭防火墙服务 $ systemctl disable firewalld # 禁止防火墙开机启动
- 
解决没有网络 $ vim /etc/sysconfig/network-scripts/ifcfg-ens33 # 修改网络配置文件 >> ONBOOT="yes" # 将此参数设置为yes $ systemctl stop NetworkManager # 关闭无线网络 $ systemctl restart network # 重启有线网络
0.3 yum 软件包
- 
rpm $ rpm -ivh *.rpm # -i (install) 安装 # -v (verbose) 显示详细信息 # -h (hash) 显示进度
- 
yum 仓库源更新 """ yum自动化安装 缺点1:yum源仓库的软件,版本可能较低 缺点2:无法指定安装路径,机器数量较多时,不容易控制 优点:自动处理依赖关 """ $ yum -y install wget # 下载wget $ wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo # 阿里yum仓库源 $ wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo # epel仓库源 $ wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo # docker仓库源
0.4 ssh 远程连接
- 
ssh 远程连接 $ ssh -p 22 root@192.688.199.244 # 连接:ssh -p 端口号 用户名@服务器IP >> lougot # 断开连接
- 
scp 跨系统传文件 $ scp -r 本机文件 root@192.688.199.244:/opt/ # 传文件 $ scp -r root@192.688.199.244:/opt/ 本机路径 # 下载文件
 
 