linux的webmin怎么在win打开,还在用Linux命令行?Windows 10 Ubuntu子系统图形管理工具Webmin来了!...

我的玩转WSL系列文章(更新中)

Webmin是什么

今天折腾的主题是:给WSL安装图形管理工具Webmin。

Webmin是目前功能最强大的基于Web的Unix系统管理工具。管理员通过浏览器访问Webmin的各种管理功能并完成相应的管理动作。目前Webmin支持绝大多数的Unix系统,这些系统除了各种版本的linux以外还包括:AIX、HPUX、Solaris、Unixware、Irix和FreeBSD等。

Webmin 让您能够在远程使用支持 HTTPS (SSL 上的 HTTP)协议的 Web 浏览器通过 Web 界面管理您的主机。这在保证了安全性的前提下提供了简单深入的远程管理。这使得 Webmin 对系统管理员非常理想,因为所有主流平台都有满足甚至超出上述需求的 Web 浏览器。而且,Webmin 有其自己的“Web 服务器”,因此不需要运行第三方软件(比如 Web服务器)。万事具备。Webmin 的模块化架构允许您在需要时编写您自己的配置模块。除了在此介绍的模块之外,Webmin 还包括许多模块。尽管目前我们将主要关注网络服务,但是您会看到,几乎您系统的每一部分都能够通过 Webmin 来配置和管理。

(以上介绍文字来自:https://www.wdlinux.cn/old/webmin)

安装Webmin

重要的事说三遍:不要安装官网的deb安装包!不要安装官网的deb安装包!不要安装官网的deb安装包!

我在apt安装webmin_1.920_all.deb时,卡在uppacking这一环节,完全没有反应,强行终止安装的后果很严重,修复安装取消安装等各种手段都用了,不管用,apt功能彻底废了,无法安装新程序。没办法,只有重置系统。好在WSL的备份重置非常简单,稍后会有一篇文章单独来讲。

不用apt怎么办,很简单,直接下载官网的tar文件,解压,执行安装脚本即可:

# 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]: 回车

Log file directory [/var/webmin]: 回车

***********************************************************************

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): 回车

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): 回车

Login name (default admin): 回车

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.

安装过程中要回答几个问题,上面都做了标记,需要注意Use SSL一定要选“Y”,否则无法用远程电脑登陆Webmin。安装很快结束,系统里多了两个文件夹,/usr/local/webmin和/etc/webmin。做两个启动停止服务的快捷命令:

# cd ~

# vi ~/.bash_aliases

追加两行

alias startwebmin='sudo /etc/webmin/restart'

alias stopwebmin='sudo /etc/webmin/stop'

保存退出

# source .bashrc

startwebmin

安装完毕,webmin服务已启动。

测试Webmin

在另外一台电脑上打开浏览器,地址栏输入https://服务器IP:10000,出现下面登陆画面:

63a38da17fa0?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

Webmin登陆

用刚才安装时设定的密码登陆,进入首页,显示系统信息:

63a38da17fa0?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

系统信息

界面是英文的,在Webmin->Change Language and Theme里改成中文,保存,刷新,效果是酱紫的:

63a38da17fa0?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

中文界面

Webmin功能强大,几乎你能想到的Linux功能管理都可以在这里找到,比如进程管理:

63a38da17fa0?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

进程管理

再比如SSH服务配置

63a38da17fa0?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

ssh config

还有用户管理,启动管理,硬件管理等等等等。非常适合不喜欢命令行的Linux小白,比如我。

Webmin本身的配置就非常强大:

63a38da17fa0?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

Webmin Configuration

在IP访问控制里,加入远程电脑的网卡Mac地址,可以限定可使用Webmin的电脑,保证了安全性,有兴趣可以试一下。

卸载Webmin

如果体验过后新鲜劲儿过了,想卸载,也非常简单,一个命令即可:

# cd /etc/webmin

# ./uninstall.sh

好了,今天的折腾到此结束!欢迎继续关注小牛的《玩转WSL系列》文集!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值