Red Hat/CentOS Linux is a popular server operating system. Specially who work on mail server, web server, web proxy server, ftp server and file server are so familiar with the Red Hat/CentOS Linux. In my previous article, I discussed how to install CentOS 7.5 Linux step by step with the standard partition. But if you want to work on mail server, web proxy server, ftp server, file server or any other application where disk space changes frequently, the standard partitioning is not recommended in this case because the standard partitioning is not able to manage disk partition dynamically. On the other hand, LVM (Logical Volume Manager) provides opportunity to manage your partition dynamically. So, LVM partitioning is always recommended for Red Hat/CentOS Linux installation. But LVM partitioning is not as easy as the standard partitioning. You should have knowledge about the basic terms of the LVM partitioning. In this article, I will discuss about the basic terms of LVM and the basic architecture of LVM. I will also discuss how to install CentOS 7.5 Linux with LVM partitioning.
LVM Components
The following three terms are the basic components of the LVM partitioning.
- Physical Volume: The underlying physical storage unit of an LVM is a block device such as a partition of a disk or the whole disk. To use the block device for an LVM logical volume, the device must be initialized as a physical volume (PV).
- Volume Groups: Physical volumes (PV) are combined into volume groups (VG). This creates a pool of disk space out of which logical volumes can be allocated.
- Logical Volume: In LVM, a volume group is divided up one or more logical volumes. The logical volume is used by file systems and applications.
Basic Architecture of LVM
In LVM technology, one or more disks or disk partitions are initialized as physical volumes (PV). These physical volumes are then combined into a volume group (VG) which works as a pool of disk space. From volume groups, one or more logical volumes (LV) according to the system requirements can be created. This process is analogous to the way in which disks are divided into partitions. A logical volume is used by the file systems and applications by mounting to a mount point. The following image shows an overview of the LVM architecture.
CentOS 7.5 Installation with LVM Partitioning
Now we will start CentOS 7.5 installation with LVM partitioning. CentOS 7.5 can be installed on your server machine if it has minimum 256MB RAM 2GB disk space and 64 bit CPU architecture because CentOS 7.5 does not support 32 bit CPU architecture. We will complete CentOS 7.5 installation with the following 8 steps.
Step 1: Downloading CentOS 7.5 ISO and Making Bootable Drive
Before going to start CentOS 7.5 installation, you have to collect CentOS 7.5 ISO file and then burn this ISO file to a bootable media. The following steps will show how to download CentOS 7.5 ISO file and how to burn ISO file to a bootable media.
- Go to CentOS official site [centos.org] and click on GET CENTOS menu item and then click on DVD ISO button. Now choose your desired ISO file from this download page. Alternately, you can follow this link and download CentOS 7.5 from here.
- After downloading ISO file, burn the ISO image in a DVD or in a USB flash drive with your favorite burning software such as Nero[nero.com] or Power ISO [poweriso.com] and then start installation according to the below steps.
Step 2: Beginning Installation
After downloading and making bootable drive, we will now ready to start CentOS 7.5 installation. The following steps will show the initial procedures to start CentOS 7.5 installation.
- Press power button of your server machine and go to boot option menu according to your machine vender. Choose your boot media CD/DVD ROM if you use DVD or USB Flash Drive if you use Pen drive as your bootable media from boot menu.
- First window of CentOS 7.5 installation will appear. Press Enter key or just wait 60 seconds to go next window.
- It will now ask you to press Enter key to start installation. So, hit Enter key to begin installation.
- After checking a lot of system requirements, a graphical window will appear to choose language.
Step 3: Choosing Language
From this first graphical window, choose your operating system’s language and then click on Continue button. If you wish to keep English as your server language, just click Continue button. Installation Summery window will now appear to setup Localization, Software and System.
Step 4: Localization Setup
In localization setup, there are three types of configuration. Among them, Keyboard and Language Support will be selected according to previous language setup. Now you need to setup Date & Time. To setup date and time, click on Date & Time icon.
Select your region from Region dropdown menu and select your city from City dropdown menu. You are also able to adjust your Region and City by clicking your city on the map. Your time and date will be adjusted by selecting Region and City but double check your changed date and time below the map and then click on Done button.
Step 5: Software Setup
In software setup, there are two options. These are:
- Installation Source:Installation source will be automatically selected as Local Media. So, no need to change it.
- Software Selection: Minimal Install will be selected in Software Selection option. As we want to install CentOS 7.5 Graphical User Interface (GUI), we will change Minimal Install now. Click on Software Selection icon and then click on GNOME Desktop from Base Environment panel. Optionally you can select Development Tools, System Administration Tools, GNOME Applications and Office Suite and Productivity options from Add-Ons for Selected Environment panel. Click on Done button after choosing your Base Environment and Add-Ons.
Step 6: System Setup
There are two options in System setup. These are Installation Destination and Network & Hostname.In my previous article, I discussed how to configure network with the nmtui tool. So, after installation you can follow that article to configure your network. We will now configure Installation Destination according to the below steps.
- Click on INSTALLATION DESTINATION icon. Installation Destination window will appear.
- In Device Selection area click on disk icon which is shown within Local Standard Disks panel.
- From Other Storage Options, click on I will configure partitioning radio button and then click on Done button.
- Manual Partitioning window will appear now. Click on dropdown menu within New CentOS 7 Installation box and choose LVM option. By default LVM is selected because it is the recommended partitioning method.
- Now click on PLUS SIGN (+) located below the New CentOS 7 Installation ADD A NEW MOUNT POINT pop up window will appear. Choose /boot option from Mount Point dropdown menu and type 500 in Desired Capacity input box. By default, MB will be the unit of capacity if you do not mention it. Click on Add Mount Point button now. The /boot partition will not be included into LVM because boot loader cannot read LVM partition. So, by default it will be kept into standard partition. So, don’t be hesitated.
- Similarly, click on PLUS SIGN again and choose swap from Mount Point dropdown menu and put desired capacity equal to your RAM size in Desired Capacity input box. For example, if your RAM size is 1GB, put capacity value 1GB. Click on Add Mount Point button. You will now find your SWAP partition is under LVM partition and a default Volume Group named centos has been created. If you wish you can modify by clicking Modify button.
- Again click on PLUS SIGN and choose (/) root partition from Mount Pointdropdown menu and put your desired root partition value in Desired Capacity input box. If you wish to assign 10GB for your root partition, put value as 10GB but it must be less than or equal to total disk space-(/boot+swap). If you wish to keep all available disk space, keep this field blank. Click on Add Mount Point button.
- Click on Done button and then click on Accept Changes button in SUMMARY OF CHANGES window.
- Now click on Begin Installation button. CentOS will start installation according to your desired configuration.
Step 7: Root Password and User Creation
While installing required services, you have to provide Root Password and optionally you can create another local user in this time. To provide root password, click on Root Password option from USER SETTINGS area. Now provide root password in Root Password input box and confirm your password by typing again in Confirm input box and then click on Done button. If you wish to create a local user, click on USER CREATION option and provide necessary information.
Step 8: Finalizing GNOME Desktop Configuration
After installing software packages, CentOS will show a complete message and ask you to reboot your system. Reboot your server by clicking Reboot button.
After rebooting, CentOS will start Initial Setup. In Initial Setup page, it will ask to accept license agreement. So click on LICENSE INFORMATION and then click on I accept the license agreement checkbox and click Done button. We will not configure network and hostname at this time. So, click on FINISH CONFIGURTION button.
Now CentOS will ask to login to your system. You will find your local user is listed here if you provide information at the time of package installation. You can login with local user credential but we will now login with root (administrator) user. So, click on Not listed link and it will ask you to provide your known username. Put root in Username input box and click on Next button. Now it will ask you to provide password for root user. Put your root password that you provided at the time of package installation and click on Sign In button.
You will now be logged in as root user but before getting your Desktop, you will find some gnome initial setup pages. Do nothing here, just click Next or Skip button and finally you will find Start using CentOS Linux button. Click on this button and you will find your Desktop now.
If you face any confusion to follow the above steps, watch the below video about CentOS installation with LVM partitioning.
I hope it will reduce your confusion.
How to install CentOS 7.5 step by step with GNOME Desktop and LVM partitioning has been discussed in this article. I hope you will now be able to install your CentOS Linux server with LVM partitioning successfully. However, if you face any problem to install CentOS 7.5, feel free to discuss in comment or contact with me from Contact page. I will try my best to stay with you. In the next article, I will discuss how to manage LVM with the command line utility. So, keep with the System Zone.