Beruflich Dokumente
Kultur Dokumente
mins)
By using this virtualization software, we can create many VMs (CPU+mem+HD) on
which install different Operating systems such as windows or Linux flavors(300+)
Main Objective: We are going to create 2 VMs and then Install CentOS Linux OS later
on those VMs.
All these software are only to create VM on which you can install OS. This you can
compare like, instead of buying different laptops and installing OS, you are creating
as many laptops as possible in this software. This is virtualization concept.
Now 1st VM got created by name "server1". Suppose this is like your 1 st laptop and
now you have to install Linux OS (CentOS 6).
For any OS installation, you need CD/DVD image or .ISO file image or image on
network to boot.
Responsibilities:
Hardwa
re
Process
or
Mother
Board
RAM
Hard
Disk
Recomm.
Req.
For RHEL6
32-bit
AMD/Intel
Dual Core
AMD/Intel P 4
Recomm.
Req.
For RHEL6
64-bit
AMD/Intel Core
2 duo
Minimum
req. for
RHEL6 64-bit
AMD/Intel
Dual Core
Normal
1GB
Normal
384-512 MB
VT Enabled
2GB
VT Enabled
768-1GB
20 Gb
15 GB
40 GB
20 Gb
Minimum req.
for
RHEL6 32-bit
8 to 10 GB
200MB
Twice of RAM
15 to 20 GB
200MB
Twice of RAM
Enter into BIOS setting and make CD/DVD Drive as first boot device
Make sure that VT (Virtual Technology) is enabled for RHEL6 64-bit systems
Insert the RHEL 6 CD/DVD into CD/DVD drive and boot the system
If booted from CD/DVD ROM, the installation screen will be displayed
To test the media select OK, to skip the testing move cursor to Skip and
press Enter
Select the keyboard type as required usually U.S English, click Next to
continue
Select the type of Storage for the computer. Click Next to continue
If the storage device is from VMware then you will get above warning message
Select the nearest city in your Time Zone and click on Next to continue
Select the type of partitioning you want, to create your own partitions with
custom sizes, select Create Custom Layout and click on Next to
continue
Note: If you choose default option instead of custom, OS will install
without any options for disk. It used LVM partitioning by default. You can
verify with #df -h command
Click on the Free space, then click on Create to create your own
partitions
Select /boot from Mount Point Box, give the size 200MB for it and click
on OK to create it
S
e
l
e
c
t
the Free space again and click on Create to create another partition.
Select / from Mount Point Box, give the size you wish for it and click on
OK to create it.
Repeat the above steps in similar fashion and create swap partition (select free
space , click on create. Again select standard partition and then create. Then below
box opens.
This time select swap from File System Type. Give the size required
and click on OK
Finally you will see the partition as above and click on Next to continue with
it.
Note: Here you can select Desktop or Basic server or any other type as per
requirement.
In real time, you use the image which will already setup by Engineering Team as per
company environment needs and hence you will not see these options and get only
basic server like OS.
If it is VM, then OS installation is nothing but a deployment from templates. Very
Very easy
When above prompt is displayed, remove the CD/DVD from drive and click on
Reboot.
Follow all the steps as appropriate by clicking on Forward, then you will
get login screen where you enter username and password.
Once you login,if it comes $ sign then it means normal user. If it # (pound) sign
then it means root user.
#uname-a
#cat /etc/*-release
[very important commands]
#arch
#dmidecode|more
Start the installation normally as done previously, but only at the time of
partitioning follow the steps below.
Select the Free space and click on Create, then select LVM Physical
Volume and click Create to proceed.
Give the maximum possible size to this PV, as all the partition has to be
created inside it only.
Select the created PV, i.e., sda1 and then click on create
This time check the box beside LVM Volume Group to create a volume
group, click on to create a VG.
Click on the Add button in the above diagram, it will create partitions in that
volume group vg_system2.
Click on Add button to start adding LVs one by one, Select a mount point
and assign a size to it and click on OK.
Repeat the above step and create the following partitions with the given sizes
Note: All the sizes listed above are based on the availability of the space. It is no
where a recommended or minimum sizes. The sizes can be based on your
requirements. But /usr required the above given size(more) if it is 64-bit
architecture.
Select the Free space under Hard Drives and create /boot with 200MB and
SWAP with 2 GB. Make sure that you select Standard Partition this time,
instead of LVM.
Verify the sizes and click on Next to continue with the installation. Complete
the installation as usual as we have done previously at the beginning of the
course.
#ping www.google.com
Then set the IP address in the Linux server in the similar range of "VMware Network
Adapter VMnet8"
To Assign/Change Hostname:
Step1: temporary
Step2: Permanently this will change the IP address of the interface eth0
#vi /etc/sysconfig/network
HOSTNAME=server2
Suppose if you want to change IP address, then
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
IPADDR=192.168.1.11
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
#service network restart
Best PRACTICE:
Make sure both servers are able to login each other using both IP and Hostname
Solution:
On server1 :
#vi /etc/hosts
192.168.1.10
192.168.1.11
server1
server2
On server2:
#vi /etc/hosts
192.168.1.10
192.168.1.11
server1
server2
In real-time, they setup DNS for this name-IP resolution which is very very important
to make our life cool. Think if you need to remember the IP for all the websites you
use daily then how your life will be.
Suppose if you need to call some of your friend, then you need to have his no. and
that number you will insert in dialpad and call him. That number will work only if it is
registered with carrier(At&T, T-mobile, Verizon, Vodafone, airtel etc.)
Similarly here if you need to login to server1, it should have some no. called as IP
address and you need to insert in some client called as putty at windows server
Like this all the company people who are using this linux server1 will login using
putty. So it is very important that the carrier service ssh should run all the time on
server1 so that PUTTY loginworks.
If putty login does not work for some reason than application people will ask the
administrator to check. Administrator will login using CONSOLE login(nothing but
VMware workstation/vsphere client for virtual servers and ILO for physical servers)
Nobody will login using CONSOLE except administrator(you).
NOTE: As per security policy, root user is disabled via SSH login
OR
#cat /etc/*release
#uname a
#arch
#dmidecode ( and check for system information paragraph for Model and
serial#)
#uptime
#cat /proc/meminfo or #cat /proc/cpuinfo or #fdisk -l
#free m or #top
or df h
#ps ef or #ps aux
#cd /etc/init.d and #ls and #service service-name
(status/start/stop/restart/reload)
#rpm qa
IP Address related
=
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=dhcp
=
#Vi /etc/sysconfig/netwwork-scripts/ifcfg-eth0
BOOTPROTO=static
IPADDR=192.168.0.10
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
#Vi /etc/resolv.cong
nameserver 192.168.0.1