corporate real linux virtual machine package

1. First, download the official website of Red Hat 7.3 mirrorrhel-server-7.3-x86_64-dvd.iso ;

2. 7.3 download mirror disposed in its own physical network loading machine;

or:

[root@foundation83 ~]# vim /etc/rc.d/rc.local

mount /iso/rhel-server-7.3-x86_64-dvd.iso  /var/www/html/rhel7.3

3. Physical handoff to superuser root, perform virt-manager, into the virtual machine management interface ;

4. Install a virtual machine, the memory is set to 1024MB, 20GB hard disk;


 

 

Select the language (English), click on "continue" to continue

Select the time zone (Asia Shanghai), click done to continue

Click to select the installation of software selection method: minimize installation (to minimize the installation is no graphics), click done to continue

Determine the partition (autopartition manner): the interface into the underlying partition, disposed done automatically selected partition.

Click the lower right corner of Begin Installation, start the installation

Set the root user password

Setting general user's user name and password

After installing, click reboot restart

5. In the newly built virtual machine settings (selinux settings, network, yum source, hostname changes, resolved locally, firewalld (rhel6 version is iptables, but rhel7 version is firewalld), edit the file name to modify the network card , NetworkManager service management, clear the cache of the virtual machine)

<1> selinux set (For convenience after the experiment was set selinux disabled):

# Vim because there is no installation tools, we use the system kernel vi editor

After # Amendment should reboot to make changes take effect selinux

<2> Edit to modify the name of the file card

From the chart to see clear: now the name of the card is ens3, want to be the eth0, /boot/grub2/grub.cfg need to modify the file.

#修改后需重启才能使其修改的文件生效(

<3>NetworkManager服务的管理

上面修改了/boot/grub2/grub.cfg文件,将网卡名字该为eth0,但是系统中存在NetworkManager服务会对其产生干扰,所以需要对NetworkManager服务进行设置

<4>网络:

测试网络是否配置成功

<5>yum源设置:

测试yum源是否搭建好

<6>主机名的更改:

方法一:

<7>本地解析:

值的注意的是:这里写主机(172.25.83.83)的解析的原因是:加快主机远程ssh的速度——远程ssh连接时需要由ip找到背后对应的主机名,现在主机名与ip对应的解析一一给出,很明显就加快了远程ssh的速度。

<8>firewalld设置

关闭防火墙

设置防火墙开机不自启动

<9>你也可以下载一些常用的软件,如vim,lftp,net-tools(提供ifconfig命令和netstat命令等等)等;

<10>清空虚拟机的缓存(在物理机进行操作)

值的注意的是:利用物理机给虚拟机清缓存时,虚拟机必须是关闭的

此时需要下载对应的软件

给base7.3这台虚拟机清缓存(这里写的是虚拟机的名字,而不是快照生成的.qcow2文件)

<11>增加的知识点:如何压缩生成的母镜像(base7.3)便于拷贝

值的注意的是:必须进入/var/lib/libvirt/images目录中进行操作(qcow2文件存放的位置)

6.关闭rhel7.3虚拟机

7.在物理机找到base7.3.qcow2,我们将它的镜像作为母镜像,去生成子镜像然后尝试安装虚拟机server1,server2;

8.在server2虚拟机里进行改动(网络,主机名)——其中vm1虚拟机沿用母镜像的内容

(1)网络

(2)主机名修改:

发布了80 篇原创文章 · 获赞 0 · 访问量 1070

Guess you like

Origin blog.csdn.net/weixin_45029822/article/details/104399249