Monday, 25 February 2019

How to Manage CentOS 7 Server with Webmin

Update Base System

Before installing any package it is recommended that you update the packages and repository using the following command.
yum -y update
Once the system is updated, you can proceed further to install the dependencies required for Webmin.

Install Dependencies

Before we can install Webmin, you should install few dependencies. Run the following command to install the required dependencies.
yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty perl-Encode-Detect
Once the dependencies are installed, you can proceed further to install Webmin.

Install Webmin

Webmin is available as RPM package or you can also install Webmin through its official repository.
Add the repository by creating a new repository file by running the following command.
nano /etc/yum.repos.d/webmin.repo
If you do not have nano installed, you can run yum -y install nano. Add the following lines to the file.
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
Save the file and exit from the editor. Now fetch and install the GPG key which was used to sign the packages by running the following command.
wget http://www.webmin.com/jcameron-key.asc
rpm --import jcameron-key.asc
Now you can easily install Webmin by running the following command.
yum -y install webmin
Webmin is now installed in your system. Before you can access Webmin dashboard, you will need to configure the firewall.

Configure Firewall

Webmin dashboard can be accessed on port 10000. If you have a firewall running on your system then you will need to allow port 10000 to be accessed from outside network. Run the following commands to allow port 10000 through the firewall.
firewall-cmd --zone=public --add-port=10000/tcp --permanent
firewall-cmd --reload

Access Webmin

You can now access Webmin on https://Your_Server_IP:10000. Make sure that you use https as you will not be able to access Webmin on a unencrypted connection. You will get a warning about SSL certificate as we are using Self Signed Certificate here.
yum install bind bind-utils