With Webmin, you can better secure and manage your instances of Rocky Linux. Jack Wallen walks you through the process of getting this web-based tool up and running. </p><div data-component="lazyloadImages"> <figure class="image pull-none image-large"><span class="img aspect-set " style="padding-bottom: 75%"><img src="https://www.techrepublic.com/a/hub/i/r/2021/07/29/977f91a3-a080-4ef4-b453-a1536975fea3/resize/770x/36d17b4ff7943624e57b975868487e54/rockylinuxhero-new.jpg" class="" alt="Rocky Linux logo on mountain scene background" width="770"/></span><figcaption><p> Illustration: Lisa Hornung/TechRepublic </p></figcaption></figure><p>Webmin is a great tool for admins new to Linux. With this web-based admin system, you can take care of just about anything you need, including security concerns such as SSH configuration, system upgrades, service management and more. With distributions such as Rocky Linux (a 1:1 RHEL binary compatible operating system), Webmin isn't included in the standard repositories, so you'll need to jump through a couple of hoops to get it up and running.
Note: Rocky Linux does include the web-based management tool Cockpit; however, Cockpit isn’t nearly as extendable as Webmin, nor does it offer the security options in Webmin. You can always use both for even more functionality.
SEE: 5 Linux server distributions you should be using (TechRepublic Premium)
What you’ll need
To get Webmin installed, you’ll need a running instance of Rocky Linux and a user with sudo privileges.
How to install the necessary dependencies
First, we’ll need to take care of the dependencies. Log into your Rocky Linux instance and issue the command:
sudo dnf install wget tar perl -y
<p>Once the dependencies are installed, you're ready to install Webmin. </p><h2> How to install Webmin </h2>
To make this work, you’ll need to download the current version of Webmin with the command:
<p>Once the file has completed downloading, unpack it with the command: </p><pre class="code">tar xvf webmin-current.tar.gz</pre> <p>Create a new directory for Webmin with: </p><pre class="code">sudo mkdir -p /usr/local/webmin</pre> <p>You need to find out what version of Webmin has been downloaded–do that with the <em>ls</em> command. You should see a new directory named webmin-XXX (where XXX is the release number). With that number in hand, you can now run the install script with the command: </p><pre class="code">sudo ./webmin-XXX/setup.sh /usr/local/webmin/</pre> <p>Where XXX is the release number.
The installer script will ask the following questions:
- Config file directory [/etc/webmin]:
Log file directory [/var/webmin]:
Full path to perl (default /usr/bin/perl):
Web server port (default 10000):
Login name (default admin): NAME
Login password: PASSWORD
Password again: PASSWORD
Use SSL (y/n): y
Start Webmin at boot time (y/n): y
Where NAME is the username you want to use as the Webmin admin and PASSWORD is the password you’ll use for that login.
Outside of the Login name/password, accept the defaults for all of the questions.
Finally, open the firewall with the commands:
sudo firewall-cmd --add-port=10000/tcp --permanent sudo firewall-cmd --reload
<h2> How to access Webmin </h2><p>Open a web browser and point it to https://SERVER:10000 (where SERVER is the IP address or domain of the Rocky Linux server). Since Webmin uses a self-signed SSL certificate, you'll have to accept the risk. Once you do that, you'll be presented with the login window. Use the credentials you created during installation. Upon successful authentication, you'll find yourself on the main Webmin page (<strong>Figure A</strong>), where you can start administering your Rocky Linux server.
And that’s all there is to getting this powerful, web-based admin system up and running on Rocky Linux. You can now take control of the security of that operating system and lock it down exactly as you need.
<h2> Also see </h2> </div>