Construction of Varnish experimental environment
1. Download the 6.5 image and configure the network yum source on the host
yum install httpd -y systemctl start httpd systemctl enable httpd mkdir /var/www/html/rhel6.5/ mount /iso/rhel-server-6.5-x86_64-dvd.iso /var/www/html/rhel6.5/
2. Create a master disk:
(1) open Virtual Machine Manager and select to install virtual machine through network
(2) installation settings:
(3) configure the motherboard environment
##Configure host name vi /etc/sysconfig/network HOSTNAME=yyserver1
##Configure local resolution vi /etc/hosts 172.25.24.1 yyserver1 172.25.24.2 yyserver2 172.25.24.3 yyserver3 172.25.24.4 yyserver4
#Remove 70 persistent net.rules cd /etc/udev/rules.d/ ls rm -rf 70-persistent-net.rules
#Configure ip address vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTROTO="static" IPADDR="172.25.24.1' NETMASK="255.255.255.0" ONBOOT="yes" /etc/init.d/network restart ##service network restart
##Configure yum source vi /etc/yum.repos.d/rhel-source.repo yum repolist
#Modify selinux working state vi /etc/sysconfig/selinux SELINUX=disabled
##Turn off the firewall and turn it on automatically /etc/init.d/iptables stop /etc/init.d/ip6tables stop chkconfig iptables off chkconfig ip6tables off
##Download lftp, ssh and vim services yum install lftp openssh-clients vim -y
##After the configuration of the master disk environment is completed, poweroff is required instead of reboot ing poweroff ##In order to prevent inadvertently opening the master disk, delete the master disk from the Virtual Manchine Manager interface. Be careful not to delete the master disk file
(4) create a snapshot by using the configured environment's master disk
cd /var/lib/libvirt/images/ qemu-img create -f qcow2 -b yyserver1.qcow2 yy1 qemu-img create -f qcow2 -b yyserver1.qcow2 yy2 qemu-img create -f qcow2 -b yyserver1.qcow2 yy3
(5) create virtual machine 1, 2 and 3 through the generated snapshot and configure the environment respectively
Change the ip addresses of the three virtual machines to 172.25.24.1172.25.24.2172.25.24.3
Change the host name to server1, server2, server3
And check whether the network between the three virtual machines can be connected to each other
Note: if the network service of the virtual machine cannot be started, 70-persistent-net.rules may not be deleted. Delete 70-persistent-net.rules and replace the network card used by the virtual machine with eht1 and restart the network service
(6) the three virtual machines can communicate with each other, and the preparation environment is completed