Linuxのコマンドラインプロンプトで内容を確認する方法

Linuxのコマンドラインプロンプトで内容を確認する方法

私の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 Minerの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/N] 中断します。

「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:/#

次に、ComposerをインストールするためにSSHコマンドをOVHに渡すことができるかどうかを見てみましょう。

おすすめ記事