vSphereCLI Linux版のインストール方法

2014年12月15日

公式サイトからvSphere CLI (vCLI)のLINUX版をダウンロードします。
※要ユーザ登録

VMware vSphere CLI 5.5.0U2
64bitOSの場合はコチラをダウンロード
VMware vSphere CLI (vCLI) – 64-bit Linux Installer

32bitOSの場合はコチラをダウンロード
VMware vSphere CLI (vCLI) – 32-bit Linux Installer

手順

ダウンロード完了後、ftp等でサーバにアップロードする。

VMware-vSphere-CLI-5.5.0-2043780.x86_64.tar.gz

 

解凍する

# tar zxf VMware-vSphere-CLI-5.5.0-2043780.x86_64.tar.gz

 

解凍後にできたvmware-vsphere-cli-distrib というディレクトリに移動する

# cd vmware-vsphere-cli-distrib/

 

ファイルを確認する

# ls
FILES Makefile.PL apps bin doc etc lib man resources vmware-install.pl

 

vmware-install.pl を実行してインストールする
※動作させるためにいろいろとパッケージが必要だが、インストール中に足りないパッケージについて説明が出るので、まずは実行し、足りないパッケージを入れてから、再度実行する流れで行う。

# ./vmware-install.pl

 

EndUser License Agreementに同意する必要があるといわれるので、Enterを押して読む。

You must read and accept the vSphere CLI End User License Agreement to continue.
Press enter to display it.

 

同意するか聞かれるのでyesと打つ

Do you accept? (yes/no) yes

 

RHEL用のPerlモジュールがあるけど使う?と聞かれるのでyesと打つかEnterを押す

※CPANから落として自分で入れる場合はno
This vSphere CLI installer includes precompiled Perl modules for RHEL.
Answering yes will install the precompiled modules, and answering no will
install from CPAN.
Do you want to install precompiled Perl modules for RHEL?
[yes]

 

足りないパッケージがあると言われる。
※ここは環境によって違うはず。

Openssl-devel is not installed on the system.
openssl-devel 0.9.7 is required for encrypted connections.
Please install openssl-devel version 0.9.7 or greater.

 

openssl-develが足りないと言われた場合は、以下のパッケージを入れる。
※依存関係で沢山必要

  • openssl-devel-1.0.1e-15.el6.x86_64.rpm
  • krb5-devel-1.10.3-10.el6_4.6.x86_64.rpm
  • zlib-devel-1.2.3-29.el6.x86_64.rpm
  • keyutils-libs-devel-1.4-4.el6.x86_64.rpm
  • libcom_err-devel-1.41.12-18.el6.x86_64.rpm
  • libselinux-devel-2.0.94-5.3.el6_4.1.x86_64.rpm
  • libsepol-devel-2.0.41-4.el6.x86_64.rpm

 

# rpm -ivh openssl-devel-1.0.1e-15.el6.x86_64.rpm krb5-devel-1.10.3-10.el6_4.6.x86_64.rpm zlib-devel-1.2.3-29.el6.x86_64.rpm keyutils-libs-devel-1.4-4.el6.x86_64.rpm libcom_err-devel-1.41.12-18.el6.x86_64.rpm libselinux-devel-2.0.94-5.3.el6_4.1.x86_64.rpm libsepol-devel-2.0.41-4.el6.x86_64.rpm
準備中… ########################################### [100%]
1:libsepol-devel ########################################### [ 14%]
2:libselinux-devel ########################################### [ 29%]
3:libcom_err-devel ########################################### [ 43%]
4:keyutils-libs-devel ########################################### [ 57%]
5:krb5-devel ########################################### [ 71%]
6:zlib-devel ########################################### [ 86%]
7:openssl-devel ########################################### [100%]

 

不足パッケージを入れたので、再度インストーラを実行

# ./vmware-install.pl

 

EndUser License Agreementに同意する必要があるといわれるので、Enterを押して読む。

You must read and accept the vSphere CLI End User License Agreement to continue.
Press enter to display it.

 

同意するか聞かれるのでyesと打つ

Do you accept? (yes/no) yes

 

RHEL用のPerlモジュールがあるけど使う?と聞かれるのでyesと打つ

This vSphere CLI installer includes precompiled Perl modules for RHEL.
Answering yes will install the precompiled modules, and answering no will
install from CPAN.
Do you want to install precompiled Perl modules for RHEL?
[yes]

 

/usr/binにインストールしていい?と聞かれるのでEnterを押す

In which directory do you want to install the executable files?
[/usr/bin]

 

アンインストールするときは/usr/bin/vmware-uninstall-vSphere-CLI.pl を実行してね と言われる。

The installation of vSphere CLI 5.5.0 build-1549297 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command:
“/usr/bin/vmware-uninstall-vSphere-CLI.pl".

 

動作させるためには一定のバージョン以上のPerlモジュールが必要だといわれるが、最初の選択しでyesを選んでいれば自動で入っているので大丈夫。

The following Perl modules were found on the system but may be too old to work
with vSphere CLI:

 

Compress::Zlib 2.037 or newer
Compress::Raw::Zlib 2.037 or newer
version 0.78 or newer
IO::Compress::Base 2.037 or newer
IO::Compress::Zlib::Constants 2.037 or newer
LWP::Protocol::https 5.805 or newer

 

Enjoy と言われれば完了。

Enjoy,
–the VMware team

 

pathが通っているので、コマンドが使えるようになる。

# vicfg-[タブ]
vicfg-advcfg vicfg-ipsec vicfg-nics vicfg-syslog
vicfg-authconfig vicfg-iscsi vicfg-ntp vicfg-user
vicfg-cfgbackup vicfg-module vicfg-rescan vicfg-vmknic
vicfg-dns vicfg-mpath vicfg-route vicfg-volume
vicfg-dumppart vicfg-mpath35 vicfg-scsidevs vicfg-vswitch
vicfg-hostops vicfg-nas vicfg-snmp

以上