Tuesday, April 22, 2025

Tag Archives: Virtualmin

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 »