Tuesday, June 24, 2025

Tag Archives: Webmin

AlmaLinux、Rocky Linux、CentOS安裝多個PHP版本並使用Virtualmin為網站配置相應的PHP版本

在CentOS服務器中可以安裝多個PHP版本,Virtualmin/Webmin允許您給每個網站甚至每個目錄指定相應的PHP版本。

在AlmaLinux、Rocky Linux、CentOS中安裝

安裝Remi repository並清除緩存:

. /etc/os-release && dnf -y install https://rpms.remirepo.net/enterprise/remi-release-$(rpm -E %$ID).rpm && dnf clean all

安裝PHP packages:

dnf install php81-php-{cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip}

說明:根據自己實際需要,選擇php81或php74等版本。

在Virtualmin/Webmin中配置第二個PHP版本(適用於所有新虛擬服務器)

Read More »

Webmin/Virtualmin申請配置Let’s Encrypt免費SSL/TLS證書

Webmin/Virtualmin支持在一個IP地址多個網站的情況下為每個網站單獨配置SSL/TLS證書,而且新版的Webmin/Virtualmin可以非常簡單的給網站申請配置Let’s Encrypt免費SSL/TLS證書,教程如下:

申請Let’s Encrypt證書

登錄Webmin/Virtualmin,選擇想配置SSL/TLS證書的網站如domain.com。

點擊“編輯虛擬服務器”,在“已啟用功能”中勾選“SSL網站已啟用”,然後點擊下方的“保存虛擬服務器”。

點擊“服務器配置”,進入“管理SSL證書”,點擊“Let’s Encrypt”,然後點擊下方的“Request Certificate”。

Read More »

在Webmin中修改服務器時區和設置時間服務器同步

以root用戶登錄Webmin管理界面

點擊Webmin–>硬件–>系統時間

選擇Change timezone

再選擇Asia/Shanghai(Beijing Time)

保存即可。

然後再選擇Time server sync

在Timeserver hostnames or addresses輸入下列時間服務器之一:

time.nist.gov

0.pool.ntp.org
1.pool.ntp.org
2.pool.ntp.org
3.pool.ntp.org

asia.pool.ntp.org

time.windows.com

然後將Synchronize when Webmin starts?設置為“是”。

點擊Sync and Apply即可同步時間。

Read More »

Webmin安裝SSL/TLS證書後出現Internal server error

安裝SSL/TLS證書後,網站能以Https方式打開,但經常出現500 Internal server error,查看Webmin/Virtualmin面板的Apache錯誤日誌,發現有很多mod_fcgid: read data timeout in 31 seconds和End of script output before headers。

解決此問題的辦法:

Virtualmin ==> 服務 ==> PHP Configuration ==> Resource Limits

Maximum memory allocation	 128M    	Maximum HTTP POST size	 80M   
Maximum file upload size	 80M    	Maximum execution time	 600 seconds
Maximum input parsing time	 600 seconds		

Virtualmin ==> 服務器配置 ==> 網站選項

Read More »

安裝Webmin後提示your system is not ready for use by Virtualmin的解決方法

在某些服務器或VPS中安裝Webmin後,進入Webmin後台Checking Configuration時,會提示

The mailman queue processor /usr/lib/mailman/bin/qrunner is not running on your system. It can be started in the Bootup and Shutdown module.
.. your system is not ready for use by Virtualmin.

解決辦法:點擊Bootup and Shutdown的鏈接直接進入,或者從左側導航菜單中找到Webmin ==> System ==> Bootup and Shutdown,再從Service name列表中找到mailman,啟動即可。

這時再次Checking Configuration,會提示

your system is ready for use by Virtualmin.

已經可以正常使用Virtualmin/Webmin了。

Read More »

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

Read More »

使用Webmin/Virtualmin在兩台VPS之間遷移數據

本文講述如何使用Webmin/Virtualmin在兩台VPS之間完美遷移網站數據。

一、在兩台VPS上都安裝Webmin/Virtualmin。

二、新VPS ==> Virtualmin ==> Create Virtual Server

新虛擬服務器詳細信息,比如域名可以輸入ftpbackups,便於識別。記住FTP服務器IP地址、用戶名和密碼。

三、舊VPS ==> Virtualmin ==> 備份和恢復 ==> 備份虛擬服務器

虛擬服務器建議選擇所有虛擬服務器,也可以根據實際情況選擇。
目標位置和格式 ==> 備份目標位置,選擇FTP服務器,輸入FTP服務器的IP地址,服務器上的文件名如backups,用戶名和密碼。
備份格式選擇單個歸檔文件。
Backup level選擇Full (all files)。點擊立即備份。

Read More »

Webmin無法啟動proftpd

在CentOS 6 32bit系統的Xen VPS中安裝Webmin後,發現proftpd服務未啟動。

使用Putty輸入

service proftpd restart

屏幕提示

Shutting down proftpd: [FAILED]
Starting proftpd: [FAILED]

因為proftpd默認沒有開啟日誌的記錄,所以/var/log/proftpd/ 這個目錄下是空的,所以沒法查看錯誤日誌。
運行:

proftpd

屏幕提示

 - warning: unable to determine IP address of 'MyVPS'
 - error: no valid servers configured
 - Fatal: error processing configuration file '/etc/proftpd.conf'

根據錯誤提示,proftpd無法確定VPS的IP地址。

Read More »

Debian/Ubuntu安裝Virtualmin/Webmin教程

下面的所有操作是在Linode VPS主機Debian 6 on i386 or amd64操作系統中進行。

先升級Debian/Ubuntu系統

apt-get install php-bcmath
apt-get install make
apt-get install file
apt-get install patch
apt-get install wget
apt-get install perl
apt-get update
apt-get upgrade
apt-get install gcc

安裝Virtualmin/Webmin方法支持CentOS、Debian、Ubuntu系統

1、以root登錄SSH,下載install.sh腳本。

wget -c http://software.virtualmin.com/gpl/scripts/install.sh

2、執行腳本安裝Virtualmin/Webmin。

chmod +x install.sh
./install.sh

安裝成功後,你可以使用https://ip:10000或者https://你的域名:10000(注意是用https的),用戶名是root,密碼是SSH root用戶的密碼。

Read More »

在Webmin中為網站安裝PositiveSSL證書

本文講解如何在Webmin環境中為網站安裝Comodo PositiveSSL證書。

在網上搜索Webmin中安裝Comodo PositiveSSL的教程,目前只找到一篇信息較陳舊的文章,這裡修正完善一下。

首先創建網站,要選擇設置網站支持SSL和獨立IP

然後找 管理SSL證書

之後選擇 簽名請求 生成一個簽名

請記錄生成的信息,盡量記錄到本地文件中。

然後到SSL證書頒髮網站獲取證書。將剛才生成的CSR複製到裡面,也就是上面方框的部分。

Read More »