Fedora 25: Install webmin

This article will describe installing webmin which is a web base system administrator tool.

1 Install webmin

Add webmin repository.

$ sudo su -c '
cat <<EOF > /etc/yum.repos.d/webmin.repo
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
EOF
'
$ wget -q http://www.webmin.com/jcameron-key.asc
$ sudo rpm --import jcameron-key.asc

Install webmin.

$ sudo dnf install -y webmin
$ sudo systemctl enable webmin

Open 10000/tcp.

$ sudo firewall-cmd --add-port=10000/tcp --permanent
$ sudo firewall-cmd --reload

Set root password.

$ ROOT_PASSWD=password
$ sudo /usr/libexec/webmin/changepass.pl /etc/webmin root ${ROOT_PASSWORD}

Reboot machine.

$ sudo reboot

1.1 Change port

Change "port" and "listen" in /etc/webmin/miniserv.conf. Run "sudo systemctl restart webmin".

$ sudo sed -e 's/^port=.*/port=10002/g' \
-e 's/^listen=.*/listen=10002/g' -i /etc/webmin/miniserv.conf
$ sudo systemctl restart webmin

2 Access to webmin

Access to 10000/tcp via https.

https://<server>:10000

While webmin uses https, browser does not import certificate authority for webmin. This will be resolved after accessing to webmin as except.

In case of Chrome, display ADVANCED and click "Proceed to xxx".

0001_https-error.png

Login as root.

0002_login.png

The dashboard is displayed.

0003_dashboard.png

3 Script for installing webmin

The following script will install webmin. root password is "password".

#!/bin/sh

ROOT_PASSWORD="password"
TMP=`mktemp -t fedora-setup-webmin.sh.XXXXXX`
trap "rm $TMP* 2>/dev/null" 0

sudo su -c '
cat <<EOF > /etc/yum.repos.d/webmin.repo
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
EOF
'
wget -q http://www.webmin.com/jcameron-key.asc -O ${TMP}
sudo rpm --import ${TMP}

sudo dnf install -y webmin
sudo /usr/libexec/webmin/changepass.pl /etc/webmin root ${ROOT_PASSWORD}
sudo systemctl enable webmin

sudo firewall-cmd --add-port=10000/tcp --permanent
sudo firewall-cmd --reload

sudo reboot