Ubuntu: Install Webmin on Ubuntu VPS

This is easily accomplished with a few commands!

First step, get the requirements for Webmin

apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

Without these files, Webmin will not run. Next, we get the Webmin .deb file and install it:

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.600_all.deb
dpkg -i webmin_1.600_all.deb

Note: If you tried to download and install Webmin first, without the requirements, and have errors after you tried the apt-get install command in step one, type in apt-get -f install to force the install of the dependencies to meet Webmin’s dependency requirements.

Get:1 http://archive.ubuntu.com/ubuntu/ precise/main libnet-ssleay-perl i386 1.42-1build1 [184 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ precise/universe libauthen-pam-perl i386 0.16-2build2 [27.9 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ precise/main libio-pty-perl i386 1:1.08-1build2 [36.9 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ precise/main libapt-pkg-perl i386 0.1.25build2 [82.2 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ precise/universe apt-show-versions all 0.17 [32.9 kB]
Fetched 364 kB in 0s (416 kB/s)              
Selecting previously unselected package libnet-ssleay-perl.
(Reading database ... 45568 files and directories currently installed.)
Unpacking libnet-ssleay-perl (from .../libnet-ssleay-perl_1.42-1build1_i386.deb) ...
Selecting previously unselected package libauthen-pam-perl.
Unpacking libauthen-pam-perl (from .../libauthen-pam-perl_0.16-2build2_i386.deb) ...
Selecting previously unselected package libio-pty-perl.
Unpacking libio-pty-perl (from .../libio-pty-perl_1%3a1.08-1build2_i386.deb) ...
Selecting previously unselected package libapt-pkg-perl.
Unpacking libapt-pkg-perl (from .../libapt-pkg-perl_0.1.25build2_i386.deb) ...
Selecting previously unselected package apt-show-versions.
Unpacking apt-show-versions (from .../apt-show-versions_0.17_all.deb) ...
Processing triggers for man-db ...
Setting up libnet-ssleay-perl (1.42-1build1) ...
Setting up libauthen-pam-perl (0.16-2build2) ...
Setting up libio-pty-perl (1:1.08-1build2) ...
Setting up libapt-pkg-perl (0.1.25build2) ...
Setting up apt-show-versions (0.17) ...
** initializing cache. This may take a while **
Setting up webmin (1.600) ...
Webmin install complete. You can now login to https://ubuntu:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.

This tells you that Webmin is up and running!

We open up our web browser with https://vps-ip-address:10000

Please do not forget the https! We replace vps-ip-address and put in your VPS server’s IP address or even your domain/subdomain you have assigned to it.

We login with root and our root password.

I have not used Webmin much but I plan on doing so to learn more about it. It seems very simple to setup and use without purchasing a monthly license from cPanel. I like cPanel a lot and highly recommend it but could see where spending $15 per month on a license and requiring at least 1gb of memory for cPanel could be a problem to an individual with a small budget.


Tutorial: How to Install Webmin on CentOS VPS

Webmin Introduction:
Webmin is a web-based interface for system administration for Unix. Using any browser that supports tables and forms (and Java for the File Manager module), you can setup user accounts, Apache, DNS, file sharing and so on.
(From the Webmin official website) 

For this tutorial and installation, I recommend the following:

  • OpenVZ or Xen VPS (it doesn’t really matter)
  • 512mb minimum RAM, 1024mb swap (1GB RAM/2GB swap recommended)
  • 20gb of disk space
  • 1 IPv4 address

Step One: Webmin Web Repos

# cat > /etc/yum.repos.d/webmin.repo << EOF
name=Webmin Distribution Neutral

This command puts inside of /etc/yum.repos.d/webmin.repo the [Webmin] contents of repository. If you have issues with this comand, you can copy starting at [Webmin] and stop before EOF then paste into /etc/yum.repos.d/webmin.repo those 5 lines.

After that, we run a yum update and see if we see the Webmin repos show up in the yum output.

Step Two: Install Webmin GPG Key

# rpm --import http://www.webmin.com/jcameron-key.asc

This makes sure that we have the GPG keys necessary to verify that Webmin is valid and from the Webmin team, not Webmin files that have been hacked by an intruder and the intruders are using the Webmin servers to distribute a backdoored version of Webmin.

Step Three: Install Webmin

# yum install webmin

That’s it and all you need!

After that, you open up http://your-ip-address:10000 in your web browser and you should be asked for a username and password. The default is root and your root password.

Webmin is an excellent alternative to paid control panels, like cPanel and DirectAdmin. I plan on writing a series of articles about how to setup, configure and run Webmin for your personal projects or a few websites for friends, family and coworkers.