We use CentOS for our web servers, and favor Webmin as a way to administer our servers. To install Webmin via yum on CentOS, follow these steps as root or sudo, from the command line (via SSH or at the console). These steps will also work for RedHat servers.
Configure the Webmin repository and install
Webmin is not available via yum in the default CentOS repository. Follow these steps to add the Webmin repository (repo) from Webmin.com.
- Create and edit the repository file # nano /etc/yum.repos.d/webmin.repo
- Add the [Webmin] section (listed below) to the new repository file
- Save the new file
- Import the public key: # rpm --import http://www.webmin.com/jcameron-key.asc
- Install webmin: # yum install webmin
Open the Firewall
If your server is protected by a firewall, you won't be able to access Webmin until you open port 10000. Use these steps on CentOS
- Backup the current firewall settings: # cp /etc/sysconfig/iptables /etc/sysconfig/iptables.bak
- Install the Red Hat firewall configuration tool # yum install system-config-securitylevel
- Run the firewall tool: system-config-securitylevel
- Select _Security Level:_ *Enabled*
- Click [Customize]
- Check incoming ports to allow (probably SSH, WWW, Secure WWW, and FTP)
- _Other Ports_ 10000:tcp
- Click [OK]
This will save your new settings and reload the firewall. You won't have to use this command line firewall tool again, as now you can use Webmin to configure the firewall.
Now that you've installed Webmin and opened the Webmin port, test it out. Open your favorite brower and type your server's IP address followed by :10000, like this:
The Webmin login screen should appear. Log in with your root credentials. It's a good idea to set up another Webmin user so you don't have to use your root credentials
Webmin repo section
name=Webmin Distribution Neutral