# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # Install a complete distribution, the required system tools and libraries, the # runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu Server # 10.10 system. # Display commands as they are executed set -x # Build and install in the current directory build=`pwd` # Install core dev tools sudo apt-get -y install curl git-core subversion autoconf pkg-config automake libtool g++ make gdb vim if [ "$?" != "0" ]; then exit $? fi # Build Libexpat curl -L http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz/download -o expat-2.0.1.tar.gz tar xzf expat-2.0.1.tar.gz cd expat-2.0.1 ./configure --prefix=$build/expat-2.0.1-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build Apache APR and HTTP server sudo apt-get -y install libssl-dev libpcre3-dev if [ "$?" != "0" ]; then exit $? fi svn co -r 1201086 http://svn.apache.org/repos/asf/apr/apr/trunk apr-1.4.x cd apr-1.4.x ./buildconf ./configure -with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-1.4.x-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build curl -OL http://archive.apache.org/dist/httpd/httpd-2.3.15-beta.tar.gz tar xzf httpd-2.3.15-beta.tar.gz cd httpd-2.3.15-beta ./configure --enable-ssl --enable-proxy --enable-usertrack --enable-cgi --enable-session-crypto --enable-mods-shared=most --enable-mpms-shared="prefork worker event" --with-mpm=prefork --with-apr=$build/apr-1.4.x-bin --with-expat=$build/expat-2.0.1-bin --prefix=$build/httpd-2.3.15-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build Memcached sudo apt-get -y install libevent-dev if [ "$?" != "0" ]; then exit $? fi curl -OL http://memcached.googlecode.com/files/memcached-1.4.7.tar.gz tar xzf memcached-1.4.7.tar.gz cd memcached-1.4.7 ./configure --prefix=$build/memcached-1.4.7-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build Tinycdb curl -OL http://www.corpit.ru/mjt/tinycdb/tinycdb_0.77.tar.gz tar xzf tinycdb_0.77.tar.gz cd tinycdb-0.77 make all shared make prefix=$build/tinycdb-0.77-bin install-all install-sharedlib if [ "$?" != "0" ]; then exit $? fi cd $build # Build LevelDB git clone https://code.google.com/p/leveldb/ cd leveldb make all if [ "$?" != "0" ]; then exit $? fi cd $build # Build Libcurl curl -OL http://curl.haxx.se/download/curl-7.24.0.tar.gz tar xzf curl-7.24.0.tar.gz cd curl-7.24.0 ./configure --prefix=$build/curl-7.24.0-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build Libxml2 curl -OL ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.7.tar.gz tar xzf libxml2-sources-2.7.7.tar.gz cd libxml2-2.7.7 ./configure --prefix=$build/libxml2-2.7.7-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build Mozilla Portable Runtime curl -OL http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.8/src/nspr-4.8.8.tar.gz tar xzf nspr-4.8.8.tar.gz cd nspr-4.8.8/mozilla/nsprpub ./configure --prefix=$build/nspr-4.8.8-bin --enable-64bit make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build SpiderMonkey sudo apt-get -y install zip unzip if [ "$?" != "0" ]; then exit $? fi curl -OL http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz tar xzf js185-1.0.0.tar.gz cd js-1.8.5/js/src export LD_RUN_PATH=$build/nspr-4.8.8-bin/lib ./configure --prefix=$build/js-1.8.5-bin --enable-threadsafe --with-system-nspr --with-nspr-prefix=$build/nspr-4.8.8-bin make make install unset LD_RUN_PATH ln -s $build/js-1.8.5-bin/lib/libmozjs185.so $build/js-1.8.5-bin/lib/libmozjs.so if [ "$?" != "0" ]; then exit $? fi cd $build # Build Libstrophe git clone git://github.com/jsdelfino/libstrophe.git cd libstrophe ./bootstrap.sh ./configure --prefix=$build/libstrophe-bin --with-expat=$build/expat-2.0.1-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build HTML Tidy sudo apt-get -y install cvs if [ "$?" != "0" ]; then exit $? fi cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P tidy cd tidy sh build/gnuauto/setup.sh ./configure --prefix=$build/htmltidy-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build Libopkele git clone git://github.com/jsdelfino/libopkele.git cd libopkele ./autogen.bash ./configure --prefix=$build/libopkele-bin --with-curl=$build/curl-7.24.0-bin --with-expat=$build/expat-2.0.1-bin --with-htmltidy=$build/htmltidy-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build Mod_auth_openid git clone git://github.com/jsdelfino/mod_auth_openid.git cd mod_auth_openid ./autogen.sh ./configure --prefix=$build/mod-auth-openid-bin --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.15-bin --with-curl=$build/curl-7.24.0-bin --with-libopkele=$build/libopkele-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build Liboauth curl -OL http://liboauth.sourceforge.net/pool/liboauth-0.9.1.tar.gz tar xzf liboauth-0.9.1.tar.gz cd liboauth-0.9.1 ./configure --prefix=$build/liboauth-0.9.1-bin CURL_CFLAGS="-I$build/curl-7.24.0-bin/include" CURL_LIBS="-L$build/curl-7.24.0-bin/lib -R$build/curl-7.24.0-bin/lib -lcurl" make make install if [ "$?" != "0" ]; then exit $? fi cd $build # Build mod_security curl -OL http://downloads.sourceforge.net/project/mod-security/modsecurity-apache/2.6.1/modsecurity-apache_2.6.1.tar.gz tar xzf modsecurity-apache_2.6.1.tar.gz cd modsecurity-apache_2.6.1 ./configure --prefix=$build/modsecurity-apache-2.6.1-bin --with-apxs=$build/httpd-2.3.15-bin/bin/apxs --with-apr=$build/apr-1.4.x-bin/bin/apr-2-config --with-apu=$build/apr-1.4.x-bin/bin/apr-2-config --with-libxml=$build/libxml2-2.7.7-bin --with-curl=$build/curl-7.24.0-bin LIBS="-L$build/expat-2.0.1-bin/lib -R$build/expat-2.0.1-bin/lib" make make install if [ "$?" != "0" ]; then exit $? fi cd $build curl -OL http://downloads.sourceforge.net/project/mod-security/modsecurity-crs/0-CURRENT/modsecurity-crs_2.2.2.tar.gz tar xzf modsecurity-crs_2.2.2.tar.gz cd modsecurity-crs_2.2.2 curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/modsecurity-crs_2.2.2.patch patch -p0