Easy Steps To Install Virtualmin GPL on Linux – OrcaCore

Posted on

Easy Steps To Install Virtualmin GPL on Linux - OrcaCore

Easy Steps To Install Virtualmin GPL on Linux – OrcaCore

In this guide, you will learn to Install Virtualmin GPL on Linux distributions. Virtualmin is an open-source and popular web hosting control panel. It is based on Webmin.

Also, there are two versions of Virtualmin available such as:

  • Virtualmin GPL (Free and Open Source)
  • Virtualmin Professional (Paid version with more features and support)

The supported systems that you can install Virtualmin on it, include:

  • Red Hat Enterprise Linux and derivatives (RHEL, AlmaLinux, Rocky Linux, CentOS)
  • Debian Linux and derivatives (Debian, Ubuntu)

Difference between Virtualmin and Webmin?

In simple words, Virtualmin is used to manage websites. Webmin is used as a server management tool (used to manage system-related services).

Does Virtualmin include Webmin?

As we said, Virtualmin is based on Webmin. So, yes Virtualmin has the Webmin.

Now you can follow the instructions below to use the Virtualmin GPL installer script to Install Virtualmin GPL on Linux.

To complete this guide, you must have access to your server as a root user and set up a basic firewall. For this purpose, you can visit the Orcacore website and look for our initial server setup guides for any Linux distros you want.

Then, follow the steps below to Install Virtualmin GPL on Linux.

Step 1 – Download Virtualmin GPL Installer Script

First, you must run the system update on your Linux server by using the following commands:

# apt update #Debian,Ubuntu
# yum update #centos 7, rhel7
# dnf update #almalinux 8,9 - rhel 8,9

Then, use the following Virtualmin GPL installer script that is available for free by using the wget or curl commands:

wget https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh

Step 2 – Install Virtualmin on Linux – Run Installer Script

At this point, you must run the Virtualmin script to start your installation by using the command below:

sh virtualmin-install.sh

Enter Y to continue:

**Output**
Welcome to the Virtualmin GPL installer, version 7.1.0

....

  The systems currently supported by the install script are:

    **Red Hat Enterprise Linux and derivatives**
      - RHEL 8 and 9 on x86_64
      - Alma and Rocky 8 and 9 on x86_64
      - CentOS 7 on x86_64

    **Debian Linux and derivatives**
      - Debian 10, 11 and 12 on i386 and amd64
      - Ubuntu 20.04 LTS and 22.04 LTS on i386 and amd64
...

  The selected package bundle is LAMP and the size of install is
  full. It will require up to 2 GB of disk space.

  Exit and re-run this script with --help flag to see available options.

 Continue? (y/n) **y**

During the installation, the Virtualmin GPL installer will complete the following phases:

  • Checking system time
  • Checking Perl installation
  • Checking CA certificates package
  • Checking HTTP client
  • Checking GPG package
  • Installing core plugins for package manager
  • Downloading Virtualmin 7 release package
  • Installing Virtualmin 7 release package
  • Installing Virtualmin 7 and all related packages updates
  • Configuring AWS
  • Configuring Fail2banFirewalld
  • Configuring Virtualmin
  • Cleaning up

You will not be required to take any action. Wait until it is completed.

**Output**
–£â–»â–» Phase 1 of 4: Check
Checking system time                                                         âš“
Checking Perl installation                                                   âš“
Checking CA certificates package                                             âš“
Checking HTTP client                                                         âš“
Checking GPG package                                                         âš“

–£â€“£â–»â–» Phase 2 of 4: Setup
Installing core plugins for package manager                                  âš“
Downloading Virtualmin 7 release package                                     âš“
Installing Virtualmin 7 release package                                      âš“

–£â€“£â€“» Phase 3 of 4: Installation
....               âš“
Installing Virtualmin 7 and all related packages updates                     âš“

–£â€“£â€“£ Phase 4 of 4: Configuration
...
[1/21] Configuring AWS
[20/21] Configuring Fail2banFirewalld                                        âš“
[21/21] Configuring Virtualmin                                               âš“
–£â€“£â€“£ Cleaning up

[SUCCESS] Installation Complete!
[SUCCESS] If there were no errors above, Virtualmin should be ready
[SUCCESS] to configure at https://hostname:10000 (or https://server-ip:10000).
[SUCCESS] You may receive a security warning in your browser on your first visit.

Step 3 – Access Virtualmin through the Web Interface

At this point, you can easily visit your given URL from the above output and access your Virtualmin dashboard.

https://<mark>server-ip</mark>:10000

Note: If you have a running firewall, you must allow port 10000 through it on your Linux server.

You will see the Webmin login screen:

Webmin login Linux - orcacore.com

Then, enter root as the username and your root server password as the password, and click Sign in.

Finally, you will see your Virtualmin and Webmin dashboards from your Linux web browser:

Virtualmin GPL dashboard Linux - orcacore.com

From here, you can manage and configure your server.

For more information, you can visit Virtualmin Documentation.

Conclusion

At this point, you have learned to Install Virtualmin GPL on Linux distributions. The installation process will work on any Linux server you want to use that we mentioned at the beginning of the article. Hope you enjoy using it. You may like these articles too:

Install and Use DirectAdmin on Ubuntu 22.04

Install and Use Webmin on Rocky Linux 9

How To Install cPanel WHM on AlmaLinux 8

Alternative Solutions to Install Virtualmin GPL on Linux

While the provided script-based installation is straightforward, here are two alternative approaches to achieving the same goal: using Docker and manual installation from repositories.

Alternative 1: Using Docker to Install Virtualmin GPL on Linux

Docker provides a containerization solution, allowing you to run Virtualmin in an isolated environment. This approach simplifies deployment and management and avoids potential conflicts with other system services.

Explanation:

Docker containers encapsulate an application and all its dependencies, ensuring consistent execution across different environments. A Docker image for Virtualmin contains everything needed to run Virtualmin, including the operating system, Webmin, Virtualmin, and necessary libraries. This eliminates the need to manually install and configure dependencies on the host system.

Steps:

  1. Install Docker: If Docker isn’t already installed, install it using your distribution’s package manager. For example, on Ubuntu/Debian:

    sudo apt update
    sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin

    On CentOS/RHEL/AlmaLinux/Rocky Linux:

    sudo yum install docker-ce --nobest
    sudo systemctl start docker
    sudo systemctl enable docker
  2. Find a Virtualmin Docker Image: Search Docker Hub for a suitable Virtualmin image. Look for images that are well-maintained and have good reviews. Examples: jcameron/virtualmin.

  3. Pull the Image: Download the Docker image to your server:

    docker pull jcameron/virtualmin
  4. Run the Container: Create and start a container based on the image. Pay attention to port mappings (e.g., 10000 for Webmin/Virtualmin) and volume mounts (for persistent data storage).

    docker run -d -p 10000:10000 -v /path/to/virtualmin/data:/home jcameron/virtualmin

    Replace /path/to/virtualmin/data with a directory on your host system where you want to store Virtualmin’s data persistently.

  5. Access Virtualmin: Access Virtualmin through your web browser using https://<server-ip>:10000.

Code Example (docker-compose.yml):

A docker-compose.yml file simplifies managing the Docker container:

version: "3.9"
services:
  virtualmin:
    image: jcameron/virtualmin
    ports:
      - "10000:10000"
      - "80:80"
      - "443:443"
    volumes:
      - /path/to/virtualmin/data:/home
    restart: always

To deploy:

docker-compose up -d

This creates a container named virtualmin using the jcameron/virtualmin image, maps ports 10000, 80, and 443, mounts the specified volume, and configures the container to restart automatically.

Alternative 2: Manual Installation from Repositories

While the automated script handles most dependencies, a manual installation provides greater control over the process and allows for fine-tuning. This method is more complex but can be beneficial for experienced users or those needing specific configurations.

Explanation:

This approach involves adding the Virtualmin repository to your system’s package manager and then installing the necessary packages manually. This allows you to select specific components and avoid installing unnecessary features.

Steps (Example for Debian/Ubuntu):

  1. Add the Virtualmin Repository:

    wget https://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin-7
    sudo apt-key add RPM-GPG-KEY-virtualmin-7
    echo "deb https://software.virtualmin.com/vm/7/apt virtualmin main" > /etc/apt/sources.list.d/virtualmin.list
  2. Update Package Lists:

    sudo apt update
  3. Install Virtualmin Packages: Install the necessary packages. A basic installation requires webmin and virtualmin-base:

    sudo apt install webmin virtualmin-base

    For a full LAMP stack installation, you’ll also need:

    sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql
  4. Configure Virtualmin: After installation, some manual configuration might be required, such as setting up the database and configuring Apache. Refer to the Virtualmin documentation for detailed instructions.

Code Example (Installing specific packages):

sudo apt install webmin virtualmin-base bind9 postfix dovecot spamassassin clamav

This command installs Webmin, the base Virtualmin package, BIND9 (DNS server), Postfix (mail server), Dovecot (IMAP/POP3 server), SpamAssassin (spam filter), and ClamAV (antivirus). You can customize this list based on your specific requirements.

These alternative methods provide different approaches to Install Virtualmin GPL on Linux, catering to varying levels of expertise and specific needs. Using Docker offers portability and isolation, while manual installation grants more control over the configuration.

Leave a Reply

Your email address will not be published. Required fields are marked *