blob: f00f697184824192c11fda1b0920312b92a34c19 [file] [log] [blame]
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Installation Guide</title>
</head>
<body>
<h1>Apache Axis2/C Installation Guide</h1>
<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">Axis2 site</a>.) Please
remember to prefix the subject with [Axis2].</p>
<p style="margin-bottom: 0in"><br>
</p>
<h1>Contents</h1>
<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>
</p>
<a id="linux"></a>
<h1>1. Installing and Running on Linux</h1>
<p>This can be done using binary or source distributions. (<a
href="http://ws.apache.org/axis2/c/download.cgi">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">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>
<a id="linux_binary"></a>
<h2>1.1. Installing the Binary Distribution</h2>
<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>
<a id="linux_source"></a>
<h2>1.2. Installing the Source Distribution</h2>
<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 />
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>
</p>
<a id="win"></a>
<h1>2. Installing and Running on Microsoft Windows</h1>
<p>This too can be done using binary or source distributions. (<a
href="http://ws.apache.org/axis2/c/download.cgi">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/">Libxml2</a>, if you are not using Guththila parser which comes with the distribution.</p>
<a id="win_binary"></a>
<h2>2.1. Installing the Binary Distribution </h2>
<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/">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 &gt;=
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 &gt;= iconv-1.9.1.win32]</li>
<li>zlib1.dll [http://www.zlatkovic.com/pub/libxml/ - download the version &gt;=
zlib-1.2.3.win32]</li>
</ul>
</li>
</ul>
<a id="bin_binaries"></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" /></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>
<a id="bin_run"></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\&gt;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\&gt; echo.exe</li>
</ul>
</li>
</ul>
<a id="win_source"></a>
<h2>2.2. Installing the Source Distribution</h2>
<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/">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 &gt;=
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
&gt;= iconv-1.9.1.win32]</li>
<li>zlib [http://www.zlatkovic.com/pub/libxml/ - download the version &gt;=
zlib-1.2.3.win32]</li>
</ul>
</li>
</ul>
<a id="edit"></a>
<h3>2.2.2. Editing the configure.in File</h3>
<p>Please edit the &lt;source_distribution&gt;\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 />
<ul>
<li>libxml2 (required if you are not using Guththila) [LIBXML2_BIN_DIR]<br /></li>
<li>iconv [ICONV_BIN_DIR]<br /></li>
<li>zlib [ZLIB_BIN_DIR]<br /></li>
</ul>
<p>The default paths for these external libraries are already specified in configure.in file.<br />
Example: If libxml2 is installed into C:\libxml2, edit the
configure.in file accordingly.<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" /><br />
Else, extract it to a location of your choice and edit the configure.in
file accordingly.<br />
<br />
If you need the parser to use Guththila XML parser, set the
ENABLE_GUTHTHILA option to 1 in configure.in
file.<br />
Example: <code>ENABLE_GUTHTHILA = 1</code><br />
<br />
<b>Other options available:</b><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 />
If you want to enable <a href="http://curl.haxx.se/">libcurl</a> based client transport, set ENABLE_LIBCURL to 1 and set the path where libcurl is installed to LIBCURL_BIN_DIR.<br />
</p>
<a id="src_compile"></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&gt; 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 &lt;your MS Visual
Studio install Directory&gt;\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&gt;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" /></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>
<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&gt;
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&gt; echo.exe</li>
</ul>
</li>
</ul>
</body>
</html>