image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png

网络配置

查看client机的网络连接模式

1)右击选择centos客户端
2)点击设置
3)网络适配器

查看DHCP的分配网段

1)vmware—>编辑—->虚拟网络编辑器
2)选择v8条目
3)下方显示的v8详情信息
4)查询分配的网段
image.png
image.png

静态ip

vi /etc/sysconfig/network-scripts/ens33
image.png
重启服务
service network restart

加入能ping通ip但是ping不通域名

1)编辑/etc/resolv.conf
image.png
2)关闭防火墙:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动

  1. [root@localhost ~]``#systemctl stop firewalld.service
  2. [root@localhost ~]``#systemctl disable firewalld.service
  3. 启动一个服务:systemctl start firewalld.service
  4. 关闭一个服务:systemctl stop firewalld.service
  5. 重启一个服务:systemctl restart firewalld.service
  6. 显示一个服务的状态:systemctl status firewalld.service
  7. 在开机时启用一个服务:systemctl enable firewalld.service
  8. 在开机时禁用一个服务:systemctl disable firewalld.service
  9. 查看服务是否开机启动:systemctl is-enabled firewalld.service;echo $?
  10. 查看已启动的服务列表:systemctl list-unit-files|grep enabled
  11. vi /etc/selinux/config,将SELINUX=enforcing改为SELINUX=disabled,然后保存退出。

3、安装网络查看工具
yum install -y net-tools
image.png

第三方连接

image.png
image.png
yum Yello dog update Modified 它是一个在线的软件安装命令。
image.png

  1. yum install -y net-tools 安装网络插件
  2. yum search ifconfig 搜索软件
  3. yum install -y nano
  4. yum install -y wget
  5. yum remove nano 卸载软件
  6. 数据源地址:/etc/yum.repos.d/ 目录下

更换阿里源

备份yum文件

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo-bak

下载阿里云yum并替换原有yum文件

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

更新yum缓存

yum makecache
yum -y update

hosts

192.168.186.201 s201
image.png

hostname

vi /etc/hostname

  1. s201
  2. hostname s201

克隆多台机器

image.png
image.png
image.png

创建文件夹

mkdir /opt/module /opt/software

额外配置

vi /etc/ssh/sshd_config

  1. UseDNS no

systemctl restart sshd