1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
Apache Tuscany SCA Runtime
==========================
Automated installation from scratch on Ubuntu 9.10
==================================================
Tuscany provides an automated install script for Ubuntu 9.10. You can start
with a fresh Ubuntu Server 9.10 system, the ubuntu-install script takes care
of all the download, build and installation steps for you.
The required system tools and libraries are downloaded and installed using
apt-get. The Tuscany project and its dependencies (Apache HTTPD server, Apache
Axis2/C etc) are downloaded, built and installed in the current directory.
To run the automated installation:
mkdir tuscany
cd tuscany
wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-install
chmod +x ./ubuntu-install
./ubuntu-install
The script will display each command as it's executed.
That's all you need to do to build and install the Tuscany SCA runtime on
Ubuntu 9.10.
For manual build and install steps on other systems or if you need to customize
your installation, read on...
Building
========
The Tuscany SCA Linux build uses the GNU Autotools tool chain.
First install the following development tools:
autoconf-2.64
automake-1.11
libtool-2.2.6
doxygen-1.6.1
gcc-g++-4.5
The GCC 4.5 compiler may not yet be included in your Linux distribution.
GCC 4.5 Ubuntu / Debian packages can be downloaded from:
http://ftp.debian.org/debian/pool/main/g/gcc-4.5/
To download and setup GCC 4.5 on Ubuntu 9.10, run this script:
http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-gcc-4.5
Then install the following development dependencies:
Apache HTTP server and APR:
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.7 (http://xmlsoft.org/)
CURL:
curl-7-19-5
libcurl4-openssl-7.19.5
JSON:
Mozilla TraceMonkey libmozjs (https://wiki.mozilla.org/JavaScript:TraceMonkey)
also included in xulrunner-1.9.1.8
Key/value store:
tinycdb-0.77 (http://www.corpit.ru/mjt/tinycdb.html)
Optional dependencies:
Web Services:
Apache Axis2/C 1.6.0 (http://ws.apache.org/axis2/c/)
Queueing:
Apache Qpid/C++ 0.6 (http://qpid.apache.org/)
built with libuuid-2.16, libboost-1.38.1, libboost-program-options-1.38.1 and
libboost-filesystem-1.38.1
Python:
Python 2.6.4 (http://www.python.org/)
Google AppEngine 1.3.2 (http://code.google.com/appengine/)
Java:
a Java 5+ JDK (http://openjdk.java.net/, http://harmony.apache.org/)
XMPP Chat:
Apache Vysper 0.5 (http://mina.apache.org/)
Libstrophe (http://code.stanziq.com/cgit/strophe/libstrophe/)
build it from source at git://code.stanziq.com//libstrophe
requires libcheck-0.9.6
SQL Database:
postgresql-9.0 (http://www.postgresql.org/)
Logging:
Apache Thrift 0.2.0 (http://incubator.apache.org/thrift/)
Facebook Scribe 2.2 (http://github.com/facebook/scribe/downloads)
Cloud deployment:
Apache Libcloud 0.3.1 (http://incubator.apache.org/libcloud/)
To configure the Tuscany SCA build do this:
./bootstrap
./configure --prefix=<install dir>
To enable debugging and strict warning compile options, add:
--enable-maintainer-mode
To enable gprof profiling, add:
--enable-profiling
To enable multi-threading (required by the Queue and Chat components and
for running with the HTTPD worker or event multi-threaded MPMs):
--enable-threads
To enable support for Python component implementations:
--enable-python
To enable support for Java component implementations:
--enable-java
To build the Web service utility component (requires Apache Axis2/C):
--enable-webservice
To build the Queue utility component (requires Apache Qpid/C++):
--enable-queue
To build the Chat utility component (requires Libstrophe and optionally Apache
Vysper if you want to run the tests with a local Vysper XMPP server):
--enable-chat
To build the SQL Database utility component (requires PostgreSQL):
--enable-sqldb
To generate doxygen documentation, add:
--enable-doxygen
To configure where to find dependencies, see the --with-* options described
in the configure help:
./configure --help
Here's an example configuration, tested on Ubuntu 9.10, with the system
dependencies installed in the standard system directories and some of the
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-tinycdb=$HOME/tinycdb-0.77-bin \
--with-curl=$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 \
--with-libcloud=$HOME/libcloud-0.3.1-bin \
--enable-threads \
--enable-python --with-python=/usr \
--enable-gae --with-gae=$HOME/google_appengine \
--enable-java --with-java=/usr/lib/jvm/default-java \
--enable-webservice --with-axis2c=$HOME/axis2c-1.6.0-bin \
--with-libxml2=$HOME/libxml2-2.7.7-bin \
--enable-queue --with-qpidc=$HOME/qpidc-0.6-bin \
--enable-chat --with-libstrophe=$HOME/libstrophe-bin \
--with-vysper=$HOME/vysper-0.5 \
--enable-sqldb --with-pgsql=$HOME/postgresql-9.0-bin \
--enable-log --with-thrift=$HOME/thrift-0.2.0-bin \
--with-scribe=$HOME/scribe-2.2-bin \
--enable-maintainer-mode
To build the Tuscany SCA runtime, do this:
make
To run the tests, do this:
make check
To build ctags for the source, do this:
make ctags
To build a source distribution, do this:
make dist
To build a binary distribution, do this:
make bindist
Installing
==========
To install the Tuscany SCA binaries, do this:
make install
Building dependencies from source
=================================
Here are example build and install steps for some of the dependencies.
Apache HTTPD, including APR, using the HTTP prefork MPM (recommended):
wget http://www.apache.org/dist/httpd/httpd-2.2.15.tar.gz
tar xzf httpd-2.2.15.tar.gz
cd httpd-2.2.15
./configure --enable-ssl --enable-proxy --enable-rewrite --with-included-apr \
--with-mpm=prefork --prefix=$HOME/httpd-2.2.15-bin
make
make install
export PATH=$HOME/httpd-2-2.15-bin/bin:$PATH
Memcached:
wget 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=$HOME/memcached-1.4.4-bin
make
make install
TinyCDB:
wget http://www.corpit.ru/mjt/tinycdb/tinycdb_0.77.tar.gz
tar xzf tinycdb_0.77.tar.gz
cd tinycdb-0.77
make
make prefix=$HOME/tinycdb-0.77-bin install
CURL:
wget http://curl.haxx.se/download/curl-7.19.5.tar.gz
tar xzf curl-7.19.5.tar.gz
cd curl-7.19.5
./configure --prefix=$HOME/curl-7.19.5-bin
make
make install
Libxml2:
wget 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=$HOME/libxml2-2.7.7-bin
make
make install
TraceMonkey:
wget http://hg.mozilla.org/tracemonkey/archive/e4364736e170.tar.gz
tar xzf tracemonkey-e4364736e170.tar.gz
cd tracemonkey-e4364736e170/js/src
autoconf2.13
./configure --prefix=$HOME/tracemonkey-bin
make
make install
Apache Axis2/C:
wget http://www.apache.org/dist/ws/axis2-c/1_6_0/axis2c-src-1.6.0.tar.gz
tar xzf axis2c-src-1.6.0.tar.gz
cd axis2c-src-1.6.0
./configure --enable-libxml2 --enable-openssl \
--with-apache2=$HOME/httpd-2.2.15-bin/include --prefix=$HOME/axis2c-1.6.0-bin
make
make install
export AXIS2C_HOME=$HOME/axis2c-1.6.0-bin
Apache Qpid/C++:
wget http://www.apache.org/dist/qpid/0.6/qpid-cpp-0.6.tar.gz
tar xzf qpid-cpp-0.6.tar.gz
cd qpidc-0.6
./configure --prefix=$HOME/qpidc-0.6-bin
make
make install
Libstrophe:
git clone git://code.stanziq.com/libstrophe
cd libstrophe
git submodule init
git submodule update
aclocal
automake --add-missing --foreign --copy
autoconf
./configure --prefix=$HOME/libstrophe-bin
make
make install
cd ..
mkdir -p libstrophe-bin/include
cp libstrophe/*.h libstrophe-bin/include
cp libstrophe/src/*.h libstrophe-bin/include
PostgreSQL:
wget http://wwwmaster.postgresql.org/download/mirrors-ftp/source/9.0alpha5/postgresql-9.0alpha5.tar.gz
tar xzf postgresql-9.0alpha5.tar.gz
cd postgresql-9.0alpha5
./configure --prefix=$HOME/postgresql-9.0-bin
make
make install
Apache Thrift (including Facebook fb303):
wget http://www.apache.org/dist/incubator/thrift/0.2.0-incubating/thrift-0.2.0-incubating.tar.gz
tar xzf thrift-0.2.0-incubating.tar.gz
cd thrift-0.2.0
./bootstrap.sh
./configure --prefix=$HOME/thrift-0.2.0-bin --with-java=no --with-erlang=no \
--with-perl=no --with-ruby=no --with-csharp=no --disable-static
make
make install
cd contrib/fb303
./bootstrap.sh
./configure --prefix=$HOME/thrift-0.2.0-bin/contrib/fb303 \
PY_PREFIX=$HOME/thrift-0.2.0-bin/contrib/fb303 \
--with-thriftpath=$HOME/thrift-0.2.0-bin
make
make install
cp cpp/lib/libfb303.so $HOME/thrift-0.2.0-bin/contrib/fb303/lib
Facebook Scribe:
wget http://github.com/downloads/facebook/scribe/scribe-2.2.tar.gz
tar xzf scribe-2.2.tar.gz
cd scribe
./bootstrap.sh --prefix=$HOME/scribe-2.2-bin PY_PREFIX=$HOME/scribe-2.2-bin \
--with-thriftpath=$HOME/thrift-0.2.0-bin \
--with-fb303path=$HOME/thrift-0.2.0-bin/contrib/fb303 \
--disable-static
make
make install
cp src/lib/libscribe.so $HOME/scribe-2.2-bin/lib
Apache Libcloud:
wget http://www.apache.org/dist/incubator/libcloud/apache-libcloud-incubating-0.3.1.tar.bz2
tar xjf apache-libcloud-incubating-0.3.1.tar.bz2
cd apache-libcloud-0.3.1
python setup.py build
python setup.py install --home $HOME/libcloud-0.3.1-bin
|