我的玩轉(zhuǎn)WSL系列文章(更新中)
- 超詳盡教程预烙!在Windows 10內(nèi)置Ubuntu子系統(tǒng)上搭建私有云
- (續(xù)):超詳盡教程正塌!在Windows 10內(nèi)置Ubuntu子系統(tǒng)上搭建私有云
- 繼續(xù)折騰当纱!給Windows 10內(nèi)置Ubuntu子系統(tǒng)安裝SSH服務(wù)
- 繼續(xù)探索呛每!怎樣遠(yuǎn)程使用Windows 10內(nèi)置Ubuntu子系統(tǒng)的桌面程序
- 和迅雷說(shuō)再見(jiàn)!手把手教你如何讓W(xué)indows 10 Ubuntu子系統(tǒng)秒變下載服務(wù)器
- 突破16線(xiàn)程限制坡氯!讓Ubuntu WSL下載服務(wù)器再提速晨横!
Webmin是什么
今天折騰的主題是:給WSL安裝圖形管理工具Webmin。
Webmin是目前功能最強(qiáng)大的基于Web的Unix系統(tǒng)管理工具箫柳。管理員通過(guò)瀏覽器訪(fǎng)問(wèn)Webmin的各種管理功能并完成相應(yīng)的管理動(dòng)作手形。目前Webmin支持絕大多數(shù)的Unix系統(tǒng),這些系統(tǒng)除了各種版本的linux以外還包括:AIX悯恍、HPUX库糠、Solaris、Unixware涮毫、Irix和FreeBSD等瞬欧。
Webmin 讓您能夠在遠(yuǎn)程使用支持 HTTPS (SSL 上的 HTTP)協(xié)議的 Web 瀏覽器通過(guò) Web 界面管理您的主機(jī)。這在保證了安全性的前提下提供了簡(jiǎn)單深入的遠(yuǎn)程管理罢防。這使得 Webmin 對(duì)系統(tǒng)管理員非常理想艘虎,因?yàn)樗兄髁髌脚_(tái)都有滿(mǎn)足甚至超出上述需求的 Web 瀏覽器。而且咒吐,Webmin 有其自己的“Web 服務(wù)器”野建,因此不需要運(yùn)行第三方軟件(比如 Web服務(wù)器)属划。萬(wàn)事具備。Webmin 的模塊化架構(gòu)允許您在需要時(shí)編寫(xiě)您自己的配置模塊贬墩。除了在此介紹的模塊之外榴嗅,Webmin 還包括許多模塊。盡管目前我們將主要關(guān)注網(wǎng)絡(luò)服務(wù)陶舞,但是您會(huì)看到嗽测,幾乎您系統(tǒng)的每一部分都能夠通過(guò) Webmin 來(lái)配置和管理。
(以上介紹文字來(lái)自:https://www.wdlinux.cn/old/webmin)
安裝Webmin
重要的事說(shuō)三遍:不要安裝官網(wǎng)的deb安裝包肿孵!不要安裝官網(wǎng)的deb安裝包唠粥!不要安裝官網(wǎng)的deb安裝包!
我在apt安裝webmin_1.920_all.deb時(shí)停做,卡在uppacking這一環(huán)節(jié)晤愧,完全沒(méi)有反應(yīng),強(qiáng)行終止安裝的后果很?chē)?yán)重蛉腌,修復(fù)安裝取消安裝等各種手段都用了官份,不管用,apt功能徹底廢了烙丛,無(wú)法安裝新程序舅巷。沒(méi)辦法,只有重置系統(tǒng)河咽。好在WSL的備份重置非常簡(jiǎn)單钠右,稍后會(huì)有一篇文章單獨(dú)來(lái)講。
不用apt怎么辦忘蟹,很簡(jiǎn)單飒房,直接下載官網(wǎng)的tar文件,解壓媚值,執(zhí)行安裝腳本即可:
# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.920.tar.gz
# gunzip webmin-1.920.tar.gz
# tar xf webmin-1.920.tar
# cd webmin-1.920
# ./setup.sh /usr/local/webmin
***********************************************************************
* Welcome to the Webmin setup script, version 1.920 *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin from /home/niuyoucai/webmin-1.920 to /usr/local/webmin ...
***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Config file directory [/etc/webmin]: 回車(chē)
Log file directory [/var/webmin]: 回車(chē)
***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl): 回車(chē)
Testing Perl ...
Perl seems to be installed ok
***********************************************************************
Operating system name: Ubuntu Linux
Operating system version: 18.04.2
***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
- What port to run the web server on. There must not be another
web server already using this port.
- The login name required to access the web server.
- The password required to access the web server.
- If the webserver should use SSL (if your system supports it).
- Whether to start webmin at boot time.
Web server port (default 10000): 回車(chē)
Login name (default admin): 回車(chē)
Login password: 密碼
Password again: 再次輸入密碼
Use SSL (y/n): y
Webmin does not support being started at boot time on your system.
***********************************************************************
Copying files to /usr/local/webmin ..
..done
Creating web server config files..
..done
Creating access control file..
..done
Inserting path to perl into scripts..
..done
Creating start and stop scripts..
..done
Copying config files..
..done
Creating uninstall script /etc/webmin/uninstall.sh ..
..done
Changing ownership and permissions ..
..done
Running postinstall scripts ..
..done
Enabling background status collection ..
..done
Attempting to start Webmin mini web server..
Starting Webmin server in /usr/local/webmin
..done
***********************************************************************
Webmin has been installed and started successfully. Use your web
browser to go to
http://Tongfang-V42F:10000/
and login with the name and password you entered previously.
安裝過(guò)程中要回答幾個(gè)問(wèn)題狠毯,上面都做了標(biāo)記,需要注意Use SSL一定要選“Y”褥芒,否則無(wú)法用遠(yuǎn)程電腦登陸Webmin垃你。安裝很快結(jié)束,系統(tǒng)里多了兩個(gè)文件夾喂很,/usr/local/webmin和/etc/webmin。做兩個(gè)啟動(dòng)停止服務(wù)的快捷命令:
# cd ~
# vi ~/.bash_aliases
追加兩行
alias startwebmin='sudo /etc/webmin/restart'
alias stopwebmin='sudo /etc/webmin/stop'
保存退出
# source .bashrc
startwebmin
安裝完畢皆刺,webmin服務(wù)已啟動(dòng)少辣。
測(cè)試Webmin
在另外一臺(tái)電腦上打開(kāi)瀏覽器,地址欄輸入https://服務(wù)器IP:10000羡蛾,出現(xiàn)下面登陸畫(huà)面:
用剛才安裝時(shí)設(shè)定的密碼登陸漓帅,進(jìn)入首頁(yè),顯示系統(tǒng)信息:
界面是英文的,在Webmin->Change Language and Theme里改成中文忙干,保存器予,刷新,效果是醬紫的:
Webmin功能強(qiáng)大捐迫,幾乎你能想到的Linux功能管理都可以在這里找到乾翔,比如進(jìn)程管理:
再比如SSH服務(wù)配置
還有用戶(hù)管理,啟動(dòng)管理施戴,硬件管理等等等等反浓。非常適合不喜歡命令行的Linux小白,比如我赞哗。
Webmin本身的配置就非常強(qiáng)大:
在IP訪(fǎng)問(wèn)控制里雷则,加入遠(yuǎn)程電腦的網(wǎng)卡Mac地址,可以限定可使用Webmin的電腦肪笋,保證了安全性月劈,有興趣可以試一下。
卸載Webmin
如果體驗(yàn)過(guò)后新鮮勁兒過(guò)了藤乙,想卸載猜揪,也非常簡(jiǎn)單,一個(gè)命令即可:
# cd /etc/webmin
# ./uninstall.sh
好了湾盒,今天的折騰到此結(jié)束湿右!歡迎繼續(xù)關(guān)注小牛的《玩轉(zhuǎn)WSL系列》文集!