Next step is to update the repositories and all available package updates, to make sure we’re installing the latest version of Webmin. Run following command:
Now we can proceed to an actual Webmin installation, execute following command:
yum install webmin-y
Above will take a moment, because we’re not installing only latest version of Webmin, but also all its dependencies.
Now execute following commands to make sure that Webmin starts automatically every time you reboot your server:
chkconfig webmin on
Now reboot your server, Webmin will automatically start. Or just start the Webmin service manually from the console without a reboot (not necessary):
service webmin start
Simple, wasn’t it?
However, because most of us as accessing our servers remotely, we’ll need to cover couple more things before we’re done.
Because CentOS 7 iptables were replaced with FirewallD so we should me sure that Webmin’s default port 10000 is enabled and thus accessible externally. To do so, run following command (add –permanent to the end of the line if you’d like this to be a permanent firewall change):
If it works, great. Otherwise if you get a following (very common on newly installed servers) error, it means, that FirewallD is not currently running on your system:
It means exactly what it says: FirewallD is currently not running on your Centos 7 system.
We’ll need to start it first. To do so, use following commands:
systemctl start firewalld
Then add the firewall exception for port 10000 once again:
Complete output should look like this:
Now we should be able to access Webmin by opening browser at your server’s ip address (or domain name). Go to http://ipaddress:10000. If everything worked correctly, you’ll be greeted to a Webmin login screen:
Login with your root username and password and Webmin should load:
And that is it. Webmin runs on port 10000 and is installed on Centos 7 operating system.
Those of you, who would like to change their default Webmin port from 10000 to something else, follow this steps:
Open file miniserv.conf (which stores webmin config) in vi console by executing following command:
Again, press Insert key on your keyboard to enter vi console insert mode. Look for the line 1 and line 16 which stores the port number Webmin currently listens on:
Go to line 1 and line 16 and change the port number from 10000 to whatever you wish. In my case I want to run Webmin on port 443, so that’s what I will change it to:
Now we can exit VI insert mode by pressing ESC on the keyboard and quit VI editor while saving the changes we’ve made. To do so, type:
Now, add FirewallD exception for your port (in my case 443) and remove existing exception for port 10000:
Something it’s a good idea to reload firewall after changing ports:
Now restart Webmin:
You should see following output:
And we’re done, you can access Webmin on a new port (in my case 443):