Saturday, April 27, 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.