The virtual server in Linux: step-by-step instructions

The virtual server in Linux: step-by-step instructions

07:47, 05.12.2022

Article Content
arrow

  • Why do I need a virtual machine?
  • Creating a Linux Virtual Machine: A Step-by-Step Guide
  • Step 1: Load and Install Ubuntu
  • Step 2: Install VirtualBox
  • Step 3: Create a virtual machine
  • Step 4: Launch the virtual machine
  • Results

Linux is an open-source operating system that has gained popularity due to its high flexibility, security, stability, and unprecedented speed. It requires a certain amount of administrative knowledge, and you have to know and understand how to perform certain actions through the console because not everything can be done within the graphical interface.

Today, Linux servers account for more than 70% of all servers, and here's why:

  • low server hardware requirements;
  • the OS is completely free, like most derivative distributions;
  • higher level of security and protection, the system has significantly fewer vulnerabilities compared to Windows.

In addition, there are already a huge number of experienced specialists on the market who are well-versed in Linux administration. High competition means lower costs for the services of a single expert and therefore the server maintenance costs will be more modest in the long run.

In the following article, we will tell you why you need a Linux virtual machine and how to create and configure it.

Why do I need a virtual machine?

The process of virtualization involves creating a software version of the server with dedicated resources CPU, RAM, and disk space. That is, the physical server using a hypervisor is "partitioned" into several virtual machines, which are more or less independent of each other.

The created virtual machines are used for a variety of tasks:

  • development and testing of software, and operating systems;
  • hosting sites, online stores, corporate network infrastructure, etc.;
  • safe launch of suspicious software, which can potentially harm the system;
  • malware research and analysis – a virtual machine can be an ideal environment for anti-virus software and firewall developers;
  • data backup.

VPS are good because of their low cost, flexibility, and speed of deployment, and if necessary, they can be quickly scaled up to compensate for the lack of capacity for certain tasks.

the virtual server in linux: step-by-step instructions

Creating a Linux Virtual Machine: A Step-by-Step Guide

Let's look at the mechanism of creating a virtual machine running Linux. In our example, we will use the Ubuntu 22.04.1 LTS distribution, as it is one of the most popular, regularly updated, and provides users with a wide range of possibilities.

Step 1: Load and Install Ubuntu

Go to the official site of the developers and choose the appropriate version for your server - 32-bit or 64-bit. Recall that the 32-bit architecture, although more outdated, in terms of speed and demand for server resources, it wins, and therefore it is still often used on VPS with a small amount of allocated RAM. The 64-bit version is needed if you have an expensive plan with 4 GB of RAM or more.

There is, however, an important nuance here: when you switch from 32-bit Ubuntu to 64-bit, be prepared for all processes, whether PHP or good old Apache2, to consume twice as much RAM. However, such an increase in memory consumption is due to twice as long pointers. This provides a serious performance boost on servers with 4, 6, 8, or more gigabytes of RAM.

Step 2: Install VirtualBox

VirtualBox is a software product for emulating Linux, Windows, FreeBSD, and other operating systems. This software is completely free and has stable support from the community, so it's easy to understand the nuances. You can download it on the official site, and the same link provides a detailed installation and initial setup guide. You will also need the Oracle VM VirtualBox extension package, you can download it here.

During the installation process, leave the default values and be sure to add the software to antivirus and firewall exceptions.

Step 3: Create a virtual machine

When VirtualBox installation is complete, open the program and start creating a virtual machine. Step by step, you will be prompted:

  • give the virtual machine a name;
  • Choose the version of the operating system (Ubuntu 32-bit or 64-bit);
  • allocate resources to the virtual machine – the number of RAM, processor cores, and storage space.

It is important not to make a mistake when allocating resources – try to calculate exactly what power you will need for your tasks, and allocate with a small margin (20-30% on top will be more than enough). As for the drive, a virtual machine requires at least 8 GB of free space, but it is better to put about 16-24 GB to have a reserve.

Step 4: Launch the virtual machine

To start the VM, just click on the "Start" button. The first time you run the program you may get some errors – most of them are related to registering missing resource information, so you can just ignore them.

In the next step, you will be prompted to install Ubuntu – so we do. Next, everything is standard: choose the installation scenario and follow the usual steps. Before installing the operating system in a virtual machine, be sure to format the contents of the virtual hard drive so that some accidental files do not affect the operation of the virtual machine.

Results

That's all - as you can see, there is nothing complicated about installing and running a Linux-based virtual server. And if you still have any questions, contact our experts via Livechat. We will provide any help and help you choose the best VPS plan for your needs. Take care!

views 4m, 14s
views 2
Share

Was this article helpful to you?

VPS popular offers

Other articles on this topic

How to modify hosts file
How to modify hosts file
cookie

Accept cookies & privacy policy?

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the HostZealot website.