Skip to main content

模块安装

安装 HostMyServers WHMCS 模块非常简单:只需将 ZIP 压缩包解压到 WHMCS 安装目录的相应位置即可。无需安装脚本、无需修改数据库、无需配置 SOAP 依赖。

下载模块

直接下载模块最新版本:

hostmyservers-v1.0.1.zip

解压模块

将压缩包内容直接解压到 WHMCS 安装目录的 modules/registrars/ 文件夹中。

通过命令行(推荐)

在 WHMCS 安装根目录执行:

unzip hostmyservers-v1.0.1.zip -d ./modules/registrars/

解压后应获得以下目录结构:

modules/
└── registrars/
└── hostmyservers/
├── hostmyservers.php
├── whmcs.json
├── logo.png
└── lang/
├── french.php
├── english.php
├── german.php
├── italian.php
├── polish.php
├── russian.php
└── spanish.php

通过 FTP/SFTP 客户端

如果没有命令行访问权限,可以:

  1. 在本地电脑上解压压缩包
  2. 通过 FTP 客户端(FileZilla、WinSCP 等)将 hostmyservers/ 文件夹(及其所有内容)上传到服务器的 modules/registrars/ 目录
上传文件夹而非压缩包

不要直接将 .zip 文件上传到服务器,必须上传解压后的 hostmyservers/ 文件夹及其所有文件。

检查权限

模块文件必须能被 Web 服务器的 PHP 进程读取。检查权限:

# 推荐权限:文件 644,文件夹 755
find ./modules/registrars/hostmyservers -type f -exec chmod 644 {} \;
find ./modules/registrars/hostmyservers -type d -exec chmod 755 {} \;

验证安装

文件就位后,登录 WHMCS 管理界面并导航至:

设置系统注册商模块

HostMyServers 模块应出现在可用注册商列表中。如果未出现:

  • 检查文件夹名称是否准确为 hostmyservers(全小写,无连字符)
  • 检查 hostmyservers.phpwhmcs.json 是否存在于文件夹根目录
  • 检查文件权限
  • 通过 工具清除模板缓存 清除 WHMCS 缓存

下一步是配置注册商模块