安裝腳本樣本 (Linux)

本章闡述如何實施和執行安裝腳本,也提供安裝腳本範例。

實施與執行注意事項
示例

該腳本會在指定的伺服器上執行 Plesk 最新版本典型的安裝。

#!/bin/sh

SERVERS_LIST="node1.example.com node2.example.com"

for current_server in $SERVERS_LIST; do
ssh -f root@$current_server 'wget https://installer.plesk.com/plesk-installer -O - | sh /dev/stdin --source https://installer.plesk.com/ --target /tmp/plesk-installation --select-product-id plesk --select-release-latest --installation-type "Typical" --notify-email admin@example.com'
完成