如何在 Ubuntu 上安裝 Webmin


Webmin 是一個基於 Web 的 Unix 系統管理介面。使用任何現代 Web 瀏覽器,您都可以設定使用者帳戶、Apache、DNS、檔案共享等等。Webmin 無需手動編輯 Unix 配置檔案(如 /etc/passwd),並且允許您從控制檯或遠端管理系統。本文將向您介紹如何在 Ubuntu 上安裝 Webmin。

要安裝 Webmin,請開啟 /etc/apt/sources.list 檔案,如下所示:

# sudo nano /etc/apt/sources.list

檔案的示例輸出應如下所示:

# deb cdrom:[Ubuntu 14.04.4 LTS _Trusty Tahr_ - Release amd64 (20160217.1)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ubuntu.excellmedia.net/archive/ trusty main restricted
deb-src http://ubuntu.excellmedia.net/archive/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted
deb-src http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ubuntu.excellmedia.net/archive/ trusty universe
deb-src http://ubuntu.excellmedia.net/archive/ trusty universe
deb http://ubuntu.excellmedia.net/archive/ trusty-updates universe
deb-src http://ubuntu.excellmedia.net/archive/ trusty-updates universe
[ line 16/57 (28%), col 1/59 (1%), char 787/3168 (24%) ]
^G Get Help    ^O WriteOut    ^R Read File    ^Y Prev Page    ^K Cut Text      ^C Cur Pos
^X Exit        ^J Justify     ^W Where Is     ^V Next Page    ^U UnCut Text    ^T To Spell

將以下行新增到上述檔案,如下所示:

deb http://download.webmin.com/download/repository sarge contrib

執行上述操作後,需要在儲存庫簽名後獲取 GPG 金鑰。要獲取 GPG 金鑰,請使用以下命令:

# wget -q http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -

輸出應如下所示:

OK

新增 GPG 金鑰後,需要更新 source.list,如下面的命令所示:

# sudo apt-get update

要使用以下命令安裝 Webmin:

$ sudo apt-get install webmin

示例輸出應如下所示:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
   libcgmanager0:i386 libdrm2:i386 libhdb9-heimdal libkdc2-heimdal libntdb1
   libpng12-0:i386 libudev1:i386 python-ntdb
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
   apt-show-versions libauthen-pam-perl
The following NEW packages will be installed:
   apt-show-versions libauthen-pam-perl webmin
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Need to get 28.2 MB of archives.
After this operation, 157 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ubuntu.excellmedia.net/archive/ trusty/universe libauthen-pam-perl amd64 0.16-2build3 [27.8 kB]
Get:2 http://ubuntu.excellmedia.net/archive/ trusty/universe apt-show-versions all 0.22.3 [33.9 kB]
Get:3 http://download.webmin.com/download/repository/ sarge/contrib webmin all 1.791 [28.2 MB]
Fetched 28.2 MB in 52s (536 kB/s)
Selecting previously unselected package libauthen-pam-perl.
(Reading database ... 281828 files and directories currently installed.)
Preparing to unpack .../libauthen-pam-perl_0.16-2build3_amd64.deb ...
Unpacking libauthen-pam-perl (0.16-2build3) ...
Selecting previously unselected package apt-show-versions.
Preparing to unpack .../apt-show-versions_0.22.3_all.deb ...
..........................................................................

要開啟 Webmin,請開啟瀏覽器並輸入以下內容:

https://linux:10000/

示例輸出應如下所示:

使用 root 使用者名稱和密碼登入。之後,您將看到一個頁面,其中顯示了您的系統資訊,如下所示:

閱讀完本文後,您將能夠理解:如何在 Ubuntu 上安裝 Webmin。在我們的下一篇文章中,我們將推出更多基於 Linux 的技巧和提示。敬請關注!

更新於:2020年1月22日

231 次瀏覽

開啟您的 職業生涯

透過完成課程獲得認證

立即開始
廣告