Installing Webmin on a Debian-based system
Installing Webmin on a Debian-based system, such as Ubuntu or Linux Mint, is easy because we can rely on the excellent package management system called Advanced Packaging Tool (APT). APT resolves and installs dependencies automatically and also ensures that Webmin will be updated automatically when you perform a system update.
How to do it...
To install Webmin, perform the following steps:
Webmin is not part of the standard Debian package repository, so your first step will be to add the URL of Webmin's repository to your package sources file. Open the
/etc/apt/sources.list
file in a text editor and add the following lines to it:deb http://download.webmin.com/download/repository sarge contrib deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
Tip
On most systems, the
vi
text editor is installed by default, but it may be a bit tricky if you haven't used it before. If you want an easy-to-use editor, try nano. You can install it by issuing the following command:$ sudo apt-get install nano
After it's installed, you can use
nano
to edit thesources.list
file by issuing the following command:$ sudo nano /etc/apt/sources.list
We also need to add the GPG key with which Webmin's repository is signed to the list of keys used by APT to authenticate packages. This can be done by issuing the following command:
$ wget -qO - http://www.webmin.com/jcameron-key.asc | sudo apt-key add -
You can now refresh the APT cache to include the contents of Webmin's repository. This is done with the following command:
$ sudo apt-get update
With these preliminaries out of the way, you can install Webmin with the following command:
$ sudo apt-get install webmin
How it works...
Webmin provides an online repository with DEB installation packages that are compatible with Debian-based systems. We need to give our system the address of this repository so that it can take advantage of it. The list of available repositories is kept in the /etc/apt/sources.list
file as well as other *.list
files stored in the /etc/apt/source.list.d/
directory.
Every package is cryptographically signed to ensure that even if someone breaks into the repository and uploads a package pretending to be Webmin, we don't install it by accident. We downloaded the public GPG key needed to verify this signature by using wget
and added it to our list of trusted keys by using the apt-key add
command.
GNU Privacy Guard (GPG) is an open source alternative to Pretty Good Privacy (PGP), a cryptographic software suite that provides encryption and authentication functions. Every Webmin package contains a GPG cryptographic signature, which could only be generated using a private key that is kept secret by Webmin's author Jamie Cameron. A corresponding public key, which is made freely available, may be used to verify that the signature was generated using that private key. If even a single bit of the package code were modified after the package was signed, the signature would not match anymore. This ensures that nobody tampers with Webmin on its way between the author and your system. APT checks the signature automatically, we just need to provide it with Webmin's public key.
Tip
If you want to be extra careful, you can check whether the public key you imported is actually the one belonging to Jamie Cameron. Issue the following command and verify that its output contains the same key fingerprint:
$ sudo apt-key fingerprint /etc/apt/trusted.gpg -------------------- pub 1024D/11F63C51 2002-02-28 Key fingerprint = 1719 003A CE3E 5A41 E2DE 70DF D97A 3AE9 11F6 3C51 uid Jamie Cameron <jcameron@webmin.com>
By updating the APT cache, we ensure that our system becomes aware of packages available in the new repository. Then, we can install Webmin. APT not only resolves dependencies and installs more than just the Webmin package, but also other components it needs to run, including the Perl programming language and others.
There's more...
Webmin also provides a .deb
(Debian software package) file that can be downloaded and installed manually. If you want to do it this way for some reason, you would need to follow these steps:
Visit Webmin's Downloads page at http://www.webmin.com/download.html and copy the address of the current Debian package. The package file will be named
webmin_NNN_all.deb
, whereNNN
indicates the current version number.Download the package by using
wget
:$ wget http://prdownloads.sourceforge.net/webadmin/webmin_NNN_all.deb
First, install all the packages that Webmin depends on using the following command:
$ sudo apt-get install perl libapt-pkg-perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
Then, run the following command to install Webmin from the package file:
$ sudo dpkg --install webmin_NNN_all.deb
Tip
Your system may complain that some other package needed by Webmin is missing. For instance, you could see an error message like the following:
dpkg: dependency problems prevent configuration of webmin: webmin depends on PACKAGE-NAME; however: Package PACKAGE-NAME is not installed.
If you see this error, you should install the package designated by
PACKAGE-NAME
before installing Webmin.
See also
More information about installing Webmin on a Debian-based system and about APT package management in general can be found at the following Webmin and Debian websites: