| 1 | = !HowTo Install ZOO-Kernel on CentOS 5.5 = |
| 2 | |
| 3 | == Requirements == |
| 4 | |
| 5 | Installing some standard tools to be able to run ZOO-Kernel on your platform : |
| 6 | |
| 7 | {{{ |
| 8 | #!sh |
| 9 | yum install apache2 |
| 10 | yum install build-essentials |
| 11 | yum install gcc-c++ |
| 12 | yum install zlib-devel |
| 13 | yum install libxml2-devel |
| 14 | yum install bison |
| 15 | yum install openssl |
| 16 | yum install python-devel |
| 17 | yum install subversion |
| 18 | }}} |
| 19 | |
| 20 | Compile then install FastCGI library from source |
| 21 | |
| 22 | {{{ |
| 23 | #!sh |
| 24 | wget http://www.fastcgi.com/dist/fcgi.tar.gz |
| 25 | tar xzf fcgi-2.4.0.tar.gz |
| 26 | ./configure |
| 27 | make |
| 28 | make install |
| 29 | echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf |
| 30 | ldconfig |
| 31 | }}} |
| 32 | |
| 33 | Compile then install the autoconf tools : |
| 34 | {{{ |
| 35 | #!sh |
| 36 | wget http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz |
| 37 | tar xzf autoconf-latest.tar.gz |
| 38 | ./configure --prefix=/usr |
| 39 | make |
| 40 | make install |
| 41 | }}} |
| 42 | |
| 43 | Compile then install the flex tool : |
| 44 | {{{ |
| 45 | #!sh |
| 46 | wget http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35/flex-2.5.35.tar.gz?r=http%3A%2F%2Fflex.sourceforge.net%2F&ts=1292529005&use_mirror=switch |
| 47 | tar xzf flex-2.5.35.tar.gz |
| 48 | cd flex-2.5.35 |
| 49 | ./configure --prefix=/usr |
| 50 | make |
| 51 | make install |
| 52 | }}} |
| 53 | |
| 54 | Using the curl providen in the CentOS distribution will produce ZOO-Kernel unable to run any Service. Indeed, some segmentation fault occurs when trying to run Execute request on the ZOO-Kernel, compiling the ZOO-Kernel seting USE_GDB flag in the CFLAGS of your Makefile will let you run ZOO-Kernel from gdb and be able to get more information on what is |
| 55 | {{{ |
| 56 | #!sh |
| 57 | wget http://curl.haxx.se/download/curl-7.21.3.tar.bz2 |
| 58 | tar xjf curl-7.21.3.tar.bz2 |
| 59 | cd curl-7.21.3 |
| 60 | ./configure --prefix=/usr |
| 61 | make |
| 62 | make install |
| 63 | }}} |
| 64 | |
| 65 | Compile then install Python : |
| 66 | |
| 67 | {{{ |
| 68 | #!sh |
| 69 | wget http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tar.bz2 |
| 70 | tar xjf Python-2.6.6.tar.bz2 |
| 71 | cd Python-2.6.6 |
| 72 | ./configure |
| 73 | make |
| 74 | make install |
| 75 | }}} |
| 76 | |
| 77 | |
| 78 | Compile then install your own GDAL library : |
| 79 | |
| 80 | {{{ |
| 81 | #!sh |
| 82 | wget http://download.osgeo.org/gdal/gdal-1.7.3.tar.gz |
| 83 | tar xzf gdal-1.7.3.tar.gz |
| 84 | cd gdal-1.7.3 |
| 85 | ./configure # add your options here |
| 86 | make |
| 87 | make install |
| 88 | }}} |
| 89 | |
| 90 | Install the Sun JAVA SDK into {{{/usr/share}}} then use the following command to ensure that the {{{libjvm.so}}} will be found at runtime from any context. |
| 91 | {{{ |
| 92 | #!sh |
| 93 | echo /usr/share/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client/ >> /etc/ld.so.conf.d/jvm.conf |
| 94 | ldconfig |
| 95 | }}} |
| 96 | |
| 97 | == Compile ZOO-Kernel and ZOO-Services == |
| 98 | |
| 99 | Compile then install ZOO-Kernel and your first ZOO-Services. |
| 100 | |
| 101 | First of all, compile the cgic library providen in the SVN source tree: |
| 102 | {{{ |
| 103 | #!sh |
| 104 | svn co http://svn.zoo-project.org/svn/trunk zoo-project |
| 105 | cd zoo-project/thirds/cgic206 |
| 106 | make |
| 107 | }}} |
| 108 | |
| 109 | Compile then install ZOO-Kernel. |
| 110 | {{{ |
| 111 | #!sh |
| 112 | cd ../../zoo-kernel |
| 113 | ./configure --with-java=/usr/share/jdk1.6.0_23/ --with-python |
| 114 | make zoo_loader.cgi |
| 115 | cp main.cfg /var/www/cgi-bin/ |
| 116 | cp zoo_loader.cgi /var/www/cgi-bin/ |
| 117 | }}} |
| 118 | |
| 119 | Compile then deploy your first ZOO-!ServicesProviders (simple !HelloPy and the OGR base-vect-ops !ServiceProvider): |
| 120 | {{{ |
| 121 | #!Lineno |
| 122 | #!c |
| 123 | cp ../zoo-services/hello-py/cgi-env/*.zcfg /var/www/cgi-bin/ |
| 124 | cp ../zoo-services/hello-py/test_service.py /var/www/cgi-bin/ |
| 125 | cd ../ogr/base-vect-ops/ |
| 126 | make |
| 127 | cp ./cgi-env/* /var/www/cgi-bin/ |
| 128 | vi /var/www/cgi-bin/main.cfg --> set your own informations here |
| 129 | }}} |
| 130 | |
| 131 | To ensure that the libjvm.so will be found from apache, please restart it : |
| 132 | |
| 133 | {{{ |
| 134 | #!sh |
| 135 | /etc/init.d/httpd restart |
| 136 | }}} |
| 137 | Testing your ZOO-Kernel. |
| 138 | |
| 139 | {{{ |
| 140 | #!sh |
| 141 | cd /var/www/cgi-bin |
| 142 | ./zoo_loder.cgi "request=Execute&service=WPS&version=1.0.0&Identifier=HelloPy&DataInputs=a=Djay" |
| 143 | ./zoo_loader.cgi "request=Execute&service=WPS&version=1.0.0&Identifier=Buffer&DataInputs=BufferDistance=1@datatype=interger;InputPolygon=Reference@xlink:href=http%3A%2F%2Fwww.zoo-project.org%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp%3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.15&RawDataOutput=Result@mimeType=application/json" |
| 144 | }}} |
| 145 | |