Technology

As we discussed in our previous blog our boss gave a task to Update the Linux machine and Install Apache Server. The machine was to place in Air Gaped Network, while we did not have access to the internet connection. In our previous blog, we used the apt-offline tool to achieve the task. But the apt-offline tool is not installed in an Offline machine, so we downloaded the apt-offline tool and installed it on Offline Machine. In this blog, we will continue to learn about the further process to update and Install Apache Server on our Offline System and complete the task.

Updating Offline Linux Machine

Let us start to install the update on our offline system. Below are the steps to achieve this task.

Step: – 1

We create the signature file using the apt-offline tool to gather required information and Package Path to update and upgrade the Offline machine.

#sudo apt-offline set offline-data.sig

Now we check created signature file to see the contents.

Finally, our signature file is created successfully and now the time is going to the next Step.

Step: – 2

In this step, we copy the signature file into a USB stick and connect the USB to Internet Connected PC. After that, we create a directory to hold the all required packages and Debian files then we copy the signature file into that Directory.

Let us start to download the required packages

# apt-offline get -d ~/Desktop/UPDATES/ offline-data.sig

When the downloading is complete copy the entire directory into a USB stick and plug it into the Offline machine and copy the entire directory into the Offline machine.

Step: – 3

In this step, we install the downloaded update packages on an Offline machine and finish our first task to update the system.

Let’s go into that directory, which is copied from our previous task, and run the below command to install Updates.

#sudo apt-offline install ~/Desktop/UPDATES/

Finally, we achieve our first task to Update the Offline machine, so we reduced our first overhead to update the offline machine.

 Let’s go to the next task to Install Apache Server in our offline system and finish our work.

Installing Apache Server

Step: – 1

We collect all dependencies packages URL into a .txt file using an apt tool just execute the mentioned command below.

#apt-get –print-uris –yes install apache2 | grep ^’ | cut -d’ -f2 > apache.txt

Copy the file into a USB stick and paste it into Internet Connected PC.

Step: – 2

Create a directory to hold all Apache Debian files to install Apache Server. Copy the .txt file into a directory and download all packages using the wget command.

#wget –input-file apache.txt

When the files are downloaded copied into the Offline machine using a USB stick.

Step: – 3

To install Apache go into a directory that is copied through USB and execute the mentioned command below.

#sudo dpkg -i *.deb

Now we successfully installed Apache on an Offline machine 

To check Apache Status

#systemctl status apache2.service

Finally, we completed our task, and we can tell the boss. When the boss listens to this, he will be happy, and we are also happy.

Now to summarize this blog we learned Updation and Installation of a Linux machine in Air Gaped Network.

If you are looking for implementation and support in Cyber Security Solutions, Cloud Solutions, and Virtualization in your organization. Zindagi Technologies is the best fit to do this. Zindagi Technologies has a Professional and Certified Team in different Technologies. Any time you can Contact Us or drop a message at +91 9773973971.

Author
Shivang Trivedi
Associate Consultant

Leave a comment