Quantcast
Channel: scxagentubuntu10 Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2

New Post: Corrections to the documentation

$
0
0

The documentation is buggy. If anyone else is looking to build a Ubuntu SCOM agent here are updated steps that work reliably

#Get latest open pegasus from here (I used V. 2.11.1)
#http://www.openpegasus.org/page.tpl?CALLER=page.tpl&ggid=392

#On a VM that matches the version and architecture of Ubuntu decompress this file.
tar xzf  pegasus-*.tar.gz

#get the xplat providers from here
#https://scx.codeplex.com/releases/view/37254
#decompress the archive
tar xzf xplatproviders-1.0.0.tar.gz

#get a patch for the xplat providers from here. This patch "debianizes" the various scripts"
#https://scxagentdebian56.codeplex.com/releases/view/58632#DownloadId=194105

#apply the patch
cd xplatproviders-1.0.0
patch -p1 < ../xplatproviders-1.0.0.patch
#your output should look like this
tim@UnixDev2:~/xplatproviders-1.0.0$ patch -p1 < ../xplatproviders-1.0.0.patch
patching file build/Makefile.gcc3
patching file build/Makefile.pf.Linux
patching file build/xplatproviders/config.guess
patching file build/xplatproviders/GNUmakefile.in
patching file configure
patching file source/code/common_lib/pal/system/disk/staticphysicaldiskinstance.cpp
patching file source/code/common_lib/pal/system/os/osinstance.cpp
patching file source/code/include/scxcorelib/scxcmn.h
patching file source/code/providers/meta_provider/metaprovider.cpp

#run the configure script.
#Replace /home/tim/pegasus/src/Pegasus/Provider/CMPI/ with th epatch to where you decompressed open pegasus
/configure --with-cmpi-headers=/home/YOUR_USERNAME/pegasus/src/Pegasus/Provider/CMPI/
#your output should look something like this
tim@UnixDev2:~/xplatproviders-1.0.0$ ./configure --with-cmpi-headers=/home/tim/pegasus/src/Pegasus/Provider/CMPI/
Created options.mak
Created ./source/code/include/scxcorelib/options.h
Created GNUmakefile
Configured for <DiscoveredOS><Hostname>UnixDev2</Hostname><OSName>Ubuntu</OSName><OSAlias>Ubuntu</OSAlias><Version>8.04.2</Version><Arch>x86_64</Arch><IsLinux>true</IsLinux></DiscoveredOS>

#run make
make
#your output should end with the following line
XPlatProviders build is complete


#get the newest redhat agent RPM with the right architecture (ie intel 64 bit, intel 32 bit, etc)
#That can be found on the OpsMgr server's in the AgentManagement directory

#If you haven't already install alien to convert the RPM to a DEB
sudo apt-get -y install alien

#convert the Redhat rpm to a deb
cd ~
sudo alien -k scx-1.0.4-265.rhel.5.x64.rpm --scripts

#make a directory named after the deb file you created omitting the trailing .deb
#for example scx_1.0.4-265_amd64.deb becomes scx_1.0.4-265_amd64
mkdir scx_1.0.4-265_amd64


#set up the directory putting files in their right places
cd scx_1.0.4-265_amd64/
mkdir -p debian/DEBIAN
ar -x ../`basename $PWD`.deb
mv control.tar.gz debian/DEBIAN/
mv data.tar.gz debian/
cd debian
tar -xvzf data.tar.gz
rm data.tar.gz
cd DEBIAN/
tar -xvzf control.tar.gz
rm control.tar.gz
cd ../..


#apply the scx patch found here. See below about how to handle the errors
#https://scxagentdebian56.codeplex.com/releases/view/58632#DownloadId=194105
#with this command
patch -p1 < ../scx_1.0.4-265_i386.patch
# it will return errors. Ones related to the following files can be safely ignored
debian/DEBIAN/control
debian/DEBIAN/md5sums
debian/usr/share/doc/scx/copyright

#clean up after the patch
rm debian/DEBIAN/control.rej debian/usr/share/doc/scx/copyright.rej debian/DEBIAN/md5sums.rej
#correct the checksums. There were created for the 32bit binaries
cut -d " " -f3 debian/DEBIAN/md5sums > /tmp/md5list
> debian/DEBIAN/md5sums
for x in `cat /tmp/md5list`; do md5sum debian/$x >> debian/DEBIAN/md5sums; done

#install the provided we created earlier
cp ~/xplatproviders-1.0.0/target/*/libSCXCoreProviderModule.so debian/opt/microsoft/scx/lib/providers/libSCXCoreProviderModule.so

#set up the permissions
sudo chown -R root.root debian

#and finally build the debian package
sudo dpkg-deb --build debian `basename $PWD`.deb


I have tested this build process on Ubuntu Server 10.04 LTS 64bit and Ubuntu Server 8.04 LTS 64bit. It looks like resulting packages may be compatible with both versions (I.e the package built on *.04 works on 10.04) but I have wait for my monitoring team to confirm,


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>