文档一(IP设置)HOST1
cd /etc/sysconfig/network-scripts/
vi ifcfg-ens33
BOOTPROTO=static
IPADDR0=192.168.10.10
IPADDR1=192.168.10.20
GATEWAY=192.168.10.253
DNS1=192.168.10.10
重启网络服务:systemctl restart network
查看IP网络:ip address
测试准备:禁用防火墙
systemctl disable firewalld
停用selinux功能
vi /ect/selinux/config
SELINUX=enforcing SELINUX=disable
文档二 (YUM源)
cd /etc/yum.repos.d/
ls
mkdir backup
mv CentOS-* backup/
ls
touch local.repo
vi local.repo
vi /ect/fstab
mkdir /media/cdrom
mount -a
yum repolist
yum -y install httpd 安装的目的主要为了配置远程的yum源
yum -y install vim
clear清屏
cd /etc/httpd/conf
vim httpd.conf
192.168.10.20作为WEB服务器
cd ../conf.d/
ls
touch di.conf
vim di.conf
重启服务systemctl restart http
systemctl enable httpd 开机自动运行
systemctl status httpd
HOST2
curl http://192.168.10.20/centos/
curl http://192.168.10.20/centos/ | more
cd /etc/yum.repos.d/
mkdir backup
mv CentOS-* backup/
touch local.repo
vi local.repo
yum repolist
yum -y install vim
clear
将HOST2yum源拷贝到HOST3中
scp local.repo [email protected]:/etc/yum.respos.d/
HOST3