Choose a different version or distribution
Introduction
Before we begin talking about how to install Webmin on CentOS 7, let’s briefly understand – What is Webmin?
Webmin is a user-friendly web-based system administration tool that simplifies managing Linux and Unix servers. With an intuitive graphical interface, it enables users to handle essential tasks like configuring user accounts, setting up firewalls, managing databases, and more, without the need for complex command-line knowledge. Webmin streamlines server management, making it accessible to both beginners and experienced administrators.
In this tutorial, you will install Webmin in an independent environment on CentOS 7. We will also address a few FAQs to Install and Use Webmin on CentOS 7.
Advantages of Webmin
- User-Friendly Interface: Webmin's intuitive graphical interface simplifies server management, making it accessible to all users.
- Versatility: It supports various Linux and Unix systems, catering to a wide range of server setups.
- Comprehensive Module Support: Extensive modules cover essential server functions, from user management to firewall configuration.
- Time-Efficient: Webmin streamlines tasks, saving administrators time and effort in managing server settings.
- Community and Documentation: A vibrant community and extensive documentation provide valuable support for users at all levels.
Prerequisites to Install and Use Webmin on CentOS 7
Make sure you have the following dependencies installed before proceeding further with Webmin installation:
- A CentOS 7 server with sudo non-root user.
- Apache, which will be used to perform Let’s Encrypt domain verification.
- A Fully-Qualified Domain Name (FQDN), with a DNS A record pointing to the IP address of your server.
Step 1 - Install Webmin
1) The first thing to be done is to add a Webmin repository to make the package manager easier. This is done by adding a new file /etc/yum.repos.d/webmin.repo
containing information about the new repository.
Create and open the file with your text editor using the following command:
sudo vi /etc/yum.repos.d/webmin.repo
2) Add the following lines to the file in order to define the new repository:
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
3) Save it and exit the editor.
4) Now, add the Webmin file's PGP key in order to make the system trust the new repository
wget http://www.webmin.com/jcameron-key.asc
sudo rpm --import jcameron-key.asc
5) Webmin can now be installed.
sudo yum install webmin
6) The webmin service will be started once the installation is complete.
Now, we move on to securing access to Webmin. This is done by adding a valid certificate.
Step 2 - Adding a Certificate with the help of Let's Encrypt
Although Webmin is configured to use HTTPS, it makes use of a self-signed, untrusted certificate.
1) Navigate to https://your_domain:10000
in your desired browser and replace your_domain
with your domain name, or you can use the IP address.
2) You will then be presented with a login screen. You need to sign in with the username root and your current password for the same.
3) This reveals the Webmin Dashboard. Before applying any certificates, you'll have to set the server's hostname. Find the Server hostname and click on the link to the right as shown below:
4) This navigates us to the Hostname and DNS Client page. In the hostname field, enter your Fully-Qualified Domain Name and press Save so that the settings are applied.
5) Now, click on Webmin on the left navigation bar and select Webmin Configuration.
6) After that, select SSL Encryption, followed by the Let's Encrypt tab. You'll see the following screen.
With the help of this window, you can instruct Webmin to obtain and renew your certificate. Let's Encrypt certificate expires after a duration of 3 months. We can instruct Webmin to attempt and renew Let's Encrypt certificates every month. Let's Encrypt searches for a verification file on our system, therefore we can configure Webmin to place the verification file in the /var/www/html
folder, which is used by the Apache web server. The below steps can be followed to set up your certificate:
- Fill in Hostnames for a certificate with FQDN.
- Select Other Directory and enter
/var/www/html
for Website root directory for the validation file. - For the Months between automatic renewal sections, you should deselect the Only renew manually option by typing
1
into the input box and selecting the radio button to the left of the input box. - After that, click the Request Certificate button. You will see a confirmation screen after a few seconds.
You just need to simply reload the page in order to use the new certificate. The browser would indicate that the certificate is now valid.
Step 3 - Using Webmin
The wide range of applications of Webmin modules has the power to control BIND DNS Server to something as simple as adding a new user to the system. Let's see how you can add a new user and update the operating system using Webmin.
Managing Users and Groups
We'll begin with managing the users who are allowed to access Webmin. This way, we don't have to log in with the help of the root user.
From the Webmin tab, select the Webmin Users button. This allows you to manage users that can log in to Webmin.
Select the Create a new Webmin user button at the top of the users table. This reveals the Create Webmin user screen where you can update the username, password, modules which can be accessed by the user, etc. By following the steps given below, you'll be able to create an alternate user:
Fill Username with john
.
- Fill Password with the password that you would like to use.
- Fill Real Name with
John Patrick
. - Select Create.
While creating a user, you can also define the modules which the user can access and the language for Webmin's interface.
Now, you have John as a user for Webmin. This means, that there is no need for the root user now.
Now, we'll explore how you can add new users to the system. The new user will be named deploy and would be used for hosting web applications.
From the System tab, select the Users and Groups button, which enables you to add and manage new users or groups.
Select the Create a new user button at the top of the users table. This reveals the Create user screen where you can update the username and password along with other options. By following the steps given below, you'll be able to create a new user:
- Add Username with
deploy
. - Choose Automatic for the User ID.
- Fill Real Name with a descriptive name, for instance
Deployment user
. - For Home Directory, choose Automatic.
- For Shell, choose
/bin/bash
from the drop-down list. - For Password, opt for Normal Password and type a password of your choice.
- For Primary Group, hit New group with the same name as the user.
- For Secondary Group, select the wheel from the All groups list, and press the → button in order to add the group to the in groups list. This will give the new user access to use
sudo
. - Press Create in order to create this new user.
You can also customize the user's password expiry, the user's shell, or whether they are allowed a home directory.
Updating Packages
Webmin allows its users to update all its packages through its user interface. For doing this, visit the Webmin Dashboard link and find the Package Updates field. A link stating the number of available updates will be visible as shown below:
Select this link and choose Update selected packages to initiate installation. You may be asked to reboot the system, which can be done with the help of Webmin as well.
FAQ to Install and Use Webmin on CentOS 7
Can I access Webmin from any web browser?
Yes, Webmin is designed to be accessed from any modern web browser. Simply enter the server's IP address or domain followed by the designated port to access the Webmin interface.
Is Webmin secure to use on my CentOS server?
Webmin is generally considered secure when installed and configured correctly. It employs SSL encryption for secure communication between the server and the web browser, ensuring data privacy.
What system configurations can I manage with Webmin?
Webmin provides a wide range of modules that allow you to manage users, groups, services, Apache and Nginx web servers, MySQL databases, firewalls, and more on your CentOS 7 server.
Can I grant limited access to other users using Webmin?
Yes, Webmin allows you to create additional user accounts with custom access privileges, so you can grant limited access to specific modules or functionalities.
Will installing Webmin affect my existing configurations on CentOS 7?
Webmin primarily provides a user-friendly interface to manage configurations and does not interfere with existing settings. However, it is recommended to have backups in place before making significant changes.
How do I update Webmin to the latest version of CentOS 7?
Webmin can be updated using the package manager for CentOS 7. Simply run the appropriate command to update the Webmin package.
Can I use Webmin to manage multiple CentOS 7 servers from one interface?
Yes, Webmin supports managing multiple servers from a single interface. You can add remote servers to your Webmin dashboard and control them conveniently.
Conclusion
We hope this detailed tutorial helped you understand how to install, configure and modify Webmin on CentOS 7 server. To learn more about Webmin installation on CentOS 7, check out the official Webmin Installation Documentation.
If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.