centos 7 安装 (VMware ESXi 虚拟机安装)

准备

1、ios镜像下载地址:https://mirrors.aliyun.com/centos/
2、如何切换yum源:https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.6b0a1b115XGb4p
3、ios文件:CentOS-7-x86_64-DVD-2009.iso

创建虚拟机

略过,只要会点击配置即可

安装 centos7

1、选择中文
2、选择最小安装
3、其他默认即可
4、设置root密码 , 如果过于简单,连续点击2次完成即可
5、等待安装完成

先配置网络、ip和hostname

vi /etc/sysconfig/network-scripts/ifcfg-ens192
# 修改为static
BOOTPROTO=static
# 将ONBOOT 改为 yes
ONBOOT=yes

# 增加以下配置 (浙江电信dns:202.101.172.35)
IPADDR=192.168.0.18
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
DNS1=202.101.172.35

# 重启网络
systemctl restart network 或者 service network restart
# 查看ip
ip addr
# 验证网络
ping www.baidu.com

# 更改主机名
hostnamectl set-hostname <主机名>

此时可以进行shell 远程连接了

更新yum源和其他常用工具

# net-tools(加载ifconfig命令)、bash-completion (命令、参数自动补齐补丁包)
yum -y install vim wget bash-completion net-tools
# 检查可用的更新
yum check-update
# 更新(yum upgrade 仅更新软件,不更新内核)
yum  update -y
# 检查内核版本
uname -a
# 重启(更新内核)
reboot
# 对比更新后的内核版本
uname -a

关闭防火墙和selinux

# 关闭防火墙
systemctl status firewalld
systemctl stop firewalld
systemctl status firewalld
systemctl disable firewalld

# 关闭selinux
getenforce
sed -i 's/SELINUX=enforcing/cSELINUX=disabled/' /etc/selinux/config
setenforce 0
getenforce

你可能感兴趣的:(centos,centos,linux,运维)