LinuxTechi https://www.linuxtechi.com Tue, 10 Oct 2023 11:03:10 +0000 en-US hourly 1 https://www.linuxtechi.com/wp-content/uploads/2020/02/cropped-linuxtechi-favicon-32x32.png LinuxTechi https://www.linuxtechi.com 32 32 How to Register Existing Kubernetes Cluster in Rancher https://www.linuxtechi.com/register-kubernetes-cluster-in-rancher/ https://www.linuxtechi.com/register-kubernetes-cluster-in-rancher/#respond Tue, 10 Oct 2023 11:03:10 +0000 https://www.linuxtechi.com/?p=16398 In this blog post, we will show you how to register an existing Kubernetes cluster in Rancher. Kubernetes is a powerful container orchestration platform, and Rancher is a robust Kubernetes management tool that simplifies the management of Kubernetes clusters. If you already have an existing ... Read more

The post How to Register Existing Kubernetes Cluster in Rancher first appeared on LinuxTechi.]]>
In this blog post, we will show you how to register an existing Kubernetes cluster in Rancher.

Kubernetes is a powerful container orchestration platform, and Rancher is a robust Kubernetes management tool that simplifies the management of Kubernetes clusters. If you already have an existing Kubernetes cluster and want to manage it with Rancher’s user-friendly interface, you’re in the right place.

Prerequisites:

  • A Running Kubernetes Cluster: You should already have a functional Kubernetes cluster up and running.
  • Access to the Cluster: Ensure you have the necessary permissions and credentials to access and make changes to your Kubernetes cluster.
  • Rancher Installed: You need to have Rancher installed and accessible. If you haven’t installed Rancher yet, you can find installation instructions in the official Rancher documentation.
  • Connectivity between Rancher and Kubernetes Cluster

Steps to Register an Existing Kubernetes Cluster into Rancher

Follow these steps to import your existing Kubernetes cluster into Rancher:

Step 1: Login to Rancher

Open a web browser and type your Rancher’s instance IP address.

Rancher-Login-Screen-Page

Log in with your Rancher credentials.

Step 2: Choose Import Existing Cluster

Once logged in, click on “Import Existing” option as show below,

Import-Existing-Kubernetes-Cluster-Rancher

In the next screen, choose “Generic” under ‘Cluster Management

Register-Exisiting-Kubernetes-Cluster-Rancher

Fill in the necessary details for your existing Kubernetes cluster:

  • Cluster Name
  • Description
  • Member Roles

Connect to your Kubernetes cluster via command line and run following commands to get cluster name of your Kubernetes cluster.

$ kubectl config current-context
Or
$ kubectl config view

Get-Cluster-Name-Kubernetes-Linux

As we can see our cluster name is “Kubernetes”, now head back to Rancher GUI and specify the cluster name there.

Fill-Details-Existing-Kubernetes-Cluster-Rancher

Click on Create.

We will get the following instructions to register Kubernetes cluster to Rancher. Run these commands into your Kubernetes cluster. In most of the cases, we are using self-signed certificates in Kubernetes, so we can run the highlighted command.

Instructions-To-Register-Kubernetes-Cluster-Rancher

Step 3: Registering Kubernetes Cluster to Rancher

Connect to your Kubernetes cluster via command line and run following command to register,

$ curl --insecure -sfL https://192.168.1.4/v3/import/fhpr4677wjbnzggdw9fjrtlq9stqnl5vbhpq8wpskmvtxz948v7cxx_c-m-kqs8twh5.yaml | kubectl apply -f -

Run-Command-Kubernetes-Register-Rancher

Above command will create the necessary ClusterRole, namespace, secret and deployments etc.

Wait for 2 to 3 minutes to start all the Kubernetes objects and then head back to Rancher UI.

Regsitered-Kubernetes-Cluster-Status-Rancher

Perfect, above screen confirms that our Kubernetes cluster is registered successfully on Rancher UI.

Now, when you go to home page of Rancher, you will see one more cluster is available there,

Rancher-Dashboard-Home-Page-New-K8s-Cluster

When you click on newly registered cluster, you will get all details as shown below.

Registered-Kubernetes-Details-Rancher-UI

That’s all from this post, I hope you have found it useful and informative. kindly do post your queries and feedback in below comments section.

Conclusion

Registering an existing Kubernetes cluster into Rancher is a straightforward process that empowers you to take advantage of Rancher’s management capabilities without the need for a fresh Kubernetes installation. Whether you’re looking to simplify cluster management or enhance your Kubernetes workflows, Rancher provides a user-friendly solution for achieving these goals.

The post How to Register Existing Kubernetes Cluster in Rancher first appeared on LinuxTechi.]]>
https://www.linuxtechi.com/register-kubernetes-cluster-in-rancher/feed/ 0
How to Install and Configure VNC Server on RHEL 9 https://www.linuxtechi.com/install-configure-vnc-server-on-rhel-9/ https://www.linuxtechi.com/install-configure-vnc-server-on-rhel-9/#respond Sun, 08 Oct 2023 16:07:36 +0000 https://www.linuxtechi.com/?p=16385 In this guide, we demonstrate how to install and configure VNC server on RHEL 9. Virtual Network Computing, popularly known as VNC, is a network protocol for accessing graphical desktops of remote systems. The protocol transfers the mouse and keyboard inputs back and forth between ... Read more

The post How to Install and Configure VNC Server on RHEL 9 first appeared on LinuxTechi.]]>
In this guide, we demonstrate how to install and configure VNC server on RHEL 9.

Virtual Network Computing, popularly known as VNC, is a network protocol for accessing graphical desktops of remote systems. The protocol transfers the mouse and keyboard inputs back and forth between the server, which is the system being remotely accessed and the client, which is the device used to access or connect to the remote server.

The VNC protocol is beneficial to IT support teams when it comes to offering assistance to remote teams. It’s lightweight and uses negligible CPU and RAM. As such it it can be run on low-specification hardware.

Prerequisites

  • Pre-Installed RHEL 9 System with Desktop Environment
  • Sudo user with admin rights
  • Red Hat Subscription or locally configured yum repository.

Without any delay, let’s deep dive into VNC server installation and configuration steps.

1) Install VNC Server on RHEL 9

The first step is to install TigerVNC (or VNC server) on your instance of RHEL 9. To do so, log in and, first, update the system.

$ sudo dnf update -y

Reboot your system all the updates are installed.

$ sudo reboot

Next, install TigerVNC as shown.

$ sudo dnf install tigervnc-server -y

Install-VNC-Server-RHEL9-DNF-Command

The command installs TigerVNC alongside other additional packages and dependencies.

2) Configure TigerVNC

The next step is to set up TIgerVNC to allow remote users access to our Red Hat desktop environment.  To proceed, copy the default configuration file which is the vncserver@.service file to the /etc/systemd/system directory. Be sure to also include the display number on which to listen to the VNC service.

Here, we will specify the display number as 3.

$ sudo cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:3.service

Next, you need to set a username for a regular login user. To do so, edit the VNC users’ file as follows.

$ sudo vim /etc/tigervnc/vncserver.users

Add the display number and user.

:3=linuxtechi

VNC-Display-Number-RHEL9

Save the changes and exit the configuration file. Next, set the user’s password using the command:

$ vncpasswd

Provide the password and verify it. When asked whether to enter a view-only password, decline by typing ‘n’ and hit ENTER.

Set-VNC-Password-RHEL9

Next, configure GNOME to be the current session. This will be the session for the VNC server.

$ echo gnome-session > ~/.session

Thereafter, create a configuration file inside the VNC hidden directory which resides in the home directory.

$ vim ~/.vnc/config

Add the following configuration.

session=gnome
securitytypes=vncauth,tlsvnc
geometry=1280x720

The first line tells VNC to use the GNOME environment.The second line specifies the standard security for VNC during authentication. In the last line, the ‘geometry‘ flag specifies the screen resolution. You can set this to your preferred resolution.

Save the changes and exit the configuration file.

3) Start and Enable VNC Service

Next, start and enable the VNC service.

$ sudo systemctl start vncserver@:3.service
$ sudo systemctl enable vncserver@:3.service

Start-Enable-VNC-Server-Service-RHEL9

4) Configure Firewall

Be sure to also allow the VNC server service across the firewall.

$ sudo firewall-cmd --permanent --add-service=vnc-server
$ sudo firewall-cmd --permanent --add-port=5902/tcp

Next, reload the firewall to apply the changes.

$ sudo firewall-cmd --reload

Firewall-Rules-for-VNC-Server-RHEL9

5) Access the VNC Server From a Remote System

With the VNC server already configured, the last step is to access it remotely from a different system. But first, check the IP address of the VNC server using ip command:

$ ip a

Check-IP-Address-IP-Command-RHEL9

Next, install the TigerVNC client application by downloading the binary file from source Forge

Launch the application and provide the VNC server IP and display number as shown. Then click ‘Connect’.

VNC-viewer-Connect-Remote-System

Next, provide the VNC user’s password and hit ENTER.

Enter-VNC-Password-for-VNC-Server-RHEL9

Finally, you will see the login screen shown.

RHEL-Login-Screen-Post-VNC-Viewer-Connection

From here you can, straightaway, log in using the user’s login password.

RHEL-9-Desktop-Enviornment-via-VNC-Viewer

Conclusion

We have demonstrated how to install and set up VNC Server on RHEL 9. We hope you found this useful. Feel free to weigh in with your feedback.

The post How to Install and Configure VNC Server on RHEL 9 first appeared on LinuxTechi.]]>
https://www.linuxtechi.com/install-configure-vnc-server-on-rhel-9/feed/ 0
How to Install LMDE 6 (Linux Mint Debian Edition) https://www.linuxtechi.com/install-lmde-linuxmint-debian-edition/ https://www.linuxtechi.com/install-lmde-linuxmint-debian-edition/#respond Sat, 30 Sep 2023 04:17:42 +0000 https://www.linuxtechi.com/?p=16315 The step-by-step guide on this page will show you how to install LMDE 6 (Linux Mint Debian Edition) on your computer. LMDE is a Linux Mint project which provides popular Linux distribution that combines the elegance and ease of Linux Mint with the Debian base, ... Read more

The post How to Install LMDE 6 (Linux Mint Debian Edition) first appeared on LinuxTechi.]]>
The step-by-step guide on this page will show you how to install LMDE 6 (Linux Mint Debian Edition) on your computer.

LMDE is a Linux Mint project which provides popular Linux distribution that combines the elegance and ease of Linux Mint with the Debian base, offering a more rolling release experience. Codename of LMDE 6 is Faye.

Recently LMDE 6 has been released with new features and improvements.

  • Linux Kernel 6.1
  • Improved Cinnamon 5.8 desktop environment
  • Touchpad gesture support
  • Resizable Mint Menu
  • Improved Software Manager and support for HEIF & AVIF images.
  • Improved Login screen.

System Requirements for LDME 6

  • 2 GB RAM or more
  • 2 CPU core or more
  • 40 GB hard disk space
  • Bootable Media (USB / DVD)
  • Reliable Internet Connection (Optional)

Let’s get started with LMDE 6 Installation steps.

1) Download LMDE 6 ISO

Download LMDE 6 ISO file from below Linux Mint official web page.

Once the ISO file is downloaded then prepare the installation media by burning ISO file into USB drive or DVD. On Windows, use Rufus to create bootable USB drive from ISO file and on Linux use below:

2) Boot from Installation Media

Insert the bootable USB drive or DVD into your computer and boot from it. You may need to access your system’s BIOS or UEFI settings to set the boot order correctly. Once booted, you’ll see the LMDE 6 welcome screen.

LMDE6-Welcome-Screen-Installation

Choose first option “Start LMDE” and hit enter.

Click-Install-Linux-Mint-to-Start-LMDE6-Installation

Click on “Install Linux Mint

Click-Lets-Go-LMDE6-Installation

Select “Let’s go!” and hit enter.

3) Choose Your Preferred Language

Select your preferred language and then click “Next” to proceed.

Language-Selection-For-LMDE6-Installation

4) Select Your Time Zone

Choose the time zone that suits to your installation and then click Next

Choose-TimeZone-During-LMDE6-Installation

5) Keyboard Layout for LDME 6

In this step, you will be asked to choose keyboard layout that suits to your installation and then click Next to proceed.

Keyboard-Layout-for-LMDE6

6) Create User and Set Host Name

Enter your full name, computer’s name, username, and password. Ensure you choose a strong password. You can also choose to log in automatically if desired. Click “Next.”

Create-UserName-Hostname-LMDE6-Installation

7) Installation Options

You’ll be presented with following installation options:

  • Erase Disk and Install LMDE 6: This option will erase the entire disk and install LMDE. Choose this if you want a clean installation.
  • Manual Partitioning: Advanced users can choose this option to manually configure partitions.

Select the option that suits your needs. For this guide, we’ll choose “Erase Disk and Install LMDE

Automated-Installation-Type-LMDE6

Click Next and then in the following screen choose ‘Yes’ to erase the data from hard disk.

Erase-Data-Before-Installing-LDME6

Select the hard disk for GRUB installation and then click Next to proceed with installation.

Note: Choose the same disk on which you are installing the LMDE 6

Grub-Installation-Disk-LMDE6

In the following screen, you will get Installation summary overview, cross verify the things and then click on “Install” to begin LMDE 6 installation.

Installation-Summary-Overview-LMDE6

8) LMDE 6 Installation Progress

On this step, LMDE 6 installation has started and is in progress.

LMDE6-Installation-Progress

Once LMDE 6 installation is completed, installer will prompt us to reboot the system.

Reboot-After-LMDE6-Installation

Click Yes to restart the computer. Don’t forget to remove the installation media and change the boot settings from BIOS so that system boots up with hard disk.

9) LMDE 6 Login Screen and Desktop

Upon reboot, you’ll be greeted with the LMDE 6 login screen. Use the same username and password that you have created during Step 6.

LMDE6-Login-Screen-After-Installation

After entering the credentials hit enter and this will take us to the desktop environment.

Desktop-Enviornment-LMDE6

Conclusion

Congratulations! You’ve successfully installed Linux Mint Debian Edition 6 (LMDE 6) on your computer. LMDE offers a stable, rolling release experience with the elegance and user-friendliness that Linux Mint is known for. Explore the world of LMDE, customize it to your liking, and enjoy a robust and reliable Linux experience on your machine.

The post How to Install LMDE 6 (Linux Mint Debian Edition) first appeared on LinuxTechi.]]>
https://www.linuxtechi.com/install-lmde-linuxmint-debian-edition/feed/ 0
How to Install Rancher on Rocky Linux 9 / AlmaLinux 9 https://www.linuxtechi.com/install-rancher-on-rockylinux-almalinux/ https://www.linuxtechi.com/install-rancher-on-rockylinux-almalinux/#respond Fri, 29 Sep 2023 11:05:22 +0000 https://www.linuxtechi.com/?p=16300 In this guide, we will show you how to install Rancher on Rocky Linux 9 and AlmaLinux 9. Rancher is a versatile and powerful container management platform that simplifies the deployment and orchestration of Kubernetes clusters. If you’re using Rocky Linux 9 or AlmaLinux 9 ... Read more

The post How to Install Rancher on Rocky Linux 9 / AlmaLinux 9 first appeared on LinuxTechi.]]>
In this guide, we will show you how to install Rancher on Rocky Linux 9 and AlmaLinux 9.

Rancher is a versatile and powerful container management platform that simplifies the deployment and orchestration of Kubernetes clusters. If you’re using Rocky Linux 9 or AlmaLinux 9 as your preferred Linux distribution and want to leverage Rancher’s capabilities for managing your containerized applications, you’re in the right place.

Prerequisites

  • A fresh installation of Rocky Linux 9 or AlmaLinux 9.
  • Minimum 2 vCPU and 4 GB RAM
  • Sudo user with administrative privileges
  • A stable internet connection to download Rancher Image

Without any delay, let’s jump into Rancher installation steps.

1) Update Your System

Start by updating your system’s package list and upgrading installed packages to their latest versions. Open your terminal and run:

$ sudo dnf update -y

Reboot your system, post installing updates.

$ sudo reboot

2) Install Docker

Rancher relies on Docker as a container runtime. Before installing docker make sure Podman and buildah are removed first.

$ sudo dnf remove podman buildah -y

Next , add docker depository using following dnf command.

$ sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

Now, install docker using beneath command,

$ sudo yum install docker-ce docker-ce-cli containerd.io -y

Install-Docker-on-RockyLinux9

Post docker installation, add your local user to docker group, run

$ sudo usermod -aG docker $USER
$ newgrp docker

3) Start and Enable Docker Service

Start and enable docker service by running beneath command,

$ sudo systemctl enable docker --now

Verify the docker service

$ systemctl status docker

Docker-Service-Status-RockyLinux9

4) Install Rancher on Rocky Linux 9 / AlmaLinux 9

Now, we’ll use Docker to deploy Rancher. Before running the docker command, make sure following kernel modules are loaded, run beneath modprobe command

$ sudo modprobe ip_tables
$ sudo modprobe ip_conntrack
$ sudo modprobe iptable_filter
$ sudo modprobe ipt_state

Next run the following command to start the Rancher container:

$ sudo docker run -d --name=rancher --privileged --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:latest

Install-Rancher-Docker-Image-RockyLinux9

This command will download the latest Rancher image if it’s not already available locally and start the Rancher server. It will also ensure that Rancher starts automatically on system boot. Additionally, it is maps host port 80 & 443 to the container port 80 & 443 respectively and starts the container in privileged mode.

Once the above command is executed successfully, verify rancher container status using below docker command.

$ docker ps

Rancher-Container-Status-RockyLinux9

Perfect, above output confirms that rancher container is up and running.

We can check logs of rancher container using following command,

$ docker logs rancher

Rancher-Container-Logs-RockyLinux9

5) Allow Rancher Ports in Firewall

If OS firewall is enabled on your Rocky Linux or AlmaLinux then allow port 80 and 443. Execute following firewall-cmd commands.

$ sudo firewall-cmd --add-service http --permanent
$ sudo firewall-cmd --add-service https --permanent
$ sudo firewall-cmd --reload

6) Access the Rancher Web Interface

After the Rancher container is up and running, give it a few moments to initialize. Then, open your web browser and type your server’s IP address. You should see the Rancher login screen.

http://<Server-IP-Address>

Accept-Risk-Rancher-Interface-RockyLinux9

Click on “Accept the Risk and Continue

In the next screen you will be prompted to enter the password. Retrieve the password by running following command on the terminal.

$ docker ps | grep -i rancher
$ docker logs  container-id  2>&1 | grep "Bootstrap Password:"

Rancher-Bootstrap-Password-RockyLinux9

Copy the password and past it on the Rancher Web Interface,

Rancher-Welcome-Login-Page-RockyLinux9

Click on “Log in with Local User

In the following screen, create an admin password and accept the end user license agreement.

Rancher-Admin-User-Password-Agreement-RockyLinux9

Click Continue to complete the setup process, and you’ll be redirected to the Rancher dashboard.

Rancher-Dashboard-Overview-RockyLinux9

Great, above confirms that Rancher has been setup correctly.

From the Rancher dashboard, you can now start adding Kubernetes clusters, whether they are local clusters, imported clusters, or clusters provisioned on your preferred cloud provider.

That’s all from this guide, we hope you have found it informative and useful. Kindly do post your queries and feedback in below comments section.

Conclusion

You’ve successfully installed Rancher on Rocky Linux 9 or AlmaLinux 9, opening the door to streamlined container management and Kubernetes orchestration. With Rancher, you can easily manage your clusters, deploy applications, and monitor your containerized infrastructure.

Remember that Rancher is a powerful tool with a wide range of features, so take the time to explore its capabilities and make the most of your containerized environment.

The post How to Install Rancher on Rocky Linux 9 / AlmaLinux 9 first appeared on LinuxTechi.]]>
https://www.linuxtechi.com/install-rancher-on-rockylinux-almalinux/feed/ 0
How to Install VirtualBox Guest Additions on RHEL 9 https://www.linuxtechi.com/install-virtualbox-guest-additions-on-rhel/ https://www.linuxtechi.com/install-virtualbox-guest-additions-on-rhel/#respond Sun, 24 Sep 2023 15:49:59 +0000 https://www.linuxtechi.com/?p=16280 In this post, we will show you how to install VirtualBox Guest Additions on RHEL 9. VirtualBox is a popular virtualization platform that allows you to create and run virtual machines on various host operating systems. While running a virtual machine, you may have experienced ... Read more

The post How to Install VirtualBox Guest Additions on RHEL 9 first appeared on LinuxTechi.]]>
In this post, we will show you how to install VirtualBox Guest Additions on RHEL 9.

VirtualBox is a popular virtualization platform that allows you to create and run virtual machines on various host operating systems. While running a virtual machine, you may have experienced limitations in terms of screen resolution, mouse integration, and file sharing between the host and guest systems. Fortunately, VirtualBox Guest Additions can help overcome these limitations by providing additional drivers and features.

Prerequisites

  • A Running RHEL 9 Virtual Machine on VirtualBox
  • A sudo user with admin rights
  • Red Hat Subscription or locally configure Repository.
  • Internet Connectivity in case you are using Red Hat subscription.

Without any further delay, let’s jump into VirtualBox guest additions steps.

Step 1: Start Your RHEL 9 Virtual Machine

Ensure that your RHEL VM is up and running inside the VirtualBox. Without installing VirtualBox guest additions, VM screen will look like below,

RHEL9-VM-VirtualBox-GUI

Step 2: Install Required Dependencies

VirtualBox Guest Additions require some prerequisites to be installed on your RHEL virtual machine. Install these dependencies using the following command:

$ sudo dnf install kernel-devel -y

Install-Kernel-Devel-RHEL-VBox-Guest-Additions

This command will install essential tools and libraries needed for the Guest Additions installation.

Step 3: Mount the VirtualBox Guest Additions ISO

In the VirtualBox window, select “Devices” from the top menu, and then click “Insert Guest Additions CD Image.” This action will mount the Guest Additions ISO inside your virtual machine.

Insert-Guest-Additions-CD-Image-RHEL9-Virtual-Machine

Step 4: Install VirtualBox Guest Additions on RHEL 9

Open your terminal in RHEL and navigate to the directory where the Guest Additions ISO is mounted. The default path is typically “/run/media/$USER/VirtualBoxGuestAdditions.”

$ cd /run/media/linuxtechi/VBox_GAs_7.0.4/

To install guest additions, run the following command as root or with sudo privileges:

$ sudo ./VBoxLinuxAdditions.run

This script will install the VirtualBox Guest Additions kernel modules and drivers on your RHEL virtual machine.

Step 5: Reboot Your Virtual Machine

After the installation completes successfully, it’s a good practice to reboot your virtual machine for the changes to take effect:

$ sudo reboot

Step 6: Verify Guest Additions Installation

Once your virtual machine has restarted, you can verify the installation by checking the status of the VirtualBox Guest Additions service:

$ sudo systemctl status vboxadd

If the service is active (running), you have successfully installed VirtualBox Guest Additions on your RHEL virtual machine.

Check-Guest-Additons-Service-Status-RHEL-VM-VirtualBox

With VirtualBox Guest Additions installed, you can now enjoy enhanced features such as improved screen resolution, seamless mouse integration, and the ability to share files between your host and guest operating systems.

Validate-VBox-Guest-Additions-RHEL9-VirtualBox

Conclusion

VirtualBox Guest Additions are essential for improving the usability and functionality of your virtual machines. By following this step-by-step guide, you’ve learned how to install Guest Additions on RHEL 9, making your virtualization experience smoother and more efficient. Now you can fully harness the power of VirtualBox for your development and testing needs.

The post How to Install VirtualBox Guest Additions on RHEL 9 first appeared on LinuxTechi.]]>
https://www.linuxtechi.com/install-virtualbox-guest-additions-on-rhel/feed/ 0
How to Install Kubernetes on Rocky Linux 9 | AlmaLinux 9 https://www.linuxtechi.com/install-kubernetes-on-rockylinux-almalinux/ https://www.linuxtechi.com/install-kubernetes-on-rockylinux-almalinux/#respond Sun, 17 Sep 2023 11:53:11 +0000 https://www.linuxtechi.com/?p=16214 In this blog post, we will explain how to install Kubernetes cluster on Rocky Linux 9 or AlmaLinux 9 with Kubeadm utility. Kubernetes, often referred to as K8s, is an open-source container orchestration platform. With its robust capabilities for automating deployment, scaling, and managing containerized ... Read more

The post How to Install Kubernetes on Rocky Linux 9 | AlmaLinux 9 first appeared on LinuxTechi.]]>
In this blog post, we will explain how to install Kubernetes cluster on Rocky Linux 9 or AlmaLinux 9 with Kubeadm utility.

Kubernetes, often referred to as K8s, is an open-source container orchestration platform. With its robust capabilities for automating deployment, scaling, and managing containerized applications, Kubernetes has become the go-to solution for DevOps teams worldwide.

Prerequisites

  • A fresh Installation of Rocky Linux 9 or AlmaLinux 9
  • Sudo user with admin rights
  • Minimum of 2 GB RAM, 2 vCPUs and 20 GB Disk Space
  • A reliable Internet Connection

Lab Setup

We have used three Virtual machines with following specification.

  • K8s-master01 –  192.168.1.190
  • K8s-worker01 –  192.168.1.191
  • K8s-worker02 –  192.168.1.192
  • Sysops as sudo user on each node

Without any further delay, lets deep dive into Kubernetes installation steps.

Step 1: Set Hostname and Update Hosts file

Login or ssh each machine and run hostnamectl commands to set their respective hostname.

$ sudo hostnamectl set-hostname “k8s-master01” && exec bash
$ sudo hostnamectl set-hostname “k8s-worker01” && exec bash
$ sudo hostnamectl set-hostname “k8s-worker02” && exec bash

Add the following entries in /etc/hosts file on each node.

192.168.1.190   k8s-master01
192.168.1.191   k8s-worker01
192.168.1.192   k8s-worker02

Step 2: Disable Swap Space on Each Node

For kubelet to work smoothly, we must disable swap space on all the nodes. Run beneath command,

$ sudo swapoff -a
$ sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab

Step 3: Adjust SELinux and Firewall Rules for Kubernetes

Set SELinux mode as permissive on all the nodes using following commands,

$ sudo setenforce 0
$ sudo sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/sysconfig/selinux

On the master node, allow following ports in the firewall.

$ sudo firewall-cmd --permanent --add-port={6443,2379,2380,10250,10251,10252,10257,10259,179}/tcp
$ sudo firewall-cmd --permanent --add-port=4789/udp
$ sudo firewall-cmd --reload

On the Worker Nodes, allow beneath ports in the firewall,

$ sudo firewall-cmd --permanent --add-port={179,10250,30000-32767}/tcp
$ sudo firewall-cmd --permanent --add-port=4789/udp
$ sudo firewall-cmd --reload

Step 4: Add Kernel Modules and Parameters

For kuberetes cluster, we must add the overlay and br_netfilter kernel modules on all the nodes.

Create a file and add following content to it,

$ sudo tee /etc/modules-load.d/containerd.conf <<EOF
overlay
br_netfilter
EOF

In order to load above modules, run

$ sudo modprobe overlay
$ sudo modprobe br_netfilter

Next, add the following kernel parameters, create a file and with following content,

$ sudo vi /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables  = 1
net.ipv4.ip_forward                 = 1
net.bridge.bridge-nf-call-ip6tables = 1

Save & close the file.

Now add these parameters by running below command

$ sudo sysctl --system

Step 5: Install Conatinerd Runtime

Kubernetes requires a container runtime, and one of the most popular choices is containerd. But It is not available in the default package repositories of Rocky Linux or AlmaLinux, so add the following docker repo on all the nodes.

$ sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Now, run following dnf command to install containerd on all the nodes.

$ sudo dnf install containerd.io -y

Install-Containerd-Runtime-RockyLinux-AlmaLinux-Dnf-Command

Configure containerd so that it will use systemdcgroup, execute the following commands on each node.

$ containerd config default | sudo tee /etc/containerd/config.toml >/dev/null 2>&1
$ sudo sed -i 's/SystemdCgroup \= false/SystemdCgroup \= true/g' /etc/containerd/config.toml

Restart and enable containerd service using beneath commands,

$ sudo systemctl restart containerd
$ sudo systemctl enable containerd

Verify conatinerd service status, run

$ sudo systemctl status containerd

Containerd-Service-Status-RockyLinux-AlmaLinux

Step 6: Install Kubernetes tools

Kubernetes tools like Kubeadm, kubectl and kubelet are not available in the default package repositories of Rocky Linux 9 or AlmaLinux 9. So, to install these tools, add the following repository on all the nodes.

$ cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v1.28/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.28/rpm/repodata/repomd.xml.key
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
EOF

Adding-Kubernetes-Repository-RockyLinux9-AlmaLinux9

Note: At time of writing this post, Kubernetes 1.28 version was available, that’s why I have mentioned v1.28 while adding the repo.

Next, install Kubernetes tools by running following dnf command,

$ sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

Install-Kubernetes-tools-RockyLinux-AlmaLinux

After installing Kubernetes tools, start the kubelet service on each node.

$ sudo systemctl enable --now kubelet

Step 7: Install Kubernetes Cluster on Rocky Linux 9 / Alma Linux 9

Now, we are all set to install Kubernetes cluster. Run beneath Kubeadm command to initialize the Kubernetes cluster from the master node.

$ sudo kubeadm init --control-plane-endpoint=k8s-master01

Once above command is executed successfully, we will get following output,

Install-kubernetes-cluster-rockylinux9-almalinux9-kubeadm-command

From the output above make a note of the command which will be executed on the worker nodes to join the Kubernetes cluster.

To start interacting with Kubernetes cluster, run the following commands on the master node.

$ mkdir -p $HOME/.kube
$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
$ sudo chown $(id -u):$(id -g) $HOME/.kube/config

Next, join the worker nodes to the cluster, run following Kubeadm command from the worker nodes.

$ kubeadm join k8s-master01:6443 --token 69s57o.3muk7ey0j0zknw69 \
  --discovery-token-ca-cert-hash sha256:8000dff8e803e2bf687f3dae80b4bc1376e5bd770e7a752a3c9fa314de6449fe

Output from Worker01

Worker01-Join-Kubernetes-Cluster

Output from Worker02

Worker02-Join-Kubernetes-Cluster

Now, head back to master node and run kubectl command to verify the nodes status.

$ kubectl get nodes

Kubectl-Get-Nodes-RockyLinux-AlmaLinux

Output above shows that nodes is “NoteRead”, so to make the nodes status “Ready”, install Calico network addon or plugin in the next step.

Step 8: Install Calico Network Addon

Calico network addon is required on Kubernetes cluster to enable communication between pods, to make DNS service function with the cluster and to make the nodes status as Ready.

In order to install calico CNI (Container Network Interface) addon, run following kubectl commands from the master node only.

$ kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/calico.yaml

Install-Calico-Addon-Kubernetes-RockyLinux-AlmaLinux

Verify calico pods status,

$ kubectl get pods -n kube-system

Calico-Pods-Status-Kubernetes-RockyLinux-AlmaLinux

Next, verify the nodes status, this time nodes status should be in Ready State.

$ kubectl get nodes

Nodes-Status-Post-Calico-Addon-Installation

Perfect, output above confirms nodes are in Ready state and can handle workload. Let’s test our Kubernetes installation the next step.

Step 9: Test Kubernetes Cluster Installation

To test Kubernetes cluster installation, let’s try to deploy nginx based application using deployment. Run following kubectl commands,

$ kubectl create deployment web-app01 --image nginx --replicas 2
$ kubectl expose deployment web-app01 --type NodePort --port 80
$ kubectl get deployment web-app01
$ kubectl get pods
$ kubectl get svc web-app01

Test-Kubernetes-Installation-RockyLinux-AlmaLinux

Try to access the application using nodeport “31121”, run following curl command,

$ curl k8s-worker01:31121

Access-Nginx-App-Kubernetes-RockyLinux-AlmaLinux

Great, above confirms that we can access our application web page. This also confirms that our Kubernetes cluster has been installed successfully.

That’s all from this post, we believe that you have found informative and useful. If you have any queries and feedback, please do post it in below comments section.

Also Read: How to Install and Access Kubernetes Dashboard Step-by-Step

The post How to Install Kubernetes on Rocky Linux 9 | AlmaLinux 9 first appeared on LinuxTechi.]]>
https://www.linuxtechi.com/install-kubernetes-on-rockylinux-almalinux/feed/ 0
How to Create Virtual Machine in Proxmox VE Using Web UI https://www.linuxtechi.com/create-virtual-machine-in-proxmox-ve-web-ui/ https://www.linuxtechi.com/create-virtual-machine-in-proxmox-ve-web-ui/#respond Mon, 11 Sep 2023 01:30:58 +0000 https://www.linuxtechi.com/?p=16160 In this post, we will cover how to create a virtual machine in Proxmox VE using the web interface (UI). Proxmox Virtual Environment (VE) is a versatile and powerful platform that allows you to manage virtual machines (VMs) and containers from a centralized web interface. ... Read more

The post How to Create Virtual Machine in Proxmox VE Using Web UI first appeared on LinuxTechi.]]>
In this post, we will cover how to create a virtual machine in Proxmox VE using the web interface (UI).

Proxmox Virtual Environment (VE) is a versatile and powerful platform that allows you to manage virtual machines (VMs) and containers from a centralized web interface. Whether you are a system administrator, a developer, or just a virtualization enthusiast, Proxmox VE provides a user-friendly and feature-rich environment to create and manage VMs effortlessly.

Prerequisites

  • A Proxmox VE installation running and accessible through a web browser.
  • Administrative access to the Proxmox VE web interface.
  • Familiarity with basic virtualization concepts.

1) Login to Proxmox VE Web Interface

Open your preferred web browser and enter the URL of your Proxmox VE server. Typically, this will be in the format `https://your_proxmox_server_ip:8006`. Enter the credentials and login to web interface,

Proxmox-VE-Web-UI-Screen

2) Upload ISO Image

We  will create a Rocky Linux VM, so I have uploaded Rocky Linux 9.2 ISO file as show below,

Upload-ISO-File-Proxmox-VE-Web-UI

Choose “local (pv01)“–> ISO Image –> Select the ISO File and then click on Upload.

3) Create a New Virtual Machine in Proxmox VE

To create a new virtual machine, click the “Create VM” button located at the top of Web Interface.

Virtual-Machine-Wizard-Proxmox-VE-Web-Interface

It will start a Virtual machine wizard, follow the steps,

General Settings
  • Enter a unique name for your VM.
  • Choose the Node (physical server) where the VM will run.
  • Set the VM ID (usually auto-generated unless you have a specific ID in mind).

VM-General-Settings-Proxmox-VE-WebUI

Click on Next

OS Image Selection
  • Choose the ISO image for the operating system you want to install on the VM.
  • Select Storage as Local, Guest OS type as Linux and Version (6.x-2.6 kernel)

OS-Selection-ISO-File-VM-Wizard-Proxmox-VE

System

Under system tab, select the Graphic card, BIOS and SCSI Controller for the VM.

System-Defaults-VM-Proxmox-VE-WebUI

Click on Next

Hard Disk

Specify disk size for your VM and storage as local-lvm.

Disk-Size-VM-Proxmox-VE-WebUI

CPU & Memory

In CPU tab, select the socket and number cores and CPU type.

CPU-Details-VM-Proxmox-VE-WebUI

In memory tab, specify the memory (MiB) for the VM.

Memory-for-VM-Proxmox-VE-WebUI

Click Next,

Network

In this tab, select the network for the VM. Choose vmbr0 as Bridge and Model as “Virtio paravirtualized

Note: Linux bridge vmbr0 created automatically during Proxmox installation. VM interface will be mapped to this bridge.

VM-Networking-Proxmox-VE-WebUI

Click Next

Confirm

On this tab, review the VM details and click on Finish to start creating the virtual machine.

Review-VM-Details-Proxmox-VE-WebUI

4) Install the Operating System

Your new VM will appear under host pv01, so to begin the installation, select the VM and click the “Start” button and then click on Console.

Start-VM-Console-Proxmox-VE-WebUI

Follow the screen instructions and complete OS installation.

OS-Installation-Completed-VM-Proxmox-VE

Great, above confirms that OS installation is completed, click on “Reboot System” to restart the VM.

After the reboot we will get VM console, login the VM using credentials that you created during the installation and start using the VM.

VM-Console-After-OS-Installation-Proxmox-VE

5) Start and Manage Your VM

After completing the installation, your VM will be listed in the Virtual Machine Manager. You can start, stop, restart and pause the VM.

Manage-VM-Proxmox-VE-WebUI

That’s all from this guide, I believe you have found it informative and useful. Kindly do post your queries and feedback in below comments section.

The post How to Create Virtual Machine in Proxmox VE Using Web UI first appeared on LinuxTechi.]]>
https://www.linuxtechi.com/create-virtual-machine-in-proxmox-ve-web-ui/feed/ 0
How to Install Proxmox VE on Bare Metal Step-by-Step https://www.linuxtechi.com/install-proxmox-ve-on-bare-metal/ https://www.linuxtechi.com/install-proxmox-ve-on-bare-metal/#comments Sat, 09 Sep 2023 16:12:40 +0000 https://www.linuxtechi.com/?p=16140 The step-by-step guide on this page will show you how to Install Proxmox VE on bare metal. Proxmox Virtual Environment (VE) is a powerful, open-source platform for managing virtual machines (VMs) and containers. It combines two virtualization technologies, KVM (Kernel-based Virtual Machine) for virtual machines ... Read more

The post How to Install Proxmox VE on Bare Metal Step-by-Step first appeared on LinuxTechi.]]>
The step-by-step guide on this page will show you how to Install Proxmox VE on bare metal.

Proxmox Virtual Environment (VE) is a powerful, open-source platform for managing virtual machines (VMs) and containers. It combines two virtualization technologies, KVM (Kernel-based Virtual Machine) for virtual machines and LXC (Linux Containers) for lightweight containerization. Installing Proxmox VE on bare metal provides a solid foundation for building a virtualization infrastructure that can efficiently manage your workloads.

Prerequisites

  • A bare metal server with hardware virtualization support (Intel VT-x/AMD-V).
  • A bootable USB drive with the Proxmox VE ISO image.
  • Access to the server’s management interface (e.g., IPMI, iDRAC, or a physical console).
  • Basic knowledge of Linux commands.

1) Download Proxmox VE ISO Installer

Browse the URL https://www.proxmox.com/en/downloads/proxmox-virtual-environment/iso and download latest proxmox VE ISO installer. At the time of write this post, “proxmox ve 8.0.2” is available.

Download-Proxmox-VE-ISO-Installer

Once the download is completed, burn the ISO file into USB flash drive and make it bootable. In Windows environment, use Rufus software to create bootable USB drive from ISO file. In Linux, use the following,

2) Boot from the Proxmox VE Installer

Attach bootable USB drive to the server and go to the server’s BIOS or UEFI settings and ensure that the USB drive is set as the primary boot device.

Once the server boots from the USB drive, you will see the Proxmox VE boot menu. Choose “Install Proxmox VE (Graphical)” option and hit Enter.

Choose-Install-Proxmox-VE-Graphical-option

3) Accept End User License Agreement

In this step, you will be prompted to accept end user license agreement,

Accept-End-User-License-Agreement-Proxmox

Read the agreement and click on “I agree

4) Choose Installation Target Disk

The installer will ask you to choose the target disk on which proxmox will be installed. By default, installer will format the file system with ext4, if wish to change the file system type then click on “Options” as shown below.

Installer-Target-Disk-FileSystem-Type-Proxmox

Select the target disk and file system and then click on Next to proceed further.

5) Set Location and Time Zone

Set your preferred Location (Country), Time zone and Keyboard layout.

Set-Location-TimeZone-Proxmox-Installer

Click on Next

6) Create Admin Password and Email Address

Create a password for the Proxmox VE web interface. This password will be used to log in to the Proxmox VE web management console. Also specify the valid email address where all notification will be sent.

Admin-Password-Email-Address-Proxmox-Installer

Click Next

7) Network Configuration

Next, you’ll need to configure the network settings for Proxmox VE. Set FQDN, static IP address, subnet mask, gateway, and DNS server. Ensure that you specify the correct network configuration according to your environment.

Network-Configuration-Proxmox-ve-installer

Click Next to proceed further with the installation.

8) Begin Proxmox VE Installation

Review your installation settings one last time.

Proxmox-Installation-Summary

If everything looks correct, click on “Install“. The installation process will begin, and Proxmox VE will be installed on your bare metal server.

Proxmox-VE-Installation-Progress

Proxmox-VE-Successfull-Installation-Screen

Once the installation is complete, server will be rebooted automatically. Don’t forget to remove the USB drive and change boot medium from BIOS settings so that Proxmox VE will boot from the installed disk.

9) Access the Proxmox VE Web Interface

Open a web browser and navigate to the IP address you assigned in Step 7, followed by port 8006 (e.g., http://your_server_ip:8006).

While accessing the Web interface, we will get following screen, So Accept the Risk and Continue as we are using self-signed certificates for web interface.

Proxmox-VE-Web-Interface-Accept-Risk-Continue

Next, log in with the username “root” and the password you set in Step 6.

Proxmox-WebUI-Login-Page

Click on Login, this will take us to dashboard (Web UI). You will get a warning message like “No Valid Subscription”, Choose OK to ignore the warning,

No-Valid-Subscription-Proxmox-VE-Web-Interface

Finally, we will get the following Proxmox VE Web UI.

Proxmox-VE-Web-Interface-Dashboard

Great, this confirms that Proxmox VE has been installed successfully on your server.

As we don’t have valid subscription, let’s change its enterprise package repository to community repository in the following step.

10) Change Proxmox Enterprise Repository to Community

From the Web UI, Select the host (pv01) under the Datacenter and then click on console,

Access-Shell-Proxmox-VE-Server

Now, go to directory “/etc/apt/sources.list.d/

# cd /etc/apt/sources.list.d/

Edit ceph.list file, comment out the enterprise repo and add community repo for ceph,

# vi ceph.list

#deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise
deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription

save and close the file

Next edit the ‘pve-enterprise.list’ and comment out enterprise proxmox repo and add community repo url.

# vi pve-enterprise.list

#deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription

save and quit the file.

Update the Repository index and install all available updates,

# apt update
# apt update -y

Install-Updates-Post-Proxmox-VE-Installation

Once all the updates are installed then reboot the system once using following command,

# reboot

That’s all from this guide, I hope you have found it informative and useful. If you have encountered any issue during installation, kindly do post it in below comments section.

Also Read: How to Create Virtual Machine in Proxmox VE Using Web UI

Conclusion

You have successfully installed Proxmox VE on bare metal. This powerful virtualization platform opens up a world of possibilities for managing virtual machines and containers. Explore the Proxmox VE web interface and start creating VMs and containers to meet your specific needs. Proxmox VE’s flexibility and robust features make it an excellent choice for virtualization enthusiasts and professionals alike.

The post How to Install Proxmox VE on Bare Metal Step-by-Step first appeared on LinuxTechi.]]>
https://www.linuxtechi.com/install-proxmox-ve-on-bare-metal/feed/ 1
How to Assign Static IP Address on Debian 12 https://www.linuxtechi.com/configure-static-ip-address-debian/ https://www.linuxtechi.com/configure-static-ip-address-debian/#comments Sun, 03 Sep 2023 02:51:38 +0000 https://www.linuxtechi.com/?p=13043 In this blog post, we will show you how to assign static ip address on Debian 12. In the world of Linux, Debian remains one of the most popular distributions, known for its stability and versatility. One essential aspect of managing a Linux system is ... Read more

The post How to Assign Static IP Address on Debian 12 first appeared on LinuxTechi.]]>
In this blog post, we will show you how to assign static ip address on Debian 12.

In the world of Linux, Debian remains one of the most popular distributions, known for its stability and versatility. One essential aspect of managing a Linux system is configuring network settings. Whether you’re setting up a server or just want a consistent IP address for your desktop, assigning a static IP address on Debian 12 can be a crucial task.

Prerequisites

  • Pre-Installed Debian 12
  • Sudo User with admin rights

There are different methods through we can assign static ip address on Debian 12.

Method1: Assign Static IP Address on Debian 12 Using GUI

Login to your Debian Desktop environment, From Activity –> Search Settings –> Choose Network

Network-Settings-GUI-Debian12

Click on Wired Settings and then we will get the following window,

Default-Wired-Settings-GUI-Debian12

Note: To disable IPv6, go to IPv6 tab and choose ‘Disable’ option

Click on IPv4 Tab

IPv4-Automatic-Wired-Settings-GUI-Debian12

Above window shows that Automatic DHCP is enabled, so to Assign Static IP choose ‘Manual’ and then specify the IP details like IP address, netmask, gateway and dns server IP.

Important Note: To Specify the dns server IP first disable the automatic dns IP by toggling it.

Assign-Static-IP-Address-Debian12-GUI

Click on Apply to save the changes.

Now, disable and enable the interface by toggling it so that new IP address is mapped to the Interface.

Disable-Enable-Interface-Debain12-GUI

Now again click on wired settings to verify whether the new static ip address is assigned or not.

Check-IPv4-Details-Network-GUI-Debian12

Perfect, above confirms that new static IP address is assigned successfully.

Method2: Assign Static IP Address on Debian 12 From Command Line

Open the terminal, check your current network configuration. You can do this by running the following ip command,

$ ip add show

IP-Command-Output-Debian12-Command-Line

This will display a list of network interfaces on your system. Note down the name of the interface you want to assign a static IP address to (typically, it’s ‘enp0s3‘ for Ethernet).

Next, run nmcli command to get connection name,

$ nmcli connection

nmcli-connection-command-debian12

Once we get the connection name, run below nmcli command to assign static ipv4 address,

Syntax:

$ nmcli con mod  ‘connection-name’ ipv4.address  <IP-Address>

$ sudo nmcli connection modify 'Wired connection 1' ipv4.address 192.168.1.240/24

Set the gateway by running below

$ sudo nmcli connection modify 'Wired connection 1' ipv4.gateway 192.168.1.1

Change Configuration from DHCP to Manual , so that IP will be static and persistent, run

$ sudo nmcli connection modify 'Wired connection 1' ipv4.method manual

Set the DNS server IP by running below command,

$ sudo nmcli connection modify 'Wired connection 1' ipv4.dns '8.8.8.8'

Disable and enable the connection so that above changes come into the effect.

$ sudo nmcli connection down 'Wired connection 1'
$ sudo nmcli connection up 'Wired connection 1'

Assign-Static-IP-Address-Debian12-Nmcli-Command

Now run IP Command to check IP address,

$ ip add show enp0s3

Output of above commands would look like below:

ip-add-show-enp0s3-debian12

Perfect, above output confirms that static IP address has been assigned successfully on enp0s3 interface.

Assign Static IP Address on Minimal Installed Debian 12

Whenever we install minimal Debian 12 then we will have only the CLI console and don’t have any nmcli utility. So, to assin static ip address we must edit the file ‘/etc/network/interfaces’.

$ cat /etc/network/interfaces

Minimal-Debian12-Interface-File

Edit the file and set the static IP address as shown below,

$ sudo vi /etc/network/interfaces

Replace the line ‘allow-htplug enp0s3’ with ‘auto enp0s3‘ and change dhcp parameter to static.  Below is my sample file, change interface name and ip details as per your environment.

auto enp0s3
iface enp0s3 inet static
        address 192.168.1.240/24
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
        dns-nameservers 8.8.8.8

save & close the file.

Minimal-Debian12-Interface-File

To make above changes into the effect the restart the network service

$ sudo systemctl restart networking.service

Now, run ip command to verify the ip address,

$ ip add show

Output,

IP-Add-Show-Minimal-Debian12

That’s all from this post. Please do share your feedback and queries in below comments section.

Conclusion

Assigning a static IP address on Debian 12 is a straightforward process that can greatly benefit your network stability and ease of access. By following the steps outlined in this guide, you can ensure that your Debian 12 system always has a consistent IP address, making it easier to manage and access your resources. Whether you’re configuring a server or just prefer having a stable address for your desktop, Debian 12 provides a user-friendly environment for all your networking needs.

Also Read: How to Install Kubernetes Cluster on Debian 12 | 11

The post How to Assign Static IP Address on Debian 12 first appeared on LinuxTechi.]]>
https://www.linuxtechi.com/configure-static-ip-address-debian/feed/ 1
How to Install VirtualBox Guest Additions on Ubuntu 22.04 https://www.linuxtechi.com/install-virtualbox-guest-additions-on-ubuntu/ https://www.linuxtechi.com/install-virtualbox-guest-additions-on-ubuntu/#comments Sat, 02 Sep 2023 15:25:21 +0000 https://www.linuxtechi.com/?p=16101 In this blog post, we will show you how to install VirtualBox Guest Additions on Ubuntu 22.04. Running Ubuntu 22.04 as a virtual machine within Oracle VirtualBox is a common scenario for many users. While VirtualBox provides a seamless virtualization experience, you can further improve ... Read more

The post How to Install VirtualBox Guest Additions on Ubuntu 22.04 first appeared on LinuxTechi.]]>
In this blog post, we will show you how to install VirtualBox Guest Additions on Ubuntu 22.04.

Running Ubuntu 22.04 as a virtual machine within Oracle VirtualBox is a common scenario for many users. While VirtualBox provides a seamless virtualization experience, you can further improve it by installing VirtualBox Guest Additions. These additions offer enhanced functionality and performance, including better display resolution, seamless mouse integration, and improved file sharing between your host and guest OS.

Prerequisites

  • Pre-Installed Ubuntu 22.04 VM in VirtualBox
  • A Regular User with sudo rights
  • Stable Internet connectivity

Without any further delay, let deep dive into VirtualBox Guest Additions on Ubuntu 22.04

1) Start Your Ubuntu Virtual Machine

Before we dive into the installation process, make sure your Ubuntu virtual machine is up and running in VirtualBox.

Ubuntu-22-04-VM-VirtualBox

2) Install Required Packages

Before you can install VirtualBox Guest Additions, you’ll need some essential packages. Run the following command in your terminal to install them:

$ sudo apt update
$ sudo apt install build-essential linux-headers-$(uname -r) -y

Installing-linux-headers-ubuntu-22-04

These packages are necessary for building and installing the VirtualBox Guest Additions modules.

3) Mount the VirtualBox Guest Additions CD Image

In VirtualBox, go to the “Devices” menu at the top of the virtual machine window and select “Insert Guest Additions CD Image.” This action virtually mount the Guest Additions CD image into your virtual machine.

Inserting-Guest-Addition-CD-Image-Ubuntu-VM-VirtualBox

4) Install VirtualBox Guest Additions

Now, let’s navigate to the directory containing the VirtualBox Guest Additions CD image. In your terminal, run:

$ cd /media/linuxtechi/VBox_GAs_7.0.4/

This command takes you to the mounted CD image directory. Note that the directory name may vary slightly depending on your VirtualBox version.

To install VirtualBox Guest Additions, run the following command:

$ sudo ./VBoxLinuxAdditions.run

InstallingVirtualBox-Guest-Additions-Ubuntu-22-04-VirtualBox-VM

This script will compile and install the necessary modules for improved integration between your host and guest systems.

5) Reboot Your Virtual Machine

After the installation is complete, it’s essential to reboot your virtual machine to ensure that the VirtualBox Guest Additions are fully integrated:

$ sudo reboot

6) Verify Guest Additions Installation

Once your virtual machine restarts, you can verify the successful installation of VirtualBox Guest Additions by checking for improved functionality, such as automatic screen resizing and seamless mouse integration.

Screen-Resize-Post-VirtualBox-Guest-Addition

Conclusion

By installing VirtualBox Guest Additions on your Ubuntu 22.04 virtual machine, you’ve enhanced your virtualization experience, making it more seamless and user-friendly. You can now enjoy features like better display resolution, automatic mouse integration, and improved file sharing between your host and guest systems. These additions make managing and using virtual machines in VirtualBox a more efficient and enjoyable process.

The post How to Install VirtualBox Guest Additions on Ubuntu 22.04 first appeared on LinuxTechi.]]>
https://www.linuxtechi.com/install-virtualbox-guest-additions-on-ubuntu/feed/ 1