| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title>Apache Axis2/C - Installation Guide</title><h2>Apache Axis2/C Installation Guide</h2><p>This document guides you on how to install Axis2/C, and run the server and |
| |
| client samples on Linux and Microsoft Windows operating systems.</p><p>This release comes in two forms, source and binary. This document covers |
| |
| both forms.</p><p>Please send your feedback to the developer mailing list: <a href="mailto:axis-c-dev@ws.apache.org">axis-c-dev@ws.apache.org</a> |
| |
| (Subscription details are available on the <a href="http://ws.apache.org/axis2/c/mail-lists.html" class="externalLink" title="External Link">Axis2 site</a>.) Please |
| |
| remember to prefix the subject with [Axis2].</p><p style="margin-bottom: 0in"><br></br> |
| </p></div><div class="section"><a name="Contents"></a><h2>Contents</h2><ul> |
| |
| <li><a href="#linux">Installing and Running on Linux</a> |
| |
| <ul> |
| |
| <li><a href="#linux_binary">Using the Binary Release</a></li> |
| |
| <li><a href="#linux_source">Using the Source Release</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li><a href="#win">Installing and Running on Microsoft Windows (win32)</a> |
| |
| <ul> |
| |
| <li><a href="#win_binary">Using the Binary Release</a></li> |
| |
| <li><a href="#win_source">Using the Source Release</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| </ul><p style="margin-bottom: 0in"><br></br> |
| </p><p><a id="linux"></a></p></div><div class="section"><a name="1__Installing_and_Running_on_Linux"></a><h2>1. Installing and Running on Linux</h2><p>This can be done using binary or source distributions. (<a href="http://ws.apache.org/axis2/c/download.cgi" class="externalLink" title="External Link">Download</a> the two |
| |
| distributions)</p><p>To get both the binary and source distributions working, you need <a href="http://xmlsoft.org/downloads.html" class="externalLink" title="External Link">Libxml2</a>.</p><p><b>Note:</b> Most Linux systems have Libxml2 installed by default. On MS |
| |
| Windows, you need to download and install Libxml2.</p><p><a id="linux_binary"></a></p><div class="subsection"><a name="1_1__Installing_the_Binary_Distribution"></a><h3>1.1. Installing the Binary Distribution</h3><p>The following steps have to be followed to install and run the Axis2/C |
| |
| binary distribution on Linux : </p><ol> |
| |
| <li>Extract the binary tar package to a folder.</li> |
| |
| <li>Set the AXIS2C_HOME environment variable pointing to the location where |
| |
| you have extracted Axis2/C |
| |
| <ul> |
| |
| <li><code>AXIS2C_HOME='/your_path_to_axis2c'</code></li> |
| |
| <li><code>export AXIS2C_HOME</code></li> |
| |
| <p><strong>Note:</strong> You will need to set the AXIS2C_HOME only if |
| |
| you need to run the Axis2/C samples. The reason is that the samples use |
| |
| AXIS2C_HOME to get the path to the Axis2/C repository. This is not |
| |
| required to write your own services or clients. </p> |
| |
| </ul> |
| |
| </li> |
| |
| <li>Run the simple axis server: |
| |
| <ul> |
| |
| <li>To start the simple axis server on the default port 9090, run the |
| |
| following commands. |
| |
| <ul> |
| |
| <li><code>cd /your_path_to_axis2c/bin</code></li> |
| |
| <li><code>./axis2_http_server</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>To see the possible command line options run <code>./axis2_http_server -h</code> |
| |
| <p><strong>Note:</strong> If you run into shared library problems, |
| |
| try setting the LD_LIBRARY_PATH to include the lib folder containing |
| |
| the Axis2/C libs.</p> |
| |
| <ul> |
| |
| <li><code>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your_path_to_axis2c/lib</code></li> |
| |
| <li><code>export LD_LIBRARY_PATH</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>Run the sample clients in a new shell |
| |
| <ul> |
| |
| <li><code>cd /your_path_to_axis2c/bin/samples</code></li> |
| |
| <li>To run the client for echo service |
| |
| <ul> |
| |
| <li><code>./echo</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>To run the client for math service |
| |
| <ul> |
| |
| <li><code>./math</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>To see the possible command line options for the sample clients, |
| |
| run them with the '-h' option</li> |
| |
| <p><strong>Note:</strong> If you run into shared library problems, try |
| |
| setting the LD_LIBRARY_PATH</p> |
| |
| <ul> |
| |
| <li><code>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your_path_to_axis2c/lib</code></li> |
| |
| <li><code>export LD_LIBRARY_PATH</code></li> |
| |
| </ul> |
| |
| </ul> |
| |
| </li> |
| |
| </ol><p><a id="linux_source"></a></p></div><div class="subsection"><a name="1_2__Installing_the_Source_Distribution"></a><h3>1.2. Installing the Source Distribution</h3><p>The following steps have to be followed to install and run Axis2/C using |
| |
| the source distribution on Linux :</p><ol> |
| |
| <li>Extract the source tar package to a folder.</li> |
| |
| <li>Set the AXIS2C_HOME environment variable pointing to the location where |
| |
| you want to install Axis2/C |
| |
| <ul> |
| |
| <li><code>AXIS2C_HOME='/your_desired_path_to_axis2c_installation'</code></li> |
| |
| <li><code>export AXIS2C_HOME</code></li> |
| |
| <p><strong>Note:</strong> You will have to set AXIS2C_HOME only if you |
| |
| want to run the Axis2/C samples. The reason is that the samples use |
| |
| AXIS2C_HOME to get the path to the Axis2/C repository. This is not |
| |
| required to write your own services or clients.</p> |
| |
| </ul> |
| |
| </li> |
| |
| <li>Then go to the folder where you extracted the source. |
| |
| <ul> |
| |
| <li><code>cd /your_path_to_axis2c_source</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>Build the source |
| |
| <ul> |
| |
| <li>This can be done using the following command sequence, in the |
| |
| directory where you have extracted the source: |
| |
| <ul> |
| |
| <li><code>./configure</code></li> |
| |
| <li><code>make</code></li> |
| |
| <li><code>make install</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>Use <code>./configure --help</code> for possible command line options.</li> |
| |
| <li><strong>Note:</strong> If you do not provide a <code>--prefix</code> configure |
| |
| option, the default installation would be in the /usr/local/axis2c |
| |
| directory.</li> |
| |
| <li>You may have to try Axis2/C with Guththila XML parser. You can do |
| |
| that by providing the <code>--enable-guththila=yes</code> option when configuring. |
| |
| <ul> |
| |
| <li><code>./configure --enable-guththila=yes</code> [other configuration |
| |
| options]</li> |
| |
| <li><code>make</code></li> |
| |
| <li><code>make install</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>If you want to get the samples working, you have to build the |
| |
| samples. <br></br> |
| |
| To build the samples: |
| |
| <ul> |
| |
| <li><code>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path_you_installed_axis2c/lib/</code></li> |
| |
| <li><code>export LD_LIBRARY_PATH</code></li> |
| |
| <li><code>cd samples</code></li> |
| <li><code>./configure --prefix=${AXIS2C_HOME} |
| --with-axis2=${AXIS2C_HOME}/include/axis2-1.2</code></li> |
| |
| <li><code>make</code></li> |
| |
| <li><code>make install</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>Please run <code>./configure --help</code> in the samples folder for more |
| |
| information on the configure options.</li> |
| |
| <li><strong>Note:</strong> If you do not provide a <code>--prefix</code> configure |
| |
| option, by default, the samples will be installed into the |
| |
| "/usr/local/axis2c/bin/samples" directory.</li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>Go to where you installed Axis2/C.</li> |
| |
| <li>Start the simple axis server. |
| |
| <ul> |
| |
| <li>To start the simple axis server on port 9090, run the following |
| |
| command lines. |
| |
| <ul> |
| |
| <li><code>cd /path_you_installed_axis2c/bin</code></li> |
| |
| <li><code>./axis2_http_server</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>To see the possible command line options, run <code>./axis2_http_server |
| |
| -h</code></li> |
| |
| <li><strong>Note:</strong> You may have to be logged in as a superuser |
| |
| to run the simple axis server if you installed Axis2/C as a super |
| |
| user.</li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>Run the sample clients in a new shell using the following command lines. |
| |
| <ul> |
| |
| <li><code>cd /path_you_installed_axis2c/bin/samples</code></li> |
| |
| <li>To run the client for the echo service |
| |
| <ul> |
| |
| <li><code>./echo</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>To run the client for the math service |
| |
| <ul> |
| |
| <li><code>./math</code></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>To see the possible command line options for the sample clients, |
| |
| run them with the '-h' option</li> |
| |
| </ul> |
| |
| </li> |
| |
| </ol><p style="margin-bottom: 0in"><br></br> |
| </p><p><a id="win"></a></p></div></div><div class="section"><a name="2__Installing_and_Running_on_Microsoft_Windows"></a><h2>2. Installing and Running on Microsoft Windows</h2><p>This too can be done using binary or source distributions. (<a href="http://ws.apache.org/axis2/c/download.cgi" class="externalLink" title="External Link">Download</a> the two |
| |
| distributions.) </p><p>For both binary and source distributions, you have to download <a href="http://www.zlatkovic.com/pub/libxml/" class="externalLink" title="External Link">Libxml2</a>, if you are not using Guththila parser which comes with the distribution.</p><p><a id="win_binary"></a></p><div class="subsection"><a name="2_1__Installing_the_Binary_Distribution"></a><h3>2.1. Installing the Binary Distribution</h3></div><div class="subsection"><a name="2_1_1__Requirements"></a><h3>2.1.1. Requirements</h3><ul> |
| |
| <li>The binaries shipped with this version are compiled with the Microsoft |
| |
| Visual Studio compiler (cl)</li> |
| |
| |
| |
| <p>(<strong>Note</strong>: you can <a href="http://msdn.microsoft.com/vstudio/express/downloads/" class="externalLink" title="External Link">download the |
| |
| Microsoft VSExpress2005 edition</a> from the Microsoft Web site and install |
| |
| it to run these binaries.)</p> |
| |
| <li>You also need the following DLLs: |
| |
| <ul> |
| |
| <li>libxml2.dll [http://www.zlatkovic.com/pub/libxml/ - download the version >= |
| |
| libxml2-2.6.27.win32] (optional - required only if you are not using Guththila parser)</li> |
| |
| <li>iconv.dll [http://www.zlatkovic.com/pub/libxml/ - download the |
| |
| version >= iconv-1.9.1.win32]</li> |
| |
| <li>zlib1.dll [http://www.zlatkovic.com/pub/libxml/ - download the version >= |
| |
| zlib-1.2.3.win32]</li> |
| |
| </ul> |
| |
| </li> |
| |
| </ul><p><a id="bin_binaries"></a></p></div><div class="subsection"><a name="2_1_2__Binaries_in_the_Release"></a><h3>2.1.2. Binaries in the Release</h3><ul> |
| |
| <li>Extract the binary distribution to a folder of your choice. (example: |
| |
| C:\axis2c)</li> |
| |
| <li>The C:\axis2c folder structure is as follows:</li> |
| |
| |
| |
| <p><img alt="Figure: c:\axis2c Folder Structure" src="images/binary_folder_structure.jpg"></img></p> |
| |
| |
| |
| <p><em>The above folders contain the following files:</em></p> |
| |
| <ul> |
| |
| <li>bin - server and other executables</li> |
| |
| <li>bin\samples - client samples </li> |
| |
| <li>lib - library modules</li> |
| |
| <li>services - deployed services</li> |
| |
| <li>modules - deployed modules</li> |
| |
| <li>include - all Include files of Axis2/C</li> |
| |
| <li>logs - system and client logs are written to this folder</li> |
| |
| </ul> |
| |
| <li>Copy libxml2.dll, iconv.dll, and zlib1.dll downloaded to |
| |
| C:\axis2c\lib</li> |
| |
| </ul><p><a id="bin_run"></a></p></div><div class="subsection"><a name="2_1_3__Running_the_Binaries"></a><h3>2.1.3. Running the Binaries</h3><ul> |
| |
| <li>First, you need to set a couple of environment variables before you can |
| |
| run the server and samples. |
| |
| <ul> |
| |
| <li>Set the variable AXIS2C_HOME to the deploy folder (C:\axis2c)</li> |
| |
| <li>Add the path to the lib directory to the PATH variable |
| |
| (%AXIS2C_HOME%\lib)</li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>Now everything is set to run the server. |
| |
| <p>C:\axis2c\bin\>axis2_http_server.exe</p> |
| |
| </li> |
| |
| <li>If the server is running successfully, you will see the message |
| |
| "Started Simple Axis2 HTTP Server..."</li> |
| |
| <li>By default, the log is created in the %AXIS2C_HOME%\logs folder with |
| |
| the name axis2.log.</li> |
| |
| <li>(<strong>Note</strong>: You can provide command line options to change |
| |
| the default behavior. Use the command <code>axis2_http_server.exe -h</code> to learn |
| |
| about the usage)</li> |
| |
| <li>Now you can run any sample client located in %AXIS2C_HOME%\bin\samples\ |
| |
| <ul> |
| |
| <li>Example: C:\axis2c\bin\samples\> echo.exe</li> |
| |
| </ul> |
| |
| </li> |
| |
| </ul><p><a id="win_source"></a></p></div><div class="subsection"><a name="2_2__Installing_the_Source_Distribution"></a><h3>2.2. Installing the Source Distribution</h3></div><div class="subsection"><a name="2_2_1__Requirements"></a><h3>2.2.1. Requirements</h3><ul> |
| |
| <li>The makefile shipped with this version needs Microsoft Visual Studio |
| |
| Compiler (cl) and the NMake build tool.</li> |
| |
| |
| |
| <p>(Note: You can <a href="http://msdn.microsoft.com/vstudio/express/downloads/" class="externalLink" title="External Link">download the |
| |
| Microsoft VSExpress2005 edition and Platform SDK</a> from the Microsoft Web |
| |
| site. You will need to add the path to the Platform SDK Include and Lib |
| |
| folders to the makefile)</p> |
| |
| <li>You also need |
| |
| <ul> |
| |
| <li>libxml2 [http://www.zlatkovic.com/pub/libxml/ - download the version >= |
| |
| libxml2-2.6.27.win32] (optional - required only if you are not using Guththila parser)</li> |
| |
| <li>iconv [http://www.zlatkovic.com/pub/libxml/ - download the version |
| |
| >= iconv-1.9.1.win32]</li> |
| |
| <li>zlib [http://www.zlatkovic.com/pub/libxml/ - download the version >= |
| |
| zlib-1.2.3.win32]</li> |
| |
| </ul> |
| |
| </li> |
| |
| </ul><p><a id="edit"></a></p></div><div class="subsection"><a name="2_2_2__Editing_the_configure_in_File"></a><h3>2.2.2. Editing the configure.in File</h3><p>Please edit the <source_distribution>\build\win32\configure.in file |
| |
| to include the following information.</p><p>The paths for the following required external libraries are specified in configure.in. Please note that you need to specify the path to the extracted folder.<br></br> |
| |
| <ul> |
| |
| <li>libxml2 (required if you are not using Guththila) [LIBXML2_BIN_DIR]<br></br></li> |
| |
| <li>iconv [ICONV_BIN_DIR]<br></br></li> |
| |
| <li>zlib [ZLIB_BIN_DIR]<br></br></li> |
| |
| </ul> |
| |
| </p><p>The default paths for these external libraries are already specified in configure.in file.<br></br> |
| |
| Example: If libxml2 is installed into C:\libxml2, edit the |
| |
| configure.in file accordingly.<br></br> |
| |
| <br></br> |
| |
| You can either extract libxml2 to this folder, in which case the folder |
| |
| structure for C:\libxml2 should look like the following:</p><p><img alt="Figure: C:\libxml2 Folder Structure" src="images/folder_structure_libxml2.jpg"></img><br></br> |
| |
| Else, extract it to a location of your choice and edit the configure.in |
| |
| file accordingly.<br></br> |
| |
| <br></br> |
| |
| If you need the parser to use Guththila XML parser, set the |
| |
| ENABLE_GUTHTHILA option to 1 in configure.in |
| |
| file.<br></br> |
| |
| Example: <code>ENABLE_GUTHTHILA = 1</code><br></br> |
| |
| <br></br> |
| |
| <b>Other options available:</b><br></br> |
| |
| If you want to enable SSL client support, set ENABLE_SSL to 1 and set the path where OpenSSL is installed to OPENSSL_BIN_DIR.<br></br> |
| |
| <br></br> |
| |
| If you want to enable <a href="http://curl.haxx.se/" class="externalLink" title="External Link">libcurl</a> based client transport, set ENABLE_LIBCURL to 1 and set the path where libcurl is installed to LIBCURL_BIN_DIR.<br></br> |
| |
| </p><p><a id="src_compile"></a></p></div><div class="subsection"><a name="2_2_3__Compiling_the_Source"></a><h3>2.2.3. Compiling the Source</h3><p>The following steps will take you through the source compilation.</p><ul> |
| |
| <li>Extract the source distribution to a folder of your choice. (Example: |
| |
| C:\axis2c)</li> |
| |
| <li>Edit the configure.in file as explained in the section 2.2.3</li> |
| |
| <li>Open a DOS shell</li> |
| |
| <li><code>cd C:\axis2c\build\win32</code></li> |
| |
| <li>to access .Net tools, run |
| |
| <ul> |
| |
| <li>C:\axis2c\build\win32> vcvars32.bat</li> |
| |
| </ul> |
| |
| <p>(<strong>Note</strong>: You may have to set the PATH environment |
| |
| variable to vcvars32.bat if MS Windows gives an error indicating that it |
| |
| cannot find this batch file. This file is located in <your MS Visual |
| |
| Studio install Directory>\VC\bin directory.)</p> |
| |
| </li> |
| |
| <li>To build the system and create the binary files in a directory named |
| |
| deploy under the build directory, |
| |
| <ul> |
| |
| <li>C:\axis2c\build\win32>nmake install</li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>The deploy folder structure is as follows:</li> |
| |
| |
| |
| <p><img alt="Figure: deploy Folder Structure" src="images/folder_structure.jpg"></img></p> |
| |
| |
| |
| <p><em>The above folders contain the following files:</em></p> |
| |
| <ul> |
| |
| <li>bin - server and other executable</li> |
| |
| <li>bin\samples - client samples</li> |
| |
| <li>lib - library modules</li> |
| |
| <li>services - deployed services</li> |
| |
| <li>modules - deployed modules</li> |
| |
| <li>include - all include files of Axis2 C</li> |
| |
| <li>logs - system and client logs are written to this folder</li> |
| |
| </ul> |
| |
| </ul><p>Please note that <code>nmake install</code> does not build the apache or the IIS module. Refer to <a href="axis2c_manual.html">Axis2/C manual</a> to see how to install these modules.</p><p> |
| |
| |
| |
| <a id="src_run"></a> |
| |
| |
| |
| </p></div><div class="subsection"><a name="2_2_4__Running_the_Binaries"></a><h3>2.2.4. Running the Binaries</h3><ul> |
| |
| <li>You need to set a couple of environment variables before you can run |
| |
| the server and samples. |
| |
| <ul> |
| |
| <li>Set the variable AXIS2C_HOME to the deploy folder |
| |
| (C:\axis2c\build\deploy)</li> |
| |
| <li>Add the path to the lib directory to the PATH variable |
| |
| (%AXIS2C_HOME%\lib)</li> |
| |
| <li>Copy libxml2.dll, iconv.dll and zlib1.dll to Axis2/C lib folder |
| |
| (%AXIS2C_HOME%\lib)</li> |
| |
| </ul> |
| |
| </li> |
| |
| <li>Now run the server - C:\axis2c\build\deploy\bin> |
| |
| axis2_http_server.exe</li> |
| |
| <li>If the server is running successfully, you will see the message |
| |
| "Started Simple Axis2 HTTP Server..."</li> |
| |
| <li>By default, the log is created under the %AXIS2C_HOME%\logs folder with |
| |
| the name axis2.log.</li> |
| |
| <li>(<strong>Note</strong>: You can provide command line options to change |
| |
| the default behavior. Use the command "axis2_http_server.exe -h" to learn |
| |
| about the usage)</li> |
| |
| <li>Now you can run any sample client deployed under |
| |
| %AXIS2C_HOME%\bin\samples\ |
| |
| <ul> |
| |
| <li>Example: C:\axis2c\build\deploy\bin\samples> echo.exe</li> |
| |
| </ul> |
| |
| </li> |
| |
| </ul></div></div></div></div><div class="clear"><hr></hr></div></body></html> |