运行自动化安装

若要安装 Plesk 而不需要用户任何输入,可运行以下命令:

plesk-installer <packages source options> --select-release-id <ID> <components installation options> [other options]

其中

修改默认安装路径(Windows)

在 Windows 上安装 Plesk 灵活性更强:能够让用户通过命令行修改默认的安装路径。由 --set-option key 授权的定制化。--set-option 的值应该为 "key=value",其中 key 是一个指定 Plesk 数据部分的常量,而该值是您希望能够找到这些数据的路径。目前有以下 key 可用:

此样本演示了如何使用 --set-option key:

plesk-installer.exe --select-product-id panel --select-release-id PANEL_12_0_18_WIN --install-component base --install-component management --install-component spamassassin --install-component webalizer --install-component drweb --set-option "PLESK_INSTALLDIR=C:\Plesk Dir" --set-option "PLESK_DATADIR=C:\Plesk Data" --set-option "PLESK_VHOSTSDIR=C:\Plesk Vhosts"

如,Linux/Unix

1.以下命令会从能够通过 HTTP 访问的服务器 mirror.example.com 上设置的镜像安装 Plesk 12 (版本 ID 是 PANEL_12_0_18)。安装文件暂时存储在 /tmp/panel,安装状态将会报告至 admin@example.com 邮件地址。安装的组件是基本的 Plesk 程序包、PostgreSQL 服务器和 SpamAssassin 垃圾邮件过滤器。

./plesk-installer --source http://mirror.example.com/ --target /tmp/panel --select-release-id PANEL_12_0_18 --install-component base --install-component postgresql --install-component spamassassin --notify-email admin@example.com

2.下面命令执行来自 Plesk 更新服务器上的 Plesk 12(版本号为PANEL_12_0_18)的完整安装(安装所有可用的产品组件)。所有安装程序输出会重定向到 XML 文件。

./plesk-installer --select-release-id PANEL_12_0_18 --install-everything --enable-xml-output

示例 Windows

1.以下命令会从能够通过 HTTP 访问的服务器 mirror.example.com 上设置的镜像安装 Plesk 12 (版本 ID 是 PANEL_12_0_18_WIN)。安装文件暂时存储在%SystemDrive%\Parallels\ 文件夹,安装状态将会报告至 admin@example.com 邮件地址。安装的组件是基本的 Plesk 程序包、Bind 域名服务器、MailEnable 邮件服务器、PHP 脚本引擎、 Presence Builder 和 Horde Webmail。

plesk-installer.exe --source http://mirror.example.com/ --target %SystemDrive%\Parallels --select-release-id PANEL_12_0_18_WIN --install-component base --install-component dns --install-component mailenable --install-component php5 --install-component sitebuilder --install-component webmail --notify-email admin@example.com

2.下面命令执行来自 Plesk 更新服务器上的 Plesk 12(版本号为PANEL_12_0_18_WIN)的完整安装(安装所有可用的产品组件)。所有安装程序输出会重定向到 XML 文件。

plesk-installer.exe --select-release-id PANEL_12_0_18_WIN --install-everything --enable-xml-output