|
|
(151 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
| == Installing dependencies == | | ==== [[Install/Test/Uninstall - Redhat5/Centos5/Fedora15|Redhat/Fedora/Centos]] ==== |
|
| |
|
| Tested on Centos 5.2/Boost 1.38/Postgres 8.3/Gnu Compiler 4.1.2
| | ==== [[Install/Test/Uninstall - Ubuntu 10.04 LTS|Ubuntu/Debian]] ==== |
|
| |
|
| It might work with versions as far back as Boost 1.35 and Postgres 8.1 perhaps with minor tweaks.
| | ==== [[Install/Test/Uninstall - Suse 11.4|Suse]] ==== |
| | |
| === Installing Boost ===
| |
| | |
| Required for complete build of Boost - but those bits of Boost may not actually be required by Exodus.
| |
| | |
| yum install python-devel
| |
| yum install bzip2-devel
| |
| | |
| Download it
| |
| | |
| wget http://downloads.sourceforge.net/boost/boost_1_38_0.tar.bz2?use_mirror=garr
| |
| | |
| Unpack it
| |
| | |
| tar xvf boost_1_38_0.tar.bz2
| |
| cd boost_1_38_0
| |
| | |
| Actually only the following parts are required but how to a partial build is unknown at the moment.
| |
| | |
| # Boost DateTime
| |
| # Boost FileSystem
| |
| # Boost IOstream
| |
| # Boost Interprocess
| |
| # Boost ProgramOptions
| |
| # Boost Regex
| |
| # Boost System
| |
| # Boost Thread
| |
| | |
| Become superuser to build and install it.
| |
| | |
| su
| |
| | |
| ./configure
| |
| make
| |
| make install
| |
| | |
| Quit superuser
| |
| | |
| exit
| |
| | |
| === Installing Postgres ===
| |
| | |
| Version 8.3
| |
| | |
| yum install postgresql
| |
| | |
| === Setting up Postgres for Exodus ===
| |
| | |
| become user postgres and get into postgres command prompt
| |
| | |
| sudo su - postgres
| |
| psql
| |
| | |
| create a user and database for exodus
| |
| | |
| CREATE ROLE exodus LOGIN
| |
| PASSWORD 'somesillysecret'
| |
| CREATEDB CREATEROLE;
| |
| | |
| CREATE DATABASE exodus
| |
| WITH ENCODING='UTF8'
| |
| OWNER=exodus;
| |
| | |
| #quit postgres command prompt and quite postgres user
| |
| | |
| \q
| |
| exit
| |
| | |
| Allow login from 127.0.0.1 using username/unencrypted password (instead of only logged-in username without password)
| |
| http://developer.postgresql.org/pgdocs/postgres/auth-pg-hba-conf.html
| |
| | |
| | |
| nano /var/lib/pgsql/data/pg_hba.conf
| |
| | |
| #host all all 127.0.0.1/32 ident sameuser
| |
| host all all 127.0.0.1/32 password
| |
| hostssl all all 0.0.0.0/0 password
| |
| | |
| service postgresql reload
| |
| | |
| | |
| | |
| | |
| | |
| === Installing g++ compiler ===
| |
| | |
| yum list|grep gcc
| |
| | |
| yum install gcc-c++.i386
| |
| | |
| === Installing Postgres development libraries === | |
| | |
| Look for all available postgres packages and if they are installed
| |
| | |
| yum list|grep postgres
| |
|
| |
| yum install postgresql-devel
| |
| | |
| Locate postgres.h for interest
| |
| | |
| updatedb
| |
| locate postgres.h
| |
| | |
| == Downloading and Building Exodus ==
| |
| | |
| === Downloading Exodus ===
| |
| | |
| Make a folder for exodus
| |
| | |
| cd ~
| |
| mkdir exodus
| |
| cd exodus
| |
| | |
| Download the main trunk of Exodus
| |
| | |
| svn checkout http://svn.neosys.com/svn/trunk
| |
| | |
| === Building pgexodus ===
| |
| | |
| pgexodus.so is a shared library addin c function for postgres to perform sort/select/index functions otherwise it is not required.
| |
| | |
| Currently hand built without even a make file. standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf
| |
| | |
| cd ~/exodus/trunk/exodus/pgexodus/src
| |
| | |
| g++ -fpic -c pgexodus.c extract.c callexodus.cpp -I `pg_config --includedir-server` -I /usr/local/include/boost-1_38
| |
| g++ -shared -o pgexodus.so pgexodus.o extract.o callexodus.o -lrt -lpq
| |
| | |
| === Installing pgexodus ===
| |
| | |
| Copy the library to the postgres library folder
| |
| | |
| sudo cp pgexodus.so `pg_config --libdir`
| |
| | |
| Register the c functions in postgres
| |
| | |
| sudo su - postgres
| |
| psql
| |
| | |
| {{postgres function installation}}
| |
| | |
| Quit postgres command prompt and quite postgres user
| |
| | |
| \q
| |
| exit
| |
| | |
| === Building libexodus ===
| |
| | |
| libexodus.so is a shared library that allows you to write c++ programs with the style and semantics of pick basic.
| |
| | |
| Currently hand built without even a make file. standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf
| |
| | |
| Ignore three warnings in /boost/thread/tss.hpp included from mvdbpostgres.cpp
| |
| | |
| cd ~/exodus/trunk/exodus/mv/src
| |
| g++ -fPIC -c *.cpp -I /usr/local/include/boost-1_38
| |
| gcc -fPIC -c *.c -I../../../boost_1_38_0
| |
| g++ -shared -o libexodus.so -lc *.o
| |
| | |
| #an alternative way to replace the last step and that attempts to provide proper library versioning but doesnt seem to work
| |
| | |
| ld -shared -soname libexodus.so.1 -o libexodus.so.1.0 -lc *.o
| |
| #g++ -shared -o libexodus.so.1.0 -lc *.o
| |
| ldconfig -v -n .
| |
| ln -sf libexodus.so.1 libexodus.so
| |
| | |
| === Debugging ===
| |
| | |
| http://www.ibm.com/developerworks/library/l-shobj/
| |
| | |
| ldd libexodus.so|grep "not found"
| |
| ldd -u libexodus.so
| |
| | |
| === Testing libexodus ===
| |
| | |
| Once per session before running libexodus
| |
| | |
| export LD_LIBRARY_PATH=.:/usr/local/lib:$LD_LIBRARY_PATH
| |
| | |
| Compile and Link
| |
| | |
| g++ -o test test.cpp -I/usr/local/include/boost-1_38 -L. -L/usr/local/lib -lexodus -lpq -lboost_filesystem-gcc41-mt -lboost_regex-gcc41-mt -lboost_thread-gcc41-mt
| |
| | |
| Execute
| |
| | |
| ./test
| |
| | |
| ldd -u test
| |
| | |
| == Building service ==
| |
| | |
| service is an incomplete multithreaded framework to support dynamic loading of library routines and serving a request/response queue.
| |
| | |
| www provides an optional web interface to the request/response queue.
| |
| | |
| === Building service ===
| |
| | |
| g++ -fPIC -c *.cpp -I../../../boost_1_38_0 -I../mv
| |
| g++ -shared -o service.so -lc *.o
| |
| g++ -o service main.cpp -I../../../../boost_1_38_0 -L. -L/usr/local/lib -lexodus -lpq -lboost_filesystem-gcc41-mt -lboost_regex-gcc41-mt -lboost_thread-gcc41-mt -L../mv -I../mv -I../.. /../boost_1_38_0 -L./ -lagency
| |
| | |
| == Developing libexodus/service ==
| |
| | |
| === Committing your developments ===
| |
| | |
| First get a username and password by running the following unix command and send the output to an exodus subversion administrator eg steve.bush@neosys.com
| |
| | |
| htpasswd -nm YOURDESIREDUSERNAME
| |
| | |
| The administrator needs to run the following command as root and enter the encrypted pass (the bit AFTER the :) ignoring the warning about plain text password because it is already encrypted.
| |
| | |
| htpasswd -p /etc/apache2/dav_svn.passwd YOURDESIREDUSERNAME
| |