This is really for myself, as I need to install Webmin from time to time and hate looking up this easy script to install it automatically.
If you use the following, please let me know in the comments and I'll maintain and update as required for others too.
Oh, and to be clear, I didn't write the script, I just became tired of having to search for it online.
(echo "[Webmin] name=Webmin Distribution Neutral baseurl=http://download.webmin.com/download/yum enabled=1" >/etc/yum.repos.d/webmin.repo rpm --import http://www.webmin.com/jcameron-key.asc yum -y install webmin)
Video for webmin on ubuntu – > https://www.youtube.com/watch?v=eDGWmLLJp-I
From Webmin regarding firewalls—
http://www.webmin.com/firewall.html
Many operating systems block access to port 10000 by default, as they have a firewall activated as part of the installation process. This may prevent you from logging into http://yourserver:10000/ from another system on your network or over the Internet.
The simplest way to open up port 10000 is to use one of the Webmin firewall management modules, such as Linux Firewall, BSD Firewall or IPFilter Firewall. However, to access this you'll need to run a brower on the same system as Webmin, and access it via the URL http://localhost:10000/.
The alternative is to login as root via SSH, and manually edit the firewall configuration file. On Redhat and derived systems, this is /etc/sysconfig/iptables, while on Debian it is/var/lib/iptables. The line you need to add is :
-A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
It should be added in the file just after similar lines which grant access to ports 80, 22 and so on.
Once this line has been added, you will need to apply the firewall configuration. This is typically done with the command /etc/init.d/iptables restart .
Add PHPMyAdmin to Centos 7
Step 1: Add the EPEL Repository
phpMyAdmin is part of Extra Packages for Enterprise Linux (EPEL), which is a community repository of non-standard packages for the RHEL distribution. First, we’ll install the EPEL repository:
rpm -iUvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Step 2: Install phpMyAdmin
First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.
yum -y update
Then it’s a matter of just running one command for installation via apt-get:
yum -y install phpmyadmin
Step 3: Find Your IP Address
Find your IP address with any of the following sites:
Step 4: Basic Configuration for phpMyAdmin
To secure phpMyAdmin we should lock down access to a specific IP address. When the phpMyAdmin package is installed, an Apache Virtual Host file is added to configure web access. Let’s edit that file:
vim /etc/httpd/conf.d/phpMyAdmin.conf
The default phpMyAdmin configuration only allows access from the server on which it is installed (local host). Locate the following sections and adjust the IP address(es) to the appropriate IP you found in Step 3, or another IP address that will be connecting to phpMyAdmin remotely:
Require ip 127.0.0.1
Allow from 127.0.0.1
Require ip 127.0.0.1
Allow from 127.0.0.1
-exit and save using the command :wq .
Restart Apache:
systemctl restart httpd
Check if phpMyAdmin is running by visiting http://your_server_IP/phpmyadmin. Example: http://1.2.3.4/phpmyadmin
For installing phpmyadmin on ubuntu – > https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-14-04