Webmin is a program that simplifies the process of managing a Linux or Unix system through its Graphical User Interface.
Webmin is designed to edit system files directly through the GUI using the built-in web server and a number of CGI programs. It is good for existing infrastructure as it does not take over control of the system as do some other server admin tools, so editing a config file through Webmin is no different than editing and saving that file through the CLI.
It's very handy to quickly troubleshoot issues and a great tool for managing multiple domains on a single server with ease.
In this tutorial we will show you the installation process of Webmin on Fedora22 and CentOs 7.
To install Webmin you must have superuser privileges to run commands to its installation process. Your operating system should be up to date with the latest repositories. Let’s login to your server and install the optional dependencies on your server you wish to install Webmin.
# yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty
There are different available options to install Webmin, since Webmin isn’t available in the default CentOS repositories, you must add its repository to your system before installing.
1) Install through RPM
To install Webmin using the RPM version of Webmin, first we have to download its RPM package from the official web page of Webmin, that you can directly download using wget command as follows:
# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.760-1.noarch.rpm
Now run the following command to install Webmin that will complete the rest of the installation process to the '/usr/libexec/webmin' directory and you will be able to login to https://your_server_ip:10000/ as root user with your root password.
2) Install Using YUM Repository
To install webmin using the Webmin yum repository, run the commands below to create a repository file for Webmin.
# vi /etc/yum.repos.d/webmin.repo
Add the below lines to the newly created above file and save the file.
[Webmin] name=Webmin Distribution Neutral #baseurl=http://download.webmin.com/download/yum mirrorlist=http://download.webmin.com/download/yum/mirrorlist enabled=1
Then issue the following command to add the repository key to your system for the repository, we have added in above file and import its key to build the trust between your Operating system and the newly added repository with its all packages.
# wget http://www.webmin.com/jcameron-key.asc # rpm --import jcameron-key.asc
Now we can install webmin using the yum command as shown below to install Webmin.
[root@localhost ~]#yum install webmin
The above command will be installing latest version of Webmin with all its dependencies.
Once the installation process completes, check the status of webmin service and enable it to auto startup at every boot.
# service webmin status Webmin (pid 5982) is running # chkconfig webmin on
After installing Webmin, open any modern browser and browse to the server via its hostname or IP address followed by ':10000' (example: http://server_IP:10000), and make sure that '10000' port is allowed in your firewall. In centOS 7 you can allow the port using below command.
firewall-cmd --permanent --zone=public --add-port=10000/tcp firewall-cmd --permanent --zone=public --add-service=https firewall-cmd --reload
Using Webmin GUI
Now we will access Webmin by opening browser with our server’s ip address (or domain name). Go to https://ipaddress:10000. If everything worked fine, you’ll be greeted to a Webmin login screen as shown below.
Login with your root credentials, after successful login you will be directed towards Webmin Administration Graphical User interface showing the System Information page with overall system’s resources and other information. You can also view available updates from this page.
Creating New User using Webmin
To create a new user using Webmin, let's go to the Users and Groups page under the System drop-down menu. There you’ll be able to easily create and manage user accounts.
Once you choose the New user creation option, then you will have to add its further details in next available options that will be comprised of user details, password options and group membership details. Then click on the "Create" button at the bottom of the page after you configured your new user.
Using Command Line on Webmin
You can also open the system command shell by navigating Others >> Command Shell option on the left bar of your Webmin Administration. It looks to be a normal terminal window, the only difference is that it is on a web browser. So, enter any shell command to execute in the text field as shown below.
MySQL Database Administration
We can perform almost every function through Webmin that we do from command line. In order to manage your database server, navigate to the Servers section, and click on the MySQL Database Server under the drop-down option. You will see all the databases in this section and can also perform system-level functions from here. If you want to create a new database then drag your mouse and point to the option under the MySQL databases as shown below.
Its concluded that now we can perform every system-level task using the Webmin GUI. There are many functions available through Webmin from restart servers to managing their services and VPN to using CD burning etc. So, look around and explore the various features and services that are available through Webmin and start setting up and customizing your systems. It’s just wonderful software that every system administrator must have installed.