One of the challenges when moving from administering a Windows environment to administering Linux is learning the new tools at your disposal. As an administrator, you want to learn the details of the operating system so that you can get the most out of it. But while you are learning, you need to get real work done now.
To accelerate your productivity in Linux, we are going to install a
program called Webmin. According to the Webmin.com (see Resources for a link): "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 set up user accounts, Apache, DNS, file sharing, and so on. Webmin consists of a simple Web server, and a number of CGI programs
which directly update system files like /etc/inetd.conf and /etc/passwd. The Web server and all CGI programs are written in Perl version 5, and use
no non-standard Perl modules."
Webmin runs on virtually all Unix-like platforms including Linux, AIX, HPUX, Solaris, OS X, and others. It provides a Web front end to many administrative tasks in Linux. It can be run from any graphical browser either locally or remotely. Webmin can be secured with SSL, to prevent snooping. As you are learning Linux administration, Webmin is a great time saver. Webmin is also handy to help with the tedious tasks that you have not automated.
Webmin is extensible. The author provides a development guide, and there are several third-party modules available. You can also design your own modules, so Webmin can always be adapted to fit your needs.
The first step to working with Webmin is to install it. Webmin is included with a few distributions, but it will be just as easy to download it from the Webmin site (see Resources for a link).
At the time of this writing, the current version is 1.90. The correct method for installation will vary depending in your distribution. If you are using Red Hat Linux or one of the UnitedLinux distributions (SuSE, Turbo, Connectiva, or Caldera), then the RPM will be the simplest method of installation. If you are using a different distribution, you will need to check the documentation for your distribution and the Webmin installation instructions to determine the best method for you. RPM installation will be assumed.
First check to see if Webmin is installed on your system. From a text terminal, enter the following:
rpm -q webmin
If Webmin is installed on your system, you will receive a version number:
Webmin-1.090-1
or an indication that Webmin is not installed:
package webmin is not installed
Even if Webmin is already installed, it will probably be a version lower than the current one available for download. In this case, you can do an upgrade or a fresh install with the following command:
rpm -Uvh webmin-1.090-1.noarch.rpm
A verbose upgrade is done with a progress bar printed with # marks.
When Webmin is installed, it activates by default. But Webmin
does not install with SSL activated. SSL requires the installation of a
Perl module called Net::SSLeay. Until this is installed,
Webmin will only be secure to run from the local console. Securing Webmin
will be briefly covered at the end of this article.
Access Webmin through your favorite Web browser. Two of the tools, a file explorer and a telnet/ssh client, are applet-based and will require a Java Runtime Environment to be installed on your browser. These tools are handy, but not critical. All of the other modules have no special requirements.
To begin using Webmin, point your browser to port 10000 on the
system. With a browser on the local system, you would use
http://localhost.localdomain:10000/. Webmin will first bring you
to a login screen.
Webmin users are separate from operating system users. This allows you to set up users for administration through Webmin that are not in the normal Unix authentication scheme. However, if you have users that you want to be able to use Webmin, you can enter them into the Webmin user list and have Webmin authenticate them through Unix facilities rather than through its internal mechanisms. Access to Webmin modules can be controlled for each user. Helpdesk staff could have access to just password functions, while other staff could have access to all modules, for example.
A root user is automatically created with the system's root password upon installation. Webmin logs activity by login, so in a multi-admin environment, it would probably be better to create an admin group with the rights of the root user, and create users for each individual who works on the system. Your first login must be as root.
The first screen you will see is the Webmin Configuration Section. This is where you configure Webmin users, configure modules, and view activity logs. The icons at the top switch between the different module sections in Webmin. All of the modules are configurable, and you can regroup things to suit your preferences.
Figure 1. Webmin configuration screen
The System section deals with general operating system configuration. Here, you configure file systems, users, and groups and the general boot behavior of the system. You can control the services that are running on the system and whether they start automatically from the Bootup and Shutdown icon. Configuration of those services, however, is in the Servers section. The "Software Packages" tool is of particular interest. It allows easy viewing of packages installed on your system and interfaces to distribution update repositories and rpmfind.net, a common RPM repository on the Internet (see Resources for a link).
The Servers section has configuration for various services that you may be running on the system. The BIND and DHCP tools are very convenient. Also the Samba tool is simple to use for configuring file and print shares for Windows and other clients. Sendmail, the SMTP server, is notorious for having a complex configuration file. The Webmin Sendmail tool keeps you out of trouble there as well.
Figure 2. Webmin servers screen
The Networking section provides tools for configuring the network hardware and some of the complex network controls, such as firewalling. All the tools communicate with the standard configuration files, so anything you do in Webmin is reflected in the console tools.
The Hardware section is for configuration of physical devices, mostly printers and storage devices. The Logical Volume Management (LVM) tool is particularly interesting as it helps you visually manage dynamic volumes on your Linux system.
The Cluster section contains tools you would use if you were clustering systems. A cluster, in this context, is a set of related systems that need to have their configurations synchronized. Systems can synchronize users, groups, packages, and other things with system failure detection. These tools will help you set up hot failover systems and other systems where synchronization is important. Clustering is an advanced topic and will probably require installation of packages not included with your Linux distribution.
The Others section contains miscellaneous utilities that you may find useful. The "SSH/Telnet Login" and "File Manager" tools are applet-driven, and cannot be run unless your browser has an active JRE. The "Perl Modules" tool is very useful for keeping up with Perl modules and will interface directly to CPAN on the Internet. The "File Manager" tool provides an Explorer-like view of the server's file system, allowing you to move and copy files around without passing them through your workstation's memory, if you are working remotely. The "SSH/Telnet Login" tool is a remote shell console that will allow you console access through your browser.
Webmin is a browser-based administration application written in Perl. Webmin is extensible and available for other Unix-like operating systems besides Linux. Once installed, Webmin is accessed through a special port, typically 10000, either locally or from a remote browser. It provides point-and-click interfaces to a variety of Linux administration tasks, including user management, network firewalling, and network device configuration.
Webmin is free to install and use, and is a good way to manage a working Linux environment while you are making a transition from the graphical tools of Windows. Webmin tools are a front end to the console-based tools, so configuration is consistent, and administration can be done from either set of tools safely.
Learn
-
Read the other installments in this Windows-to-Linux roadmap (developerWorks, November 2003).
-
Learn about Perl at Perl.org. The CPAN network is the home of many
useful Perl modules and like software.
-
Perl is released under the free Artistic
License, which allows you to publish or keep private your changes to the source code.
-
Learn more about Perl and keep up with developments in the Perl community
with the Cultured Perl column on developerWorks.
-
For additional information, see these developerWorks articles: "Understanding
Linux configuration files", "Using
the xinetd program for system administration", "Automating
UNIX system administration with Perl", and "Administer
Linux on the fly".
-
More information on transitioning to Linux awaits you on the developerWorks New to Linux page.
-
Find more resources for Linux developers in the developerWorks Linux zone, including our newest how-to tutorials.
-
Hone your skills in Linux basics and systems administration with our certification exam study guides. Whether you choose to take the exams or not, our Linux skill-building tutorial series will immerse you in Linux fundamentals as well as advanced topics.
-
Learn how to acquire kernel source, configure and boot your new kernel, add a feature, fix a flaw, or just have fun tinkering with operating system source code in our Hacking the Linux kernel tutorial series. Hack and be free.
-
IBM developerWorks technical events and Webcasts are a great way to learn more about Linux as well as IBM products that run on Linux.
-
The Linux at IBM site offers software, links, end-to-end Linux solutions, and more.
-
The Linux Documentation Project is a repository of Linux documentation including documents about individual software, HOWTO documents, FAQs, and more.
-
Linux Online! offers non-partisan Linux news and information.
-
The O'Reilly Network is an excellent resource for technical books on Linux.
Get products and technologies
-
Download the Webmin tool at its home page, and before using it remotely, read Securing Webmin with SSL.
-
RPMFind is an RPM repository where
you will find scads of useful (and many less-useful, but fun) programs.
-
Order the SEK for Linux, a two-DVD set containing the latest IBM trial software for Linux from DB2®, Lotus®, Rational®, Tivoli®, and WebSphere®.
-
Build your next development project on Linux with IBM trial software, available for download directly from developerWorks.
Discuss
- Participate in the discussion forum.
-
Get involved in the developerWorks community by participating in developerWorks blogs.
Chris Walden is an e-business Architect for IBM Developer Relations Technical Consulting in Austin, Texas, providing education, enablement, and consulting to IBM Business Partners. He is the official Linux fanatic on his hallway and does his best to spread the good news to all who will hear it. In addition to his architect duties, he manages the area's all-Linux infrastructure servers, which include file, print, and other application services in a mixed-platform user environment. Chris has ten years of experience in the computer industry ranging from field support to Web application development and consulting.



