How to Install Virtualmin on AlmaLinux 8

Virtualmin is a domain hosting and website control panel which gives the ability to create and manage many domains, as well as simplify both automation and tasks. It is based on Webmin. Virtualmin is an alternative to cPanel and Plesk.

Update the System

yum update -y 

yum upgrade -y 

Add Swap Space

Note: This step is a must if your VPS has less than 2 GB of Memory Total (RAM + SWAP = Memory Total)

Command to create a Swap file.

Note: We are adding 1.5GB here since our test VPS has 512 MB of RAM if you want to add a different size then you can replace it in place of 1.5G

fallocate -l 1.5G /swapfile

To set write permission.[Default permissions only enable for root user]

chmod 600 /swapfile

To set up a swap area on the file.

mkswap /swapfile

To activate the swap file.

swapon /swapfile

Open the following file and add the given content to change it to permanent.

nano /etc/fstab

Add the following line.

/swapfile swap swap defaults 0 0

Now check the free -m size.

free -m

Output:

root@vps:~# free -m
               total        used        free      shared  buff/cache   available
Mem:             468         143          55           0         268         304
Swap:           2047           0        2047

NOTE: Now the added swap space can be seen.

Check Swap Information (Optional)

Command to check swap size.

swapon --show

Output:

root@vps:~# swapon --show
NAME      TYPE      SIZE   USED PRIO
/swapfile file      1.5G 441.7M   -2
/dev/vda2 partition 512M     0B   -3
root@vps:~#

Or you can check using the free -m command.

free -m

Output:

root@vps:~# free -m
               total        used        free      shared  buff/cache   available
Mem:             468         136          21           0         309         311
Swap:            511          18         493

Add Swap

Note: This step is a must if your VPS has less than 2 GB of Memory Total (RAM + SWAP = Memory Total)

Command to create a Swap file.

Note: We are adding 1.5GB here since our test VPS has 512 MB of RAM if you want to add a different size then you can replace it in place of 1.5G

fallocate -l 1.5G /swapfile

To set write permission.[Default permissions only enable for root user]

chmod 600 /swapfile

To set up a swap area on the file.

mkswap /swapfile

To activate the swap file.

swapon /swapfile

Open the following file and add the given content to change it to permanent.

nano /etc/fstab

Add the following line.

/swapfile swap swap defaults 0 0

Now check the free -m size.

free -m

Output:

root@vps:~# free -m
               total        used        free      shared  buff/cache   available
Mem:             468         143          55           0         268         304
Swap:           2047           0        2047

NOTE: Now the added swap space can be seen.

Check Swap Information (Optional)

Command to check swap size.

swapon --show

Output:

root@vps:~# swapon --show
NAME      TYPE      SIZE   USED PRIO
/swapfile file      1.5G 441.7M   -2
/dev/vda2 partition 512M     0B   -3
root@vps:~#

Or you can check using the free -m command.

free -m

Output:

root@vps:~# free -m
               total        used        free      shared  buff/cache   available
Mem:             468         136          21           0         309         311
Swap:            511          18         493

NOTE: If the output is empty, it means that swap space is not enabled yet on your system.

NOTE: If the output is empty, it means that swap space is not enabled yet on your system.

Download Virtualmin Installation Script

Download the Virtualmin Script using below command,

yum -y install wget

wget https://raw.githubusercontent.com/virtualmin/virtualmin-install/master/virtualmin-install.sh

Install Virtualmin

Change the execute permission to the downloaded file,

chmod +x virtualmin-install.sh

Run the below command to install Virtualmin,

sh virtualmin-install.sh

Output:

[root@vps ~]# sh virtualmin-install.sh 
Running Virtualmin 7 pre-installation setup:
  Syncing system time ..
  .. done
  Updating CA certificates ..
  .. done

  Welcome to the Virtualmin GPL installer, version 7.0.0-RC11

  This script must be run on a freshly installed supported OS. It does not
  perform updates or upgrades (use your system package manager) or license
  changes (use the "virtualmin change-license" command).

  The systems currently supported by install script are:

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

    Debian Linux derivatives
      - Ubuntu 20.04 LTS and 22.04 LTS on i386 and amd64
      - Debian 10 and 11 on i386 and amd64

  If your OS/version/arch is not listed, installation will fail. More
  details about the systems supported by the script can be found here:

    https://www.virtualmin.com/os-support

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

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

 Continue? (y/n) 
   WARNING! 

  Virtualmin may already be installed. This can happen if an installation failed,
  and can be ignored in that case.

  However, if Virtualmin has already been successfully installed you must not
  run this script again! It will cause breakage to your existing configuration.

  Virtualmin repositories can be fixed using virtualmin-install.sh -s command.

  License details can be changed using virtualmin change-license command.
  Changing the license never requires re-installation.

  Updates and upgrades must be performed from within either Virtualmin or using
  system package manager on the command line.

 Really Continue? (y/n) [INFO] Started installation log in /root/virtualmin-install.log
▣□□ Phase 1 of 3: Setup
Installing core plugins for package manager                             [  ✔  ]
Downloading Virtualmin 7 release package                                [  ✔  ]
Installing Virtualmin 7 release package                                 [  ✔  ]

▣▣□ Phase 2 of 3: Installation
Installing EPEL release package                                         [  ✔  ]
Enabling PowerTools package repository                                  [  ✔  ]
Cleaning up software repo metadata                                      [  ✔  ]
Checking and installing system packages updates                         [  ✔  ]
Installing dependencies and system packages                             [  ✔  ]
Installing Virtualmin 7 and all related packages                        [  ✔  ]
Installing Virtualmin 7 and all related packages updates                [  ✔  ]

▣▣▣ Phase 3 of 3: Configuration
[1/20] Configuring AWStats                                              [  ✔  ]
[2/20] Configuring Apache                                               [  ✔  ]
[3/20] Configuring Bind                                                 [  ✔  ]
[4/20] Configuring ClamAV                                               [  ✔  ]
[5/20] Configuring Dovecot                                              [  ✔  ]
[6/20] Configuring Firewalld                                            [  ✔  ]
[7/20] Configuring MySQL                                                [  ✔  ]
[8/20] Configuring Postfix                                              [  ✔  ]
[9/20] Configuring ProFTPd                                              [  ✔  ]
[10/20] Configuring Procmail                                            [  ✔  ]
[11/20] Configuring Quotas                                              [  ✔  ]
[12/20] Configuring SASL                                                [  ✔  ]
[13/20] Configuring Shells                                              [  ✔  ]
[14/20] Configuring SpamAssassin                                        [  ✔  ]
[15/20] Configuring Status                                              [  ✔  ]
[16/20] Configuring Upgrade                                             [  ✔  ]
[17/20] Configuring Usermin                                             [  ✔  ]
[18/20] Configuring Webmin                                              [  ✔  ]
[19/20] Configuring Fail2banFirewalld                                   [  ✔  ]
[20/20] Configuring Virtualmin                                          [  ✔  ]
▣▣▣ Cleaning up

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

Accessing Virtualmin

To access Virtualmin, open the URL from your web browser: https://IP_address:10000.

Note:

  1. When logging in for the first time, you will see an 'invalid SSL' warning.

  2. Simply click on the 'Advanced' tab and then 'Accept the risk and Continue'.

Login to the Webmin web interface using your root user and password.

Once you log in, you will be redirected to the Webmin dashboard.

Done.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS