DevOps Prerequisite Part -1 :Linux Installation , Architecture, File Structure

Sabyasachi Ghosh
5 min readOct 28, 2022

--

Content :

  1. Installation of VM VirtualBox & Vagrant.
  2. Linux File system architecture.
  3. Linux Package Manager.
  4. Linux Operation system architecture.

Linux Installation and Basic Commands :

_________________________________________________________________

Installation :

  1. General Installation of Ubuntu or CentOS.
  2. Oracle VM Virtual Box
  3. Vagrant Installation

General installation is already well understood. We will here talk about using Virtual Box and Vagrant.

2 .Oracle VM VirtualBox Installation:

I used 6.1 builds Oracle VM VirtualBox:

Selection during Installation:

Operating System :Red Hat (64-bit).

RAM : minimum 2 GB allocation.

Hard-Disk Allocation : 20 GB Minimum.

Storage Capacity indication
Bidirectional : To work seamlessly between virtual Box and Original Laptop
CentOS Installed in Oracle VM Virtual Box

The FULL SCREEN Issue just after virtual box installation:

Open terminal in Oracle VM VirtualBox:

Command 1:

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Command 2:

sudo yum install perl gcc dkms kernel-devel kernel-headers make bzip2

Command 3: Navigate to devices -> Insert Guest Addition CD image

Click on Insert Guest Addition CD image

Command 4 : Reboot Virtual Box.

Command 5: navigate to view → Full-screen Mode

Click on View->Full screen Mode

3. Vagrant Installation:

We will be installing Vagrant and Operating system centos/7 Vagrant box.

# Two Links :

#1) Virtual Box Download:

Already discussed above.

#2) Vagrant Download:

Link to Download : for MacOS, Windows & Linux

Why Vagrant ?

Vagrant maintains one configuration file, called Vagrant file, where all configurations of a VM are mentioned. And Vagrant creates the Virtual Machine with the same configuration mentioned in the file.

For ease of development/ testing and Production we need to have same environment . In this scenario if I can transfer for example the Vagrant file to my colleague and he/she can start using the same environment for dev/test/prod.

I understood that the concept or the intention is same as Docker, because in both the case we want to have same environment/SW/Installations commonise for all three aspects of SW life cycle i.e. dev/test & production.

Vagrant as such offers only the CLI Interface it doesn't support GUI.

#3) Vagrant box initialization by CLI : Open Command Line interface “cmd” in windows and type on below commands.

a) Check vagrant version : vagrant -v

b) Initiate Vagrant with image Centos/7 : vagrant init centos/7

c) Switch up the Virtual Machine :vagrant up

d)Connection to vagrant : vagrant ssh

e)Stop a vagrant virtual machine : vagrant halt

f)Restart a vagrant virtual machine : vagrant reload

g)Suspend a vagrant virtual machine ( Stop Virtual machine while preserving its state: vagrant suspend

h)Destroy a vagrant virtual machine , It will also remove all resources associated with the particular virtual machine: vagrant destroy

_________________________________________________________________

Vagrant running in Virtual Box : An example
Vagrant running in Virtual Box

_________________________________________________________________

Linux File System Architecture:

/ → root directory : We can go to root directory by → cd /

~ →home directory: We can go to home directory directly by → cd ~

The structure below shows root directory and its folder structure :

e.g. : to go to desktop cd / → cd user( Sabyasachi)/cd Desktop

cd ~ → directly to home directory

_________________________________________________________________

Package Manager in Linux System :

Packaging formats and tools vary by platform:

  • For Debian / Ubuntu: .deb packages installed by apt and dpkg
  • For Rocky / Fedora / RHEL/CentOS: .rpm packages installed by yum
  • For FreeBSD: .txz packages installed by pkg

The most used ones are :

  1. YUM (Yellow Dog Updater) Package Manager :

YUM can perform such operations as searching for packages in repositories, installing packages from repositories, installing packages from .rpm files, updating the system, removing packages, and downgrading packages.

Gets used with CentOS.

2. APT(Advanced Package Tool) package manager :

APT (Advanced Package Tool) is a more advanced front-end for dpkg (Debian Package), the lowest-level package management system for Debian-based Linux distributions. APT is a powerful command-line package management tool providing an interface for better interactive usage. As with dpkg, APT can install, remove, and build packages.

Gets used with Ubuntu.

3. DNF (Dandified Packaging Tool)package manager

DNF (Dandified Packaging Tool) is a package manager that installs, updates, and removes packages on RPM-based Linux distributions. It is a more advanced version of the YUM manager and intended to be the replacement for YUM in RPM-based systems.

4. RPM (RPM Package Manager)

RPM is a popular package management tool in Red Hat Enterprise Linux-based distros. Using RPM, you can install, uninstall, and query individual software packages. Still, it cannot manage dependency resolution like YUM.

Different flavors of Linux Operating system :

The architecture of a Linux System consists of the following layers as below :

  • Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc.)
  • Kernel − It is the core component of Operating System, interacts directly with hardware, provides low level services to upper layer components.
  • Shell − An interface to kernel, hiding complexity of kernel’s functions from users. The shell takes commands from the user and executes kernel’s functions.
  • Utilities − Utility programs that provide the user most of the functionalities of an operating systems.

--

--

No responses yet