Wednesday, April 8, 2015

Install Shibboleth from source on CentOS 7 64-bit. (4/7/2015)

#!/bin/bash

# This script will download, compile and install all software needed for Shibboleth on CentOS 7 64-bit
#sudo zypper install --type pattern devel_basis
# Create working directory
yum groupinstall -y "Development Tools"
yum install -y openssl-devel
yum install -y wget
rm -vRf ~/Dev*
rm -vRf /opt/*
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

# 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:
yum -y install 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:
yum -y install httpd-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"

1 comment: