v8.01 (build: May 23 2024) |
|
Установка на віддалені машини (Linux)Інсталяційний пакет необхідно завантажити звідси.
Можна встановити пакет на віддалений комп'ютер через OpenSSH.
На віддаленому комп'ютері попередньо має бути встановлений та настроєний OpenSSH-сервер.
Документацію про встановлення та налаштування OpenSSH можна знайти на сайті wiki.debian.org Установка .deb-пакета (Ubuntu, Linux Mint, Astra Linux): Приклад batch скрипта для Windows для встановлення deb пакетів на віддалений комп'ютер: rem Setup address and port of remote PC set HOST_IP=192.168.1.10 set HOST_PORT=22 rem Setup administrator's name for the remote PC set HOST_USERNAME=root rem Name of the deb-package in the current folder set PACKAGE_NAME=stkh-client_1.10_amd64.deb rem Setup complex server address set STKH_SERVER_ADDRESS=192.168.1.2 rem Copy package to the remote PC "C:\Program Files\PuTTY\pscp.exe" -scp -P "%HOST_PORT%" "%PACKAGE_NAME%" %HOST_USERNAME%@%HOST_IP%:/tmp rem Execute package installation "C:\Program Files\PuTTY\plink.exe" -ssh %HOST_USERNAME%@%HOST_IP% -P "%HOST_PORT%" "DEBIAN_FRONTEND=noninteractive dpkg --install /tmp/%PACKAGE_NAME%; apt-get update; DEBIAN_FRONTEND =noninteractive apt-get install -fy" rem Setup server address on the remote PC for the client "C:\Program Files\PuTTY\plink.exe" -ssh %HOST_USERNAME%@%HOST_IP% -P "%HOST_PORT%" "stkh-client --server=%STKH_SERVER_ADDRESS%" rem Delete package from the remote PC "C:\Program Files\PuTTY\plink.exe" -ssh %HOST_USERNAME%@%HOST_IP% -P "%HOST_PORT%" "rm /tmp/%PACKAGE_NAME%" Приклад bash скрипта для Linux для встановлення deb пакетів на віддалений комп'ютер: # Setup address and port of remote PC HOST_IP=192.168.1.10 HOST_PORT=22 # Setup administrator's name for the remote PC HOST_USERNAME=root # Name of the deb-package in the current folder PACKAGE_NAME=stkh-client_1.10_amd64.deb # Setup complex server address STKH_SERVER_ADDRESS=192.168.1.2 # Copy package to the remote PC scp -p "$HOST_PORT" "$PACKAGE_NAME" $HOST_USERNAME@$HOST_IP:/tmp # Execute package installation ssh -p "$HOST_PORT" $HOST_USERNAME@$HOST_IP "DEBIAN_FRONTEND=noninteractive dpkg --install /tmp/$PACKAGE_NAME; apt-get update; DEBIAN_FRONTEND=noninteractive apt-get install -fy" # Setup server address on the remote PC for the client ssh -p "$HOST_PORT" $HOST_USERNAME@$HOST_IP "stkh-client --server=$STKH_SERVER_ADDRESS" # Delete package from the remote PC ssh -p "$HOST_PORT" $HOST_USERNAME@$HOST_IP "rm /tmp/$PACKAGE_NAME" Установка .rpm-пакета (CentOS, РЕД ОС, Rosa Linux(*)): Приклад batch скрипта для Windows для встановлення rpm пакетів на віддалений комп'ютер: rem Setup address and port of remote PC set HOST_IP=192.168.1.10 set HOST_PORT=22 rem Setup administrator's name for the remote PC set HOST_USERNAME=root rem Name of the rpm-package in the current folder set PACKAGE_NAME=stkh-client-1.10-0.x86_64.rpm rem Setup complex server address set STKH_SERVER_ADDRESS=192.168.1.2 rem Copy package to the remote PC "C:\Program Files\PuTTY\pscp.exe" -scp -P "%HOST_PORT%" "%PACKAGE_NAME%" %HOST_USERNAME%@%HOST_IP%:/tmp rem Execute package installation "C:\Program Files\PuTTY\plink.exe" -ssh %HOST_USERNAME%@%HOST_IP% -P "%HOST_PORT%" "yum -y localinstall /tmp/%PACKAGE_NAME%" rem Setup server address on the remote PC for the client "C:\Program Files\PuTTY\plink.exe" -ssh %HOST_USERNAME%@%HOST_IP% -P "%HOST_PORT%" "stkh-client --server=%STKH_SERVER_ADDRESS%" rem Delete package from the remote PC "C:\Program Files\PuTTY\plink.exe" -ssh %HOST_USERNAME%@%HOST_IP% -P "%HOST_PORT%" "rm /tmp/%PACKAGE_NAME%" Приклад bash скрипта для Linux для встановлення rpm пакетів на віддалений комп'ютер: # Setup address and port of remote PC HOST_IP=192.168.1.10 HOST_PORT=22 # Setup administrator's name for the remote PC HOST_USERNAME=root # Name of the rpm-package in the current folder PACKAGE_NAME=stkh-client-1.10-0.x86_64.rpm # Setup complex server address STKH_SERVER_ADDRESS=192.168.1.2 # Copy package to the remote PC scp -p "$HOST_PORT" "$PACKAGE_NAME" $HOST_USERNAME@$HOST_IP:/tmp # Execute package installation ssh -p "$HOST_PORT" $HOST_USERNAME@$HOST_IP "yum-y localinstall /tmp/$PACKAGE_NAME" # Setup server address on the remote PC for the client ssh -p "$HOST_PORT" $HOST_USERNAME@$HOST_IP "stkh-client --server=$STKH_SERVER_ADDRESS" # Delete package from the remote PC ssh -p "$HOST_PORT" $HOST_USERNAME@$HOST_IP "rm /tmp/$PACKAGE_NAME"(*) Для Rosa Linux замість yum -y localinstall використовувати urpmi |
|
© Mirobase |