Centos7.4环境配置:
配置网卡参数:
编辑网卡配置文件
cd /etc/sysconfig/network-scripts/ //进入到network-scripts目录下
vi ifcfg-ens33 //编辑配置文件
//修改以下内容
BOOTPROTO=static //启用静态IP地址
ONBOOT=yes //开启自动启用网络连接
//添加以下内容
IPADDR=192.168.200.10 //设置IP地址
NETMASK=255.255.255.0 //子网掩码
GATEWAY=192.168.200.2 //设置网关
systemctl restart network //重启网络服务
关闭防火墙
[root@localhost ~]# iptables -F //清空防火墙规则
[root@localhost ~]# iptables -Z //清空防火墙数据表统计信息
[root@localhost ~]# iptables -X //删除指定的用户自定义链
[root@localhost ~]# iptables -L //列出添加防火墙规则
systemctl stop firewalld //关闭防火墙
systemctl disable firewalld //设置开机禁用防火墙
setenforce 0 //关闭selinux防火墙
修改selinux配置文件
vi /etc/selinux/config //编辑配置文件
//修改以下内容
SELINUX=Enfocing ---> 修改为: SELINUX=disable
配置yum源
cd /etc/yum.repos.d/ //进入到yum.repos.d目录下
//添加以下的内容:
[centos7]
name=centos7
baseurl=file:///opt/centos
gpgcheck=0
enabled=1
挂载Linux系统外的文件
mkdir /opt/centos //在opt目录下创建centos文件夹
mount CentOS-7-x86_64-DVD-1511.iso /opt/centos/ //临时生效
vi /etc/fstab //编辑配置文件
//添加以下内容:(永久生效)
/root/CentOS-7-x86_64-DVD-1511.iso /opt/centos iso9660 defaults 0 0
安装yum工具
yum list bash*
yum install -y bash-completion
yum list net*
yum install -y net-tools