一、创建虚拟机

1、 首先安装vmware,注意在安装中,下面的两项不要勾选,一路下一步

Linux - Centos7安装虚拟机

2、完成安装打开之后,创建新的虚拟机

Linux - Centos7安装虚拟机

 

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

3、虚拟机创建完成,需要改配置

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

4、然后设置网段

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

5、查看服务,在运行状态,说明虚拟机创建成功

Linux - Centos7安装虚拟机

 

二、安装操作系统

Linux - Centos7安装虚拟机

 1、点击开启此虚拟机,进入一个界面,移动方向键上下键选择第一个,然后按Tab键,下方出现一行内容,空一格在后面输入 net.ifnames=0

Linux - Centos7安装虚拟机

Enter键完成,等待安装系统,安装完成,出现图形化界面

Linux - Centos7安装虚拟机

2、选择语言,选择英语

Linux - Centos7安装虚拟机

3、完成进入

Linux - Centos7安装虚拟机

4、修改时间

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

5、接下来一系列修改

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

6、磁盘分区

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

 

7、网络和主机名

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

外网设置

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

内网设置

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

设置完成后

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

 Linux - Centos7安装虚拟机

点击Reboot,到命令行的登陆界面

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

 

快照:保存系统状态节点,可随时还原以及克隆另一台虚拟机。三种状态:开机状态,挂起状态,关机状态,都可以做快照。

如果不小心删除了库:命令行:rm   -rf   /* , 可以通过快照恢复

Linux - Centos7安装虚拟机

 

 克隆:分为链接克隆和完整克隆。克隆虚拟机必须用关机状态的快照

Linux - Centos7安装虚拟机

 

 

三、通过Xshell6远程链接

1、远程连接工具

xshell
secureCRT
putty
iterm2

2、安装Xshell6。安装过程略。

3、连接前需要测试是否有ip。在VMware的命令行中输入 :ip a

Linux - Centos7安装虚拟机

4、打开Xshell6看能否连接

Linux - Centos7安装虚拟机

5、远程连接之前设置

Xshell全局优化

Linux - Centos7安装虚拟机

 

Linux - Centos7安装虚拟机Linux - Centos7安装虚拟机

 

远程连接端口号22,查看端口号是否可以连接,输入命令: ss -lntp

Linux - Centos7安装虚拟机

 

xshell6中测试22是否可以远程连接

Linux - Centos7安装虚拟机

 

xshell优化

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

 

设置好了之后点击确定,然后开始连接

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

Linux - Centos7安装虚拟机

 测试虚拟机能否上网

Linux - Centos7安装虚拟机

 

修改颜色

按以下步骤依次输入

vi  /etc/bashrc    # 编辑

G                  # 移动文件的行尾

o # 在当前向下另起一行进行编辑
PS1="\[\e[37;40m\][\[\e[32;1m\]\u\[\e[37;40m\]@\h \[\e[36;40m\]\w\[\e[0m\]]\[\e[32;1m\]\\$ \[\e[0m\]" # 粘贴进去 esc键 :wq # 保存退出 source /etc/bashrc # 设置生效

 

Linux - Centos7安装虚拟机

 

相关文章: