网络配置
查看client机的网络连接模式
查看DHCP的分配网段
1)vmware—>编辑—->虚拟网络编辑器
2)选择v8条目
3)下方显示的v8详情信息
4)查询分配的网段
静态ip
vi /etc/sysconfig/network-scripts/ens33
重启服务
service network restart
加入能ping通ip但是ping不通域名
1)编辑/etc/resolv.conf
2)关闭防火墙:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
[root@localhost ~]``#systemctl stop firewalld.service
[root@localhost ~]``#systemctl disable firewalld.service
启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service;echo $?
查看已启动的服务列表:systemctl list-unit-files|grep enabled
vi /etc/selinux/config,将SELINUX=enforcing改为SELINUX=disabled,然后保存退出。
3、安装网络查看工具
yum install -y net-tools
第三方连接
yum Yello dog update Modified 它是一个在线的软件安装命令。
yum install -y net-tools 安装网络插件
yum search ifconfig 搜索软件
yum install -y nano
yum install -y wget
yum remove nano 卸载软件
数据源地址:/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缓存
hosts
hostname
vi /etc/hostname
s201
hostname s201
克隆多台机器
创建文件夹
mkdir /opt/module /opt/software
额外配置
vi /etc/ssh/sshd_config
UseDNS no
systemctl restart sshd