運行自動化安裝

若要安裝 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