第 16.9 节 Webmin

安装 webmin

# pkg install webmin  

# cd /usr/ports/sysutils/webmin/ 
# make install clean

查看安装后配置:

root@ykla:/usr/ports/sysutils/webmin # pkg info -D webmin
webmin-2.013:
On install:
After installing Webmin for the first time you should perform the following
steps as root:

* Configure Webmin by running /usr/local/lib/webmin/setup.sh

* Add webmin_enable="YES" to your /etc/rc.conf

* Start Webmin for the first time by running "service webmin start"

The parameters requested by setup.sh may then be changed from within Webmin
itself.

配置

配置向导

启动 webmin 安装向导,SSL 需要配置开启。

root@ykla:/usr/ports/sysutils/webmin # /usr/local/lib/webmin/setup.sh 
***********************************************************************
        Welcome to the Webmin setup script, version 2.013
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.

Installing Webmin in /usr/local/lib/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 [/usr/local/etc/webmin]: # 配置文件路径
Log file directory [/var/db/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/local/bin/perl): # perl 位置

Testing Perl ..
.. done

***********************************************************************
Operating system name:    FreeBSD
Operating system version: 14.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 web server should use SSL (if your system supports it).
 - Whether to start webmin at boot time.

Web server port (default 10000): # web 端口号
Login name (default admin): # 用户名,直接回车则为 admin
Login password: # 输入密码,密码无回显也不会是 ****,就是什么也没有,下同
Password again: # 再次输入密码
Use SSL (y/n): y # 使用 https

***********************************************************************
Creating web server config files ..
.. done

Creating access control file ..
.. done

Creating start and stop init scripts ..
.. done

Creating start and stop init symlinks to scripts ..
.. done

Copying config files ..
.. done

Changing ownership and permissions ..
.. done

Running postinstall scripts ..
.. done

Enabling background status collection ..
.. done

服务项

# sysrc webmin_enable="YES"
# service webmin start

切换中文

Webmin -> Change Language and Theme,在 Change Language and ThemeWebmin UI language 字段中,先选择 Personal choice 再选择 Simplified Chinese(ZH_CN.UTF8) 点击 Make Changes按钮,然后点击菜单 ->Dashboard 控制台会刷新为中文界面。

为了方便使用,可勾选旁边的“包括机器翻译 ”。

使用

下面打开浏览器输入 https://localhost:10000(本机浏览,且配置文件勾选使用了 SSL),若其他机器浏览,可输入 ip 如 https://192.168.123.157:10000

回车后如浏览器提示不安全,选择“继续前往”即可,之后会出现 Webmin 登录界面。

这是管理控制台。在文本框中输入 admin 和密码,点击 Sign In,登录进入控制台。

最后更新于

这有帮助吗?