Book Image

Webmin Administrator's Cookbook

By : Michal Karzynski
Book Image

Webmin Administrator's Cookbook

By: Michal Karzynski

Overview of this book

Table of Contents (19 chapters)
Webmin Administrator's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Installing Webmin on an RPM-based system


Installing Webmin on an RPM-based system, such as RHEL, Fedora, CentOS, or openSUSE, is just as easy as on Debian-based systems. Here, we'll rely on the equally excellent package management system called Red Hat Package Manager (RPM) and the yum utility. Yum resolves and installs dependencies automatically and also ensures that Webmin will be updated automatically when you perform a system update.

On a SUSE-based system, you may use the yum utility as well, but it isn't installed by default. On these systems, it may be more convenient to use the zypper command-line utility or the YaST interface. In this recipe, we will provide zypper alternatives to yum commands to be used on SUSE.

How to do it...

To install Webmin, perform the following steps:

  1. While Webmin is available in several systems, its packages are not usually kept up-to-date. We will add Webmin's repository to our system by creating a file which describes the repository. Create a file with the path /etc/yum.repos.d/webmin.repo and add the following lines to it:

    [Webmin]
    name=Webmin Distribution Neutral
    #baseurl=http://download.webmin.com/download/yum
    mirrorlist=http://download.webmin.com/download/yum/mirrorlist
    enabled=1
    

    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 yum install nano
    

    After it's installed, you can use nano to edit the webmin.repo file by issuing the following command:

    $ sudo nano /etc/yum.repos.d/webmin.repo
    

    Note

    On a SUSE-based system, you don't need to edit the repository files manually. You can add Webmin's repository by issuing the following command:

    $ sudo zypper addrepo -f http://download.webmin.com/download/yum "Webmin Distribution Neutral"
    
  2. We also need to add the GPG key with which Webmin's repository is signed to the list of keys used by RPM to authenticate packages. This is done by issuing the following commands:

    $ wget http://www.webmin.com/jcameron-key.asc
    $ sudo rpm --import jcameron-key.asc
    $ rm jcameron-key.asc
    
  3. You can now refresh the yum cache to include Webmin's repository. This is done by using the following command:

    $ sudo yum makecache
    

    Note

    On a SUSE-based system, issue the following command:

    $ sudo zypper refresh
    
  4. With these preliminaries out of the way, you can install Webmin with the following command:

    $ sudo yum install webmin
    

    Note

    On a SUSE-based system, issue the following command:

    $ sudo zypper install webmin
    

How it works...

Installation of Webmin using yum is based on exactly the same principles as installing it using apt-get on Debian. Take a look at the How it works... section in the previous recipe.

There's more...

Webmin also provides an RPM package that can be downloaded and installed manually. If you wanted to do it this way for some reason, you would need to follow these steps:

  1. Visit Webmin's Downloads page at http://www.webmin.com/download.html and copy the address of the current RPM package. The package file will be named webmin-NNN.noarch.rpm, where NNN indicates the current version number.

  2. Download the package by using wget:


    $ wget http://prdownloads.sourceforge.net/webadmin/webmin-NNN.noarch.rpm
    
  3. Then, run the following command to install Webmin from the package:

    $ sudo yum localinstall webmin-NNN.noarch.rpm
    

Note

On a SUSE-based system, issue the following command:

$ sudo yast --install webmin-NNN.noarch.rpm

See also

More information about installing Webmin on an RPM-based system can be found at the following Webmin website and wiki: