Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Install Ubuntu Server 
2.1.
Steps to Install VM Ware Workstation
2.2.
Steps to Install Ubuntu on VM Ware workstation
3.
Install KVM
4.
Install Guest
5.
Virtual Network Setup 
6.
Frequently Asked Questions
6.1.
What is a VM?
6.2.
What is Server Administration?
6.3.
What is DHCP?
7.
Conclusion
Last Updated: Mar 27, 2024
Medium

Linux - Server Administration

Author Manish Kumar
1 upvote

Introduction

Linux server administration involves a lot of configuration. It is essential to have an error-free installation which can handle complex computations without any hassle. In this blog, we will learn how to install the ubuntu server on VMware, install guests and work with the KVM. We will also learn to configure network settings. Let's start setting up our Linux server. ✨

Install Ubuntu Server 

Ubuntu is the most popular Linux distribution available today. It is open source and comes with Long Term Support, making it suitable for large-scale adoption. Canonical Ltd handles its development and distribution. In further sections, we will go through the steps needed to install Ubuntu on virtual machines. 

Okay, you must wonder why to install it on virtual servers if we have physical servers available. Let's see the advantages of installing on virtual servers mentioned below:

✅ It is much easier to recover your system in case of failure.

✅ You can run multiple guests (server instances) on a single machine.

✅ It improves hardware efficiency.

✅ We can follow one task, one server idea to make things simple to manage. Create a virtual server for one job, such as a web server, streaming server, database etc.

Steps to Install VM Ware Workstation

✅ Step 1: Download the workstation from the official VM Ware download page. Choose the one based on your current OS.

Downloading Page


✅ Step 2: In this tutorial, we will download software for windows. Workstation 16 Pro is the paid version of VirtualBox, but they provide 30 days trial, which is enough for us to test things.

✅ Step 3: Install VM Ware workstation following the steps in the dialogue box.

Progress Image

Steps to Install Ubuntu on VM Ware workstation


✅ Step 1: Go to the Ubuntu website and download the server image. Make sure you are downloading the LTS version.

Download Ubuntu

 

✅ Step 2: Start the VM Ware workstation and create a virtual machine.

 

VM Ware Workstation

 

✅ Step 3: Select the downloaded iso image and proceed with default options to complete installation.

Step 3

Install KVM

KVM (Kernal Virtual Machine) is a virtualisation module built into the Linux Kernal that acts as a hypervisor on x86 architecture. We can run KVM as root to identify problems related to hardware. KVM command can even start guest machines directly. Let's go through the steps to install KVM:

✅ Step 1: Update the repositories by running the command sudo apt update.

 

✅ Step 2: Run the following command to install the necessary KVM packages

sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils

 

✅ Step 3: The process should get complete automatically—finally, press Y to complete the installation.

Install Guest

Guests are virtual machines that run on top of the KVM feature provided by Ubuntu. To install guest, the ubuntu server must have the KVM feature. KVM might not be available due to hardware limitations. Let's go through the steps needed to install guests:

✅ Step 1: First, check whether the hardware supports KVM using the following command.

egrep -c '(vmx|svm)' /proc/cpuinfo 

 

✅ Step 2: If the output is 0, there is no support. Any other output means support is there.

 

✅ Step 3: If KVM support is there, install the required packages using the following command.

$ sudo apt-get install kvm libvirt-bin ubuntu-vmbuilder
qemu bridge-utils virt-viewer

 

✅ Step 4: Add username to libvirtd group to gain access to system-wide libvirtd instances. 
 

✅ Step 5: Installation is complete. To check if the installation is valid, run the following command.

$ virsh -c qemu:///system list Id Name State 

Virtual Network Setup 

A virtual network enables the communication between the virtual machine and the physical host computer. This will eventually allow the contact of the VM with the outside world. Let's go through the steps to establish the virtual bridge network on the VM:

✅ Step 1: Open the command line interface to start working.

 

✅ Step 2: Install the bridge utility using the following command.

sudo apt-get install bridge-utils

 

✅ Step 3: Stop the current network services.

sudo invoke-rc.d networking stop

 

✅ Step 4: Set up the virtual network using the following command.

Edit /etc/network/
interfaces and add
the br0 section:

 

✅ Step 5: Restart the network services using the following code.

sudo /etc/init.d/networking restart

 

The virtual network is now up and running. We can use fixed IP addresses or DHCP to assign IP addresses dynamically.

Frequently Asked Questions

What is a VM?

A VM( Virtual Machine) is a system inside another system that uses the resources of the host computer. We can use this feature to have different operating systems on a single machine. 

What is Server Administration?

Server administration is a process which is a combination of various tasks, such as creating servers and domains, updating them, configuring servers and multiple tasks related to server management.

What is DHCP?

DHCP extends to Dynamic Host Configuration Protocol. It is a service that automatically assigns IP addresses whenever a new node is connected to the network. Most networking devices, such as routers, have DHCP functionality built into them.

Conclusion

In this article, we discussed Linux Server Administration. We went through different tasks of setting up a VM inside the ubuntu server and learned how to install the ubuntu server from scratch. We installed KVM and guest and set up the virtual network.

If you found this blog interesting, please visit these articles:

 

Please refer to our guided pathways on Code studio to learn more about DSACompetitive ProgrammingJavaScriptSystem Design, etc. Enrol in our courses, and use the accessible sample exams and questions as a guide. For placement preparations, look at the interview experiences and interview package.

Please do upvote our blogs if you find them helpful and informative!

Happy Learning!

Live masterclass