Saturday, April 25, 2015

Install Shibboleth from source on OpenSUSE 13

#!/bin/bash

# This script will download, compile and install all software needed for Shibboleth on openSUSE(puke) 64-bit
sudo zypper install -y --type pattern devel_basis
# Create working directory
rm -vRf ~/Development
rm -vRf /opt/shibboleth-sp
mkdir ~/Development
mkdir ~/Development/shibsrc
cd ~/Development/shibsrc

# Download packages
wget http://shibboleth.net/downloads/log4shib/latest/log4shib-1.0.9.tar.gz
wget http://apache.osuosl.org//xerces/c/3/sources/xerces-c-3.1.2.tar.gz
wget http://apache.claz.org/santuario/c-library/xml-security-c-1.7.3.tar.gz
wget http://shibboleth.net/downloads/c++-opensaml/latest/xmltooling-1.5.4.tar.gz
wget http://shibboleth.net/downloads/c++-opensaml/latest/opensaml-2.5.4.tar.gz
wget http://shibboleth.net/downloads/service-provider/latest/shibboleth-sp-2.5.4.tar.gz
# wget http://curl.haxx.se/download/curl-7.41.0.tar.gz
zypper in -y libopenssl-devel
#cp -vf ~/bin/base.h ~/Development/shibsrc/xmltooling*/xmltooling
wget http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/base.h
cp -vf base.h ~/Development/shibsrc/xmltooling-1.5.4/xmltooling

# log4shib:
tar -zxvf log4shib*
cd log4shib*
./configure --disable-static --disable-doxygen --prefix=/opt/shibboleth-sp
make && make install
cd ..

# Xerces-C:
tar -zxvf xerces-c*
cd xerces-c*
./configure --prefix=/opt/shibboleth-sp
make && make install
cd ..

# XML-Security-C:
tar -zxvf xml-security-c*
cd xml-security-c*
./configure --without-xalan --disable-static --prefix=/opt/shibboleth-sp --with-xerces=/opt/shibboleth-sp/
make && make install
cd ..

# Install boost-devel:
zypper in -y boost-devel

# Install libcurl:
#tar -xvzf curl*
#cd curl*
#./configure --disable-static --without-ca-bundle --enable-thread --prefix=/opt/shibboleth-sp
#make && make install
#cd ..

# XMLTooling-C:
tar -zxvf xmltooling*
cd xmltooling*
./configure --with-log4shib=/opt/shibboleth-sp --prefix=/opt/shibboleth-sp -C
make && make install
cd ..

# OpenSAML-C:
tar -zxvf opensaml*
cd opensaml*
./configure --with-log4shib=/opt/shibboleth-sp --prefix=/opt/shibboleth-sp -C
make && make install
cd ..

# Install apache devel:
zypper in -y apache2-devel

# Finally, Shibboleth:
tar -zxvf shibboleth-sp*
cd shibboleth-sp*
./configure --with-log4shib=/opt/shibboleth-sp --with-apxs=/usr/bin/apxs --with-apxs2=/usr/bin/apxs --with-apr=/usr/bin/apr-1-config --with-apu=/usr/bin/apu-1-config --prefix=/opt/shibboleth-sp
make && make install
cd ..

echo "Shibboleth can now be found in /opt/shibboleth-sp"

No comments:

Post a Comment