为了在我的 OVH Web 托管服务上安装 Composer,我需要传递一些 SSH 命令。
为了通过它们,OVH 希望我使用命令安装一些 CLI(指南这里)
要使用基于证书的身份验证进行连接,请安装 Web PaaS CLI。
PaaS CLI 据说是使用此命令安装的。
客观的
CLI 是直接从终端使用和管理 Web PaaS 项目的官方工具。您可以在管理控制台中执行的任何操作都可以使用 CLI 完成。
它在幕后使用 Git 界面和我们的 REST API。 CLI 的源代码托管在GitHub。
安装
您可以使用此命令轻松安装 CLI
curl -fsS https: //eu.cli.webpaas.ovhcloud.com/installer | php
您可以在以下位置找到系统要求和更多信息GitHub 上的安装说明。
该命令在 Windows 终端上不起作用。
}
return $selected;
}
}
curl: (6) Could not resolve host: php.exe
C:\Users\Alex>curl -sfS https://eu.cli.webpaas.ovhcloud.com/installer | apt install php7.2-cli
'apt' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Alex>ssh Alex@Alex-PC
ssh: connect to host Alex-PC port 22: Connection refused
所以我从我的 Hive OS 矿机的 Linux 提示符下进行了尝试。尝试从我的矿机上执行安装命令:
root@Dual_RTX_3090:/# curl -sfS https://eu.cli.webpaas.ovhcloud.com/installer | php
Command ‘php’ not found, but can be installed with:
apt install php7.2-cli
apt install hhvm
curl: (23) Failed writing body (539 != 5935)
root@Dual_RTX 3090: /# curl -sfS https://eu.cli.webpaas.ovhcloud.com/installer | apt install php7.2-cli
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libsodium23 php-common php7.2-common php7.2-json php7.2-opcache php7.2-readline
suggested packages :
php-pear
The following NEW packages will be installed:
libsodium23 php-common php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-readline
0 upgraded, 7 newly installed, 0 to remove and 17 not upgraded.
Need to get 2647 kB of archives.
After this operation, 12.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
root@Dual_RTX_3090:/# Y
Y: command not found
root@Dual_RTX_3090:/#
所以我粘贴了
curl -sfS https://eu.cli.webpaas.ovhcloud.com/installer | php
在命令提示符下,我得到了
命令“php”不是空的,但可以安装...
所以我然后尝试了
curl -sfS https://eu.cli.webpaas.ovhcloud.com/installer | apt install php7.2-cli
从那里,它要求我确认。
你想继续吗? [是/否] 中止。
我尝试输入“Y”并输入,但没有成功。
此时您如何确认这一点?
答案1
使用apt install php7.2-cli
然后curl
做了;谢谢zh征求他们的意见!
root@Dual_RTX_3090:/# curl -sfS https://eu.cli.webpaas.ovhcloud.com/installer | php
OVHcloud Web PaaS CLI installer
Environment check
[*] The "json" PHP extension is installed.
[*] The "phar" PHP extension is installed.
[*] Git is installed.
[*] The "openssl" PHP extension is installed.
[*] The "pcre" PHP extension is installed.
[*] One or both of the "mbstring" or "iconv" PHP extensions is installed.
[!] The "curl" PHP extension is strongly recommended.
[*] The "pcntl" and "posix" extensions are installed.
[*] The "allow_url_fopen" setting is on.
[*] The "apc.enable_cli" setting is off.
Download
Finding the latest version... done
Downloading version 3.70.1... done
Checking file integrity... done
Checking that the file is a valid Phar... done
Install
Making the Phar executable... done
Moving the Phar to your home directory... done
Executable location: /home/user/.webpaas-cli/bin/webpaas
Running self:install command...
Copying resource files... done
Setting up autocompletion... done
Selected shell configuration file: ~/.bashrc
Do you want to update the file automatically? [Y/n] y
Configuration file updated successfully: ~/.bashrc
To use the OVHcloud Web PaaS CLI, run:
source ~/.bashrc # (make sure your shell does this by default)
webpaas
root@Dual_RTX_3090:/#
让我们看看我现在是否可以将 SSH 命令传递给 OVH 来安装该 Composer。