在無人值守模式下安裝 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"
(插入符號^將一個長命令分割成多行,使其更具可讀性。)