From 0a3cd4a1e3659c3feb7a7933f4bc5993d62d3b7f Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 29 Mar 2010 06:26:16 +0000 Subject: Build memcached from source as the Ubuntu 9.10 memcached package is back level. Minor typo fixes in httpd config scripts. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@928605 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/INSTALL | 14 ++++++++++---- sca-cpp/trunk/components/cache/Makefile.am | 4 ++++ sca-cpp/trunk/components/cache/memcached-start | 6 +++++- sca-cpp/trunk/components/cache/memcached-stop | 5 ++++- sca-cpp/trunk/configure.ac | 13 ++++++++++++- sca-cpp/trunk/modules/http/httpd-ca-conf | 4 ++-- sca-cpp/trunk/modules/http/httpd-cert-conf | 2 +- sca-cpp/trunk/modules/http/httpd-ssl-conf | 2 +- sca-cpp/trunk/ubuntu/ubuntu-bin-image | 2 +- sca-cpp/trunk/ubuntu/ubuntu-install | 22 +++++++++++++++++++--- 10 files changed, 59 insertions(+), 15 deletions(-) (limited to 'sca-cpp') diff --git a/sca-cpp/trunk/INSTALL b/sca-cpp/trunk/INSTALL index cb4745ce9e..ba9d898c66 100644 --- a/sca-cpp/trunk/INSTALL +++ b/sca-cpp/trunk/INSTALL @@ -43,11 +43,7 @@ doxygen-1.6.1 Install the following binaries: curl-7.19.5 (http://curl.haxx.se) -memcached-1.2.8 (http://memcached.org/) - -Optional: privbind-1.1 (http://manpages.ubuntu.com/manpages/karmic/man1/privbind.1.html) -will help you bind to port 80 for example without running as root Then install the following development dependencies: @@ -57,6 +53,10 @@ httpd-2.2-15 (http://httpd.apache.org/) with included libapr and libaprutil built with OpenSSL libssl-0.9.8g +Memcached: +memcached-1.4.4 (http://memcached.org/) +built with libevent-1.4.11 + XML: libxml2-2.7.5 (http://xmlsoft.org/) @@ -135,6 +135,7 @@ dependencies installed under $HOME: ./configure --prefix=$HOME/tuscany-sca-cpp-bin \ --with-apr=$HOME/httpd-2.2.13-bin --with-httpd=$HOME/httpd-2.2.13-bin \ +--with-memcached=$HOME/memcached-1.4.4-bin \ --with-libcurl=$HOME/curl-7.19.5-bin --with-libxml2=/usr \ --with-js-include=/usr/include/xulrunner-1.9.1.8/unstable \ --with-js-lib=/usr/lib/xulrunner-1.9.1.8 \ @@ -183,6 +184,11 @@ make make install export PATH=$HOME/httpd-2-2.13-bin/bin:$PATH +Memcached: +./configure --prefix=$HOME/memcached-1.4.4-bin +make +make install + Apache Axis2/C: ./configure --enable-libxml2 --enable-openssl \ --with-apache2=$HOME/httpd-2.2.13-bin/include --prefix=$HOME/axis2c-1.6.0-bin diff --git a/sca-cpp/trunk/components/cache/Makefile.am b/sca-cpp/trunk/components/cache/Makefile.am index b7397c64da..0a41f56dbe 100644 --- a/sca-cpp/trunk/components/cache/Makefile.am +++ b/sca-cpp/trunk/components/cache/Makefile.am @@ -18,6 +18,10 @@ comp_SCRIPTS = memcached-start memcached-stop compdir=$(prefix)/components/cache +comp_DATA = memcached.prefix +memcached.prefix: $(top_builddir)/config.status + echo ${MEMCACHED_PREFIX} >memcached.prefix + comp_LTLIBRARIES = libmemcache.la libmemcache_la_SOURCES = memcache.cpp diff --git a/sca-cpp/trunk/components/cache/memcached-start b/sca-cpp/trunk/components/cache/memcached-start index ddde726d40..b10d7f3fe8 100755 --- a/sca-cpp/trunk/components/cache/memcached-start +++ b/sca-cpp/trunk/components/cache/memcached-start @@ -18,4 +18,8 @@ # under the License. # Start memcached -memcached -d -l 127.0.0.1 -m 4 -p 11211 +here=`readlink -f $0`; here=`dirname $here` + +memcached_prefix=`cat $here/memcached.prefix` +$memcached_prefix/bin/memcached -d -l 127.0.0.1 -m 4 -p 11211 + diff --git a/sca-cpp/trunk/components/cache/memcached-stop b/sca-cpp/trunk/components/cache/memcached-stop index fb11deb4a2..80801cdfbf 100755 --- a/sca-cpp/trunk/components/cache/memcached-stop +++ b/sca-cpp/trunk/components/cache/memcached-stop @@ -18,6 +18,9 @@ # under the License. # Stop memcached -mc="memcached -d -l 127.0.0.1 -m 4 -p 11211" +here=`readlink -f $0`; here=`dirname $here` + +memcached_prefix=`cat $here/memcached.prefix` +mc="$memcached_prefix/bin/memcached -d -l 127.0.0.1 -m 4 -p 11211" kill `ps -ef | grep -v grep | grep "${mc}" | awk '{ print $2 }'` diff --git a/sca-cpp/trunk/configure.ac b/sca-cpp/trunk/configure.ac index cf5277d82e..991b0e9900 100644 --- a/sca-cpp/trunk/configure.ac +++ b/sca-cpp/trunk/configure.ac @@ -54,7 +54,7 @@ else AM_CONDITIONAL([DARWIN], false) fi -# Configure path to LIBCURL includes and lib. +# Configure path to libcurl includes and lib. AC_MSG_CHECKING([for libcurl]) AC_ARG_WITH([libcurl], [AC_HELP_STRING([--with-libcurl=PATH], [path to installed libcurl [default=/usr]])], [ LIBCURL_INCLUDE="${withval}/include" @@ -134,6 +134,17 @@ AC_ARG_WITH([httpd], [AC_HELP_STRING([--with-httpd=PATH], [path to installed Apa AC_SUBST(HTTPD_PREFIX) AC_SUBST(HTTPD_INCLUDE) +# Configure path to memcached. +AC_MSG_CHECKING([for memcached]) +AC_ARG_WITH([memcached], [AC_HELP_STRING([--with-memcached=PATH], [path to installed memcached [default=/usr]])], [ + MEMCACHED_PREFIX="${withval}" + AC_MSG_RESULT("${withval}") +], [ + MEMCACHED_PREFIX="/usr" + AC_MSG_RESULT(/usr) +]) +AC_SUBST(MEMCACHED_PREFIX) + # Configure TUSCANY_SCACPP path variable. TUSCANY_SCACPP=`echo "${TUSCANY_SCACPP}"` if test "${TUSCANY_SCACPP}" = ""; then diff --git a/sca-cpp/trunk/modules/http/httpd-ca-conf b/sca-cpp/trunk/modules/http/httpd-ca-conf index f59ff71d46..c5a3f8e894 100755 --- a/sca-cpp/trunk/modules/http/httpd-ca-conf +++ b/sca-cpp/trunk/modules/http/httpd-ca-conf @@ -17,7 +17,7 @@ # specific language governing permissions and limitations # under the License. -# Generate a test certificate of authority +# Generate a test certification authority certificate here=`readlink -f $0`; here=`dirname $here` root=`readlink -f $1` host=$2 @@ -84,6 +84,6 @@ rm -f $root/conf/ca-database echo 1000 > $root/conf/ca-serial touch $root/conf/ca-database -# Generate the certificate of authority +# Generate the certification authority certificate openssl req -new -x509 -config $root/conf/openssl-ca.conf -out $root/conf/ca.crt -keyout $root/conf/ca.key diff --git a/sca-cpp/trunk/modules/http/httpd-cert-conf b/sca-cpp/trunk/modules/http/httpd-cert-conf index 7bf22d4668..b6dc8ebd6f 100755 --- a/sca-cpp/trunk/modules/http/httpd-cert-conf +++ b/sca-cpp/trunk/modules/http/httpd-cert-conf @@ -50,7 +50,7 @@ EOF # Generate a certificate request openssl req -new -config $root/conf/openssl-cert.conf -out $root/conf/server-req.crt -keyout $root/conf/server.key -# Generate a certificate, signed with our test certificate of authority +# Generate a certificate, signed with our test certification authority certificate openssl ca -batch -config $root/conf/openssl-ca.conf -out $root/conf/server.crt -infiles $root/conf/server-req.crt # Export it to PKCS12 format, that's the format Web browsers want to import diff --git a/sca-cpp/trunk/modules/http/httpd-ssl-conf b/sca-cpp/trunk/modules/http/httpd-ssl-conf index b064dc02dc..ef4c0c1a71 100755 --- a/sca-cpp/trunk/modules/http/httpd-ssl-conf +++ b/sca-cpp/trunk/modules/http/httpd-ssl-conf @@ -65,7 +65,7 @@ CustomLog $root/logs/ssl_access_log sslcombined LogLevel warn # Require clients to present either: -# a certificate signed with our CA certificate of authority +# a certificate signed with our certification authority certificate # or a userid + password for HTTP basic authentication Satisfy Any diff --git a/sca-cpp/trunk/ubuntu/ubuntu-bin-image b/sca-cpp/trunk/ubuntu/ubuntu-bin-image index 7159817c61..54ebd42c03 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-bin-image +++ b/sca-cpp/trunk/ubuntu/ubuntu-bin-image @@ -35,7 +35,7 @@ sudo apt-get -y install git-core autoconf automake g++ libtool if [ "$?" != "0" ]; then exit $? fi -sudo apt-get -y install curl memcached privbind +sudo apt-get -y install curl privbind if [ "$?" != "0" ]; then exit $? fi diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install b/sca-cpp/trunk/ubuntu/ubuntu-install index fea93e1a9e..5ce7976108 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-install +++ b/sca-cpp/trunk/ubuntu/ubuntu-install @@ -31,7 +31,7 @@ if [ "$?" != "0" ]; then fi # Install the required binaries -sudo apt-get -y install curl memcached privbind +sudo apt-get -y install curl privbind if [ "$?" != "0" ]; then exit $? fi @@ -52,6 +52,22 @@ if [ "$?" != "0" ]; then fi cd $build +# Build Memcached +sudo apt-get install libevent-dev +if [ "$?" != "0" ]; then + exit $? +fi +curl -o memcached-1.4.4.tar.gz http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz +tar xzf memcached-1.4.4.tar.gz +cd memcached-1.4.4 +./configure --prefix=$build/memcached-1.4.4-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + # Build Apache Axis2/C sudo apt-get -y install pkg-config libxml2-dev if [ "$?" != "0" ]; then @@ -119,7 +135,7 @@ sudo apt-get -y install openjdk-6-jdk if [ "$?" != "0" ]; then exit $? fi -curl -o vysper-0.5-bin.tar.gz https://repository.apache.org/content/repositories/orgapachemina-007/org/apache/vysper/vysper/0.5/vysper-0.5-bin.tar.gz +curl -o vysper-0.5-bin.tar.gz https://repository.apache.org/content/repositories/orgapachemina-019/org/apache/vysper/vysper/0.5/vysper-0.5-bin.tar.gz tar xzf vysper-0.5-bin.tar.gz if [ "$?" != "0" ]; then exit $? @@ -146,7 +162,7 @@ git clone git://git.apache.org/tuscany-sca-cpp cd tuscany-sca-cpp cp etc/git-exclude .git/info/exclude ./bootstrap -./configure --prefix=$build/tuscany-sca-cpp-bin --with-libcurl=$build/curl-7.19.5-bin --with-apr=$build/httpd-2.2.15-bin --with-httpd=$build/httpd-2.2.15-bin --enable-threads --enable-python --enable-java --with-java=/usr/lib/jvm/java-6-openjdk --enable-webservice --with-axis2c=$build/axis2c-1.6.0-bin --enable-queue --with-qpidc=$build/qpidc-0.6-bin --enable-chat --with-libstrophe=$build/libstrophe --with-vysper=$build/vysper-0.5 +./configure --prefix=$build/tuscany-sca-cpp-bin --with-libcurl=$build/curl-7.19.5-bin --with-apr=$build/httpd-2.2.15-bin --with-httpd=$build/httpd-2.2.15-bin --with-memcached=$build/memcached-1.4.4-bin --enable-threads --enable-python --enable-java --with-java=/usr/lib/jvm/java-6-openjdk --enable-webservice --with-axis2c=$build/axis2c-1.6.0-bin --enable-queue --with-qpidc=$build/qpidc-0.6-bin --enable-chat --with-libstrophe=$build/libstrophe --with-vysper=$build/vysper-0.5 make make install if [ "$?" != "0" ]; then -- cgit v1.2.3