How To Install Webmin Ubuntu 16.04

image_pdfimage_print

Step 1: Install Webmin

1.1 Run commands in root

sudo su

1.2 Update and upgrade the server

sudo apt-get update && apt-get upgrade -y

1.3 Install wget if you don’t have it

sudo apt-get install wget

1.4 Edit apt source list

sudo nano /etc/apt/sources.list
# Add the following line at the bottom of the file

deb http://download.webmin.com/download/repository sarge contrib
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb http://download.webmin.com/download/repository sarge contrib

Exit and Save

1.5 Download the Webmin PGP key

sudo wget http://www.webmin.com/jcameron-key.asc
root@ubuntu:/# sudo wget http://www.webmin.com/jcameron-key.asc
--2018-11-03 00:40:59--  http://www.webmin.com/jcameron-key.asc
Resolving www.webmin.com (www.webmin.com)... 216.105.38.10
Connecting to www.webmin.com (www.webmin.com)|216.105.38.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1320 (1.3K) 
Saving to: ‘jcameron-key.asc’

jcameron-key.asc    100%[===================>]   1.29K  --.-KB/s    in 0s

2018-11-03 00:41:00 (285 MB/s) - ‘jcameron-key.asc’ saved [1320/1320]

root@ubuntu:/#

1.6 Add the Webmin PGP key

sudo apt-key add jcameron-key.asc
root@ubuntu:/# sudo apt-key add jcameron-key.asc
OK
root@ubuntu:/#

1.7 Update the package list again

sudo apt-get update
root@ubuntu:/# sudo apt-get update
Hit:1 http://se.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://se.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://se.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Ign:5 http://download.webmin.com/download/repository sarge InRelease
Get:6 http://download.webmin.com/download/repository sarge Release [14.9 kB]
Get:7 http://download.webmin.com/download/repository sarge Release.gpg [173 B]
Get:8 http://download.webmin.com/download/repository sarge/contrib amd64 Packages [1,378 B]
Get:9 http://download.webmin.com/download/repository sarge/contrib i386 Packages [1,378 B]
Fetched 17.9 kB in 1s (12.8 kB/s)
Reading package lists... Done
root@ubuntu:/#

1.8 Install Webmin

sudo apt-get install webmin -y
** initializing cache. This may take a while **
Setting up webmin (1.890) ...
Webmin install complete. You can now login to https://ubuntu.home.local:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.
Processing triggers for systemd (229-4ubuntu21.5) ...
Processing triggers for ureadahead (0.100.0-19) ...
root@ubuntu:/#

1.9 Enable Webmin default port in firewall

sudo ufw allow 10000

1.10 Logon to Webmin from a browser with a sudo account

https://YOUR IP ADDRESS:10000/

Step 2: Configure Webmin

2.1 Change Webmin default port, edit Webmin config

sudo nano -w /etc/webmin/miniserv.conf
port=10000
root=/usr/share/webmin
mimetypes=/usr/share/webmin/mime.types
addtype_cgi=internal/cgi
realm=Webmin Server
logfile=/var/webmin/miniserv.log
errorlog=/var/webmin/miniserv.error
pidfile=/var/webmin/miniserv.pid
logtime=168
ssl=1
# Change port to 8888
port=8888
root=/usr/share/webmin
mimetypes=/usr/share/webmin/mime.types
addtype_cgi=internal/cgi
realm=Webmin Server
logfile=/var/webmin/miniserv.log
errorlog=/var/webmin/miniserv.error
pidfile=/var/webmin/miniserv.pid
logtime=168
ssl=1

Exit and Save

2.2 Restart Webmin

sudo systemctl restart webmin

2.3 Enable port in firewall

sudo ufw allow 8888

2.4 Remove old firewall rule

sudo ufw status numbered
root@ubuntu:/# sudo ufw status numbered
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 999                        ALLOW IN    Anywhere
[ 2] 123/udp                    ALLOW IN    Anywhere
[ 3] 10000                      ALLOW IN    Anywhere
[ 4] 8888                       ALLOW IN    Anywhere
[ 5] 22 (v6)                    ALLOW IN    Anywhere (v6)
[ 6] 999 (v6)                   ALLOW IN    Anywhere (v6)
[ 7] 123/udp (v6)               ALLOW IN    Anywhere (v6)
[ 8] 10000 (v6)                 ALLOW IN    Anywhere (v6)
[ 9] 8888 (v6)                  ALLOW IN    Anywhere (v6)

root@ubuntu:/#
# Remove rule 10000

sudo ufw delete 3
root@ubuntu:/# sudo ufw delete 3
Deleting:
 allow 10000
Proceed with operation (y|n)? y
Rule deleted
root@ubuntu:/#

Repeat for ipv6 rule

2.5 Logon to Webmin on the new port

https://YOUR IP ADDRESS:8888/

Useful Commands

Stop Webmin  service

sudo systemctl stop webmin

Start Webmin service

sudo systemctl start webmin

Display status

sudo systemctl status webmin
● webmin.service - LSB: web-based administration interface for Unix systems
   Loaded: loaded (/etc/init.d/webmin; bad; vendor preset: enabled)
   Active: active (running) since Sat 2018-11-03 00:50:38 CET; 8s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6772 ExecStop=/etc/init.d/webmin stop (code=exited, status=0/SUCCESS)
  Process: 6794 ExecStart=/etc/init.d/webmin start (code=exited, status=0/SUCCESS)
    Tasks: 1
   Memory: 24.4M
      CPU: 188ms
   CGroup: /system.slice/webmin.service
           └─6797 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf

Nov 03 00:50:36 ubuntu.home.local systemd[1]: Starting LSB: web-based administration interface for Unix systems...
Nov 03 00:50:36 ubuntu.home.local perl[6796]: pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=  user=root
Nov 03 00:50:38 ubuntu.home.local webmin[6796]: Webmin starting
Nov 03 00:50:38 ubuntu.home.local systemd[1]: Started LSB: web-based administration interface for Unix systems.
~
~
~
~
~
~
~
lines 1-16/16 (END)
image_pdfimage_print

Donate