在无人值守模式下安装 Plesk for Windows。
通过 RDP 登录到服务器。
-
下载 Plesk 安装程序 。
If you’re installing Plesk on a Server Core installation, you can download Plesk Installer by running the following command in PowerShell:
Invoke-WebRequest -URI https://installer-win.plesk.com/plesk-installer.exe -OutFile plesk-installer.exe
-
通过必要选项启动安装程序
要想实现不需要用户进行任何输入即可安装 Plesk,则需要在运行安装程序脚本时通过以下相应选项提供所有必要信息:
plesk-installer.exe <OPTIONS> <WINDOWS_OPTIONS>
备注
Although you can select a Plesk version for installation other than the latest Plesk Obsidian version, make sure that you have a good reason to do so. We strongly recommend installing the latest Plesk Obsidian version. Visit the Change Log for Plesk Obsidian page to learn which version of Plesk Obsidian is the latest at the moment.
以下安装程序选项是自动化安装 Plesk 时常用的选项。
选项 |
用法 |
详解 |
|---|---|---|
|
或
|
程序包来源选项定义安装程序应获取并安装 Plesk 程序包的位置。您可以使用 欲了解有关管理本地镜像 repositories 的信息,请参阅 镜像 Plesk Autoinstall 服务器 。 |
|
|
This option defines what Plesk version will be installed. <ID> is a unique Plesk version identifier (e.g. PANEL_18_0_75_WIN). 运行以下命令可查看公开发行版本的所有版本 ID: plesk-installer.exe --show-releases 运行以下命令可查看包括预览和测试版本在内的所有可用版本 ID: plesk-installer.exe --show-releases --skip-branch-filter |
|
|
选择安装预定义的一套组件:推荐、全部或自定义。 运行以下命令可查看可用的安装类型: plesk-installer.exe --select-release-id <ID> ^ --show-installation-types |
|
|
除了 运行以下命令可查看某个版本可安装的所有组件: plesk-installer.exe --select-release-id <ID> --show-components |
下面是 Microsoft Windows 特定安装程序的选项。这些选项允许修改默认的安装路径。
选项 |
用法 |
详解 |
|---|---|---|
|
|
该 key 指定随着时间微更改的 Plesk 数据部分。这包括应用程序代码、配置文件、工具等等。 |
|
|
该 key 指定随着时间大更改的 Plesk 数据部分。这包括客户数据库、APS 程序包、日志文件等等。 |
|
|
该 key 指定将保存您所有客户域名内容的路径。这通常是占 Plesk 内容最大的一部分。 |
若要查看安装程序的所有选项,请运行:
plesk-installer.exe --help
示例 1:从镜像安装 Plesk,安装指定的组件
The following command installs Plesk Obsidian 18.0.75 for Windows (release ID is
‘PANEL_18_0_75_WIN’) from a mirror set up on the server
‘mirror.example.com’ available via HTTP. Installation files will
temporarily be stored at the %SystemDrive%\Parallels\ folder, and the
installation status will be reported to the email admin@example.com.
The installed components are base Plesk packages, Microsoft DNS,
MailEnable mail server, and the PHP scripting engine.
plesk-installer.exe --source http://mirror.example.com/ ^
--target %SystemDrive%\Parallels ^
--select-release-id PANEL_18_0_75_WIN ^
--install-component base ^
--install-component dns ^
--install-component mailenable ^
--install-component php5 ^
--notify-email admin@example.com
(插入符号^将一个长命令分割成多行,使其更具可读性。)
示例 2:安装 Plesk、所有可用的组件
The following command performs the complete installation (all available
product components are installed) of Plesk Obsidian 18.0.75 for Windows (release ID is
PANEL_18_0_75_WIN) from the Plesk Update server. All installer output
will be redirected to an XML file.
plesk-installer.exe --select-release-id PANEL_18_0_75_WIN ^
--install-everything --enable-xml-output
示例 3:安装 Plesk 到一个自定义地址
plesk-installer.exe --select-product-id panel ^
--select-release-id PANEL_18_0_75_WIN ^
--install-everything ^
--set-option "PLESK_INSTALLDIR=C:\Plesk Dir" ^
--set-option "PLESK_DATADIR=C:\Plesk Data" ^
--set-option "PLESK_VHOSTSDIR=C:\Plesk Vhosts"
(插入符号^将一个长命令分割成多行,使其更具可读性。)