Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
最新のPowerShell on Linux OMI Providerをインストールするサンプル(CentOS7)
#
# 最新のPowerShell on Linux OMI Providerをインストールするサンプル
# ソースから最新のPowerShell on Linux OMI Providerをビルド、続けてRPMファイルを作成してインストールしている
#
# CentOS 7.2(1511)で動作確認ずみ
#
# Install Powershell on Linux
sudo yum install -y https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.10/powershell-6.0.0_alpha.10-1.el7.centos.x86_64.rpm
# Install OMI
sudo yum install -y https://github.com/Microsoft/omi/releases/download/v1.1.0-0/omi-1.1.0.ssl_100.x64.rpm
# Build latest psrp-omi-provider
sudo yum install -y cmake make gcc gcc-c++ git
sudo yum install -y pam-devel openssl-devel
#
mkdir /tmp/omi
cd /tmp/omi/
git clone --recursive https://github.com/PowerShell/psl-omi-provider.git
cd psl-omi-provider/
./build.sh
# Install installBuilder(pal)
sudo yum install -y rpm-devel rpm-build
cd /tmp/omi/
git clone https://github.com/Microsoft/pal.git
cd pal/build/
# Make config.mak
./configure
# Build rpm package
cd ../../psl-omi-provider/installbuilder/
make
# Install rpm package
cd ../omi/Unix/output/release/
sudo rpm -i ./psrp-1.0.0-0.universal.x64.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment