Last active
July 17, 2023 07:44
-
-
Save piyushrajput/dd1a59e449ee132cccf972863b490464 to your computer and use it in GitHub Desktop.
How To Install Webmin and Firewall On CentOS 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Few day ago we showed you how to install Webmin on Ubuntu 14.10. This brief tutorial is going to show you how to install the same Webmin on a CentOS 7 machine. | |
For those who don’t know, Webmin is a web-based tool to mange every aspect of your Unix-like systems. From creating new accounts to managing file permissions to installing applications and services, Webmin allows you to perform all these tasks easily from any modern web browser. | |
Instead of using the command line console or terminal, new systems administrators could install Webmin and perform all system management from via a web browser without sacrificing time and efforts. Webmin also enables remotely management of your servers. | |
Before you continue with the installation, please make sure you have root level permissions to your system. If you don’t have root access the installation may fail. | |
Since Webmin isn’t available in the default CentOS repositories, you must add its repository to your system before installing. To do that, run the commands below to create a repository file for Webmin. | |
sudo vi /etc/yum.repos.d/webmin.repo | |
Next, add these lines into the file and save it | |
[Webmin] | |
name=Webmin Distribution Neutral | |
#baseurl=http://download.webmin.com/download/yum | |
mirrorlist=http://download.webmin.com/download/yum/mirrorlist | |
enabled=1 | |
After saving it, run the command below to add the repository key to your system for the repository you just added above. Doing this tells CentOS 7 to also trust the repository and all its packages. A repository without a valid key may not be used to install packages on CentOS 7 machines. | |
cd /tmp && wget http://www.webmin.com/jcameron-key.asc | |
rpm --import jcameron-key.asc | |
Next, run the commands below to install Webmin. | |
sudo yum install webmin | |
Next, run the commands below to enable Webmin to always start up when your system reboots or restarted. | |
sudo chkconfig webmin on | |
Then run the commands below to start Webmin | |
sudo service webmin start | |
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) | |
You should see a logon page for Webmin. At this point, use your server credentials to sign on. | |
Enable Firewalld | |
To enable firewalld, run the following command as root: | |
systemctl enable firewalld | |
Start Firewalld | |
To start firewalld, run the following command as root: | |
systemctl start firewalld | |
Check the Status of Firewalld | |
To check the status of firewalld, run the following command as root: | |
systemctl status firewalld | |
If you don’t see the logon page or if you get a 404 page, then make sure the firewall has an opening for web traffic. If not, run the commands below to allow HTTP traffic. | |
sudo firewall-cmd --permanent --zone=public --add-port=10000/tcp | |
sudo firewall-cmd --permanent --zone=public --add-service=https | |
sudo firewall-cmd --reload | |
That’s it! Webmin is installed and ready to sue. Browse around and take notes of all the links on the right. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment