Wednesday, April 17, 2024

FreeBSD安装Webmin教程

Internet应用是FreeBSD使用最广的领域之一,因为Internet的前身APPRNET的开发者,正是使用BSD Unix来实现的TCP/IP协议。因此FreeBSD具有最成熟、最稳定的TCP/IP实现,非常适合用作FTP服务器、WWW服务器、电子邮件服务器、域名服务器、USENET新闻服务器以及电子公告牌系统等网络服务器系统,此外,FreeBSD也能将廉价的个人计算机改变为软件路由器、防火墙设备。

用做网络服务器最重要的要求是稳定性,因此一般要安装FreeBSD的stable分支。FreeBSD stable分支在实际使用中已经证明了它具备非凡的稳定性,在网络上关于操作系统崩溃的调查中,对FreeBSD崩溃次数的报道却很少,因此被称为”Rock-stable performance”(坚如磬石)。考虑到大部分个人计算机硬件的稳定性比专用的Unix网络服务器硬件的稳定性要差,就可以看出FreeBSD操作系统的稳定性是如何优秀了。

本文讲述如何在FreeBSD系统中安装Webmin,教程如下:

一、升级ports

#portsnap fetch update

二、执行Webmin命令

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

三、配置Webmin服务

# vi /etc/rc.conf

把下面的内容添加到rc.conf文件中

webmin_enable=”YES”

保存并关闭文件。

或者运行

#echo "webmin_enable="YES"" >> /etc/rc.conf

效果与上面的方法一样。

四、安装并设置Webmin

# cd /usr/local/lib/webmin/
# ./setup.sh

在屏幕上会出现下面内容:

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

*            Welcome to the Webmin setup script, version 1.570        *

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

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]: (默认设置直接按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): (默认设置直接按Enter回车键即可)

Testing Perl …

Perl seems to be installed ok

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

Operating system name:    FreeBSD

Operating system version: 8.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): (默认设置直接按Enter回车键即可)

Login name (default admin): (默认设置直接按Enter回车键即可)

Login password: (输入密码)

Password again: (再次输入密码)

Use SSL (y/n):  (是否使用SSL方式登录Webmin,输入y或者n)

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

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 ..

PID file /var/log/webmin/miniserv.pid does not exist

: Permission denied

syslog-ng: not found

: Permission denied

..done

Enabling background status collection ..

PID file /var/log/webmin/miniserv.pid does not exist

..done

五、启动Webmin服务

# /usr/local/etc.rc.d/webmin start

六、打开浏览器,输入

https://服务器IP地址:10000

出现Webmin登录界面。

至此,成功安装Webmin。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.