My installation was done using Ubuntu Server 14.04.1 LTS.
Connect to your fresh install Ubuntu Server using SSH.
ssh -l lab1 18.104.22.168
I prefer to run the installation process as root for this I will have to create a password for root user on Ubuntu server. The Virtualmin install script also requires to be run as root.
Create root password.
sudo passwd root
Enter password of lab1 (replace lab1with your account).
Then enter new UNIX password for root.
Then change to root user.
Enter the password of your user account when prompted.
Then move to directory.
How to install Virtualmin GPL on Ubuntu Server
Make the script executable.
chmod +x install.sh ./install.sh
If you OS is among the supported OS listed your good to proceed.
When asked for a fully qualified hostname enter your hostname.
Depending on how fast your server this could take a few minutes or longer.
When you get this point and see the message Succeeded, your Virtualmin was installed successfully.
Run to see if there are any upgrades for the server.
apt-get update && apt-get upgrade
Check for more upgrades.
apt-get update && apt-get dist-upgrade
Install the following packages after installing Virtualmin.
apt-get install fetchmail unzip zip pbzip2 lvm2 ntpdate curl rsync vim iftop smartmontools libjpeg-turbo-progs pvrg-jpeg atop bsd-mailx mailutils optipng pnqnq
apt-get install php5-curl php5-dev php5-gd php5-idn php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-odbc php5-dev apache2-prefork-dev aspell-en imagemagick make memcached g++ graphicsmagick whowatch zabbix-agent
If you use WordPress like I do there are some plugins which require software which may not be available through the normal Ubuntu or Debian repository. Like for instance pngout, this can be downloaded from here then upload it to /usr/bin.
Do it one more time.
apt-get update && apt-get upgrade
Then do this to remove no longer needed packages.
When there are no more upgrades proceed below.
To complete installation go to URL of the newly installed Virtualmin GPL.
On Firefox click to add exception to accept self-signed certificate. Then confirm.
Login using root.
Pre-load Virtualmin Libraries: Y
Run email domain lookup server: Y
Run ClamAV server scanner: Y
Run SpamAssassin server filter: Y
Run MySQL database server: Y
Enter MySQL password. Click next
You can create the MySQL root password using this site.
MySQL configuration size: Leave default settings.
Skip check for resolvability (If DNS is not yet setup for server’s fully qualified domain name)
Password storage mode: Only store hashed passwords.
Click next, next.
Install updates if Virtualmin shows any.
Click System Information menu.
Click re-check and refresh configuration. I got this error after running check.
Easy enough to fix. I just have to add 127.0.0.1 into list of DNS servers as the error suggest. If you missed that part go to Webmin > Networking > Network Configuration > Host and DNS client. Click save. Then apply configuration.
I don’t need to use mailman so I have this disabled by going to menu Virtualmin > Systems Settings > Features and Plugins then uncheck mailman. Click save.
When you see the Virtualmin status page you’re ready to go.
At this point Virtualmin should be setup ready for use as indicated by two separate top menus on the left. Virtualmin and Webmin. Virtualmin is primarily used for managing virtual websites. Webmin is used to manage the Linux server using point and click instead of only using command line tools.
Before I start creating any virtual website accounts I like to tighten up security by doing the following.
Changing the administrator account and deleting the root account created by the install script. Going to Webmin > Webmin Users > click on root > clone. Fill out the account details. I prefer to use a difficult username for the Webmin account on top of a hard password to guess. Also limiting what IP addresses can connect to the admin port.
Note: to find your IP address click here.
Your user account appears as one of the Webmin users. Clicking on it then switch to user, then refresh page. I am now login as user admin P3p0t. The next step is to delete the root account. Going to Webmin > Webmin Users > delete root.
Next is to stop brute force attempts directed at Webmin. Under Webmin configuration > Authentication. Limiting failed login attempts to 3 and blocking host and users for 3 hours. Click save.
Webmin’s default port uses 10000. I prefer to change this as well to something else. You can come up with your own unused port to use. In Webmin configuration > Ports and Addresses.
I will also change the default port SSH uses to something else other than 22. By going to Servers > SSH Server > Networking. Save and Apply changes.
Check my other article to tighten your security here.
Delete Virtualmin GPL install script when everything has been setup.
Enjoy the best free Open Source cpanel!
If you’re interested I can setup Virtualmin on your freshly installed Debian or Ubuntu server for $50.00 payable through paypal. Send me an email.