This article will describe installing webmin which is a web base system administrator tool.
Table of Contents
1 Install webmin
Add webmin repository.
> sudo su -c ' cat <<EOF > /etc/zypp/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 zypper -n in webmin > sudo systemctl enable webmin
Open 10000/tcp.
> firewall_open_tcp() { for t in FW_SERVICES_EXT_TCP FW_SERVICES_DMZ_TCP FW_SERVICES_INT_TCP; do sudo sed -e "s/^${t}=\"\(.*\)\"/${t}=\"\1 $1\"/g" \ -i /etc/sysconfig/SuSEfirewall2 done sudo systemctl restart SuSEfirewall2 } > firewall_open_tcp 10000
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".
Login as root.
The dashboard is displayed.
3 Script for installing webmin
The following script will install webmin. root password is "password".
#!/bin/sh ROOT_PASSWORD="password" TMP=`mktemp -t opensuse-setup-webmin.sh.XXXXXX` trap "rm $TMP* 2>/dev/null" 0 sudo su -c ' cat <<EOF > /etc/zypp/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 zypper -n in webmin sudo /usr/libexec/webmin/changepass.pl /etc/webmin root ${ROOT_PASSWORD} sudo systemctl enable webmin firewall_open_tcp() { for t in FW_SERVICES_EXT_TCP FW_SERVICES_DMZ_TCP FW_SERVICES_INT_TCP; do sudo sed -e "s/^${t}=\"\(.*\)\"/${t}=\"\1 $1\"/g" \ -i /etc/sysconfig/SuSEfirewall2 done sudo systemctl restart SuSEfirewall2 } firewall_open_tcp 10000 sudo reboot