FreeBSD安装和配置Webmin基于Web的界面(控制面板)
时间:2020-01-09 10:38:35 来源:igfitidea点击:
问题描述:如何为FreeBSD服务器安装webmin控制面板?
解决方法:Webmin是一个基于Web的界面,用于包括FreeBSD在内的Unix系统管理。
使用任何支持表格和表单的浏览器,您可以设置用户帐户,Apache,DNS,文件共享,防火墙等。
Webmin由一个简单的Web服务器和许多CGI程序组成,这些程序直接更新系统文件,例如/etc/inetd.conf和/etc/master.passwd。
安装webmin
要安装webmin,请更新您的端口,执行:
# portsnap fetch update
从/usr/ports/sysutils/webmin安装webmin,执行:
# cd /usr/ports/sysutils/webmin # make install clean
配置Webmin
现在,已安装webmin。
在启动时启动webmin,执行:
# vi /etc/rc.conf
追加以下行:
webmin_enable="YES"
保存并关闭文件。
您需要运行/usr/local/lib/webmin/setup.sh脚本以设置各种配置文件,执行:
# /usr/local/lib/webmin/setup.sh
输出示例:
*********************************************************************** * Welcome to the Webmin setup script, version 1.420 * *********************************************************************** 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. Log file directory [/var/log/webmin]: [Press Enter] *********************************************************************** 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): [Press Enter] Testing Perl ... Perl seems to be installed ok *********************************************************************** Operating system name: FreeBSD Operating system version: 7.0 *********************************************************************** 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): [Press Enter] Login name (default admin): [Press Enter] Login password: [type password] Password again: Use SSL (y/n): y *********************************************************************** Creating web server config files.. ..done Creating access control file.. ..done Creating start and stop scripts.. ..done Copying config files.. ..done Changing ownership and permissions .. ..done Running postinstall scripts .. ..done
如何查看webmin?
打开浏览器并输入网址:
https://your-domain.com:10000/
或者
https://your-server-ip:10000/