<!-- keep this as a security measure: * Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup,Main.LCGAdminGroup * Set ALLOWTOPICRENAME = Main.TWikiAdminGroup,Main.LCGAdminGroup #uncomment this if you want the page only be viewable by the internal people #* Set ALLOWTOPICVIEW = Main.TWikiAdminGroup,Main.LCGAdminGroup --> KeyWords: SysAdmin, CfEngine, [[Solaris]] ---+ Compiling and installing CfEngine 2.2.8 on Solaris 10 Alerted by a [[https://cfengine.org/pipermail/help-cfengine/2008-October/004192.html thread on the help-cfengine mailing list]], I set forth to compiling ==cfengine== from sources on our Solaris boxes, as the [[http://www.blastwave.org Blastwave.org]] repositories [[http://www.blastwave.org/packages.php/cfengine still provide the ancient version 2.1.20]]. Compiling from source is not as straightforward as it should be; some issues have been found (and [[https://cfengine.org/pipermail/help-cfengine/2008-October/004202.html reported to the mailing-list]], to no reaction at present). Workarounds are recorded here for future reference. ---++ Compilation This is a detailed walkthrough from downloading the sources to installing the cfengine 2.2.8 binaries. * Download and extract the sources: <verbatim> cd /tmp wget http://www.cfengine.org/downloads/cfengine-2.2.8.tar.gz gzcat cfengine-2.2.8.tar.gz | tar xvf - </verbatim> * Install neeed development tools: assuming you have [[http://www.blastwave.org/howto.html Blastwave's pkg-get]] installed, you can have them all with: <verbatim> cd cfengine-2.2.8 # freshen the package cache contents pkg-get -U # install needed packages pkg-get install binutils bison gcc4core flex openssl_devel berkeleydb4 # ensure they are found by the shell export PATH=$PATH:/opt/csw/bin </verbatim> * Run the usual ==./configure; make== procedure. <verbatim> ./configure --prefix=/opt/cscs --with-openssl=/opt/csw/ --with-berkeleydb=/opt/csw/bdb4/ --with-gnu-ld CC=/opt/csw/gcc4/bin/gcc </verbatim> Note: * The path to CSW OpenSSL and BerkeleyDB libraries needs to be explicitly passed to ==./configure==; * CSW's ==gcc4== package installs the ==gcc== binary in a non-standard location; you need to either add =/opt/csw/gcc4/bin= to PATH, or explicitly set the full path to the compiler via the ==CC=/opt/csw/gcc4/bin/gcc== argumento to ==./configure==; * The prefix has been changed from the default =/usr/local= (we collect all local software in =/opt/cscs=). * Option =--with-gnu-ld= tells ==./configure== that we are using an all-GNU toolchain. * Before issuing ==make==, a few workarounds need to be put in place: * First: ==gcc== does not understand the =-pthread= option; removing it from the =Makefile='s works around this bug: <verbatim> find . -name Makefile | (while read file; do gsed -i -e 's/-pthread//g;' $file; done) make clean all </verbatim> * Second: CSW installs the ==ar== binary outside of the standard PATH, need to add it: <verbatim> # need ar, non-std path export PATH=$PATH:/opt/csw/i386-pc-solaris2.8/bin </verbatim> * Use [[http://www.bolthole.com/solaris/gnutopkg gnutopkg]] to compile the sources and make a Solaris binary package. _Note:_ ==gnutopkg== requires that we run ==./configure== with any non-standard options _before_ invocation of ==gnutopkg==. <verbatim> # compile and create a Sun package (see http://www.bolthole.com/solaris/gnutopkg) gnutopkg </verbatim> * Install the generated package and test the installed ==cfengine==: <verbatim> # install pkgadd -d cfengine-i386.pkg # check version and functionality /opt/cscs/sbin/cfagent --version /opt/cscs/sbin/cfagent -q -v -n | less </verbatim> ---++ Installation Deployment of the package on all SE's assumes that the package created above has been copied to the shared package repository as =CSCS-cfengine-2.2.8.pkg=, and that ==pdsh== is installed. <verbatim> # install on all hosts in one run pdsh -R ssh -w "se[01-11]" "yes | pkgadd -d /net/adm00.lcg.cscs.ch/local2/lcg-nfs/packages/solaris/CSCS-cfengine-2.2.8-i386.pkg all 2>&1" | dshbak | less # install symlink for cfexecd pdsh -R ssh -w "se[01-12]" "ln -f -s /opt/cscs/sbin/cfagent /var/cfengine/bin/cfagent" | sort # check it :-) pdsh -R ssh -w "se[01-12]" "ls -l /var/cfengine/bin/cfagent" | sort </verbatim> -- Main.RiccardoMurri - 06 Oct 2008 ---++ Readers' comments %COMMENT{type="below"}%
This topic: LCGTier2
>
WebHome
>
PhoenixClusterBlog
>
PhoenixBlog20081006x1208
Topic revision: r3 - 2008-11-25 - RiccardoMurri
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback