blob: 2cc5811937cfdf64adf41050bd10adef440c46a7 [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>
<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>
<a id="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">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>
<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>AXIS2C_HOME='/your_path_to_axis2c'</li>
<li>export AXIS2C_HOME</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>cd /your_path_to_axis2c/bin</li>
<li>./axis2_http_server</li>
</ul>
</li>
<li>To see the possible command line options run ./axis2_http_server -h
<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>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your_path_to_axis2c/lib</li>
<li>export LD_LIBRARY_PATH</li>
</ul>
</li>
</ul>
</li>
<li>Run the sample clients in a new shell
<ul>
<li>cd /your_path_to_axis2c/bin/samples</li>
<li>To run the client for echo service
<ul>
<li>./echo</li>
</ul>
</li>
<li>To run the client for math service
<ul>
<li>./math</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>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your_path_to_axis2c/lib</li>
<li>export LD_LIBRARY_PATH</li>
</ul>
</ul>
</li>
</ol>
<a id="linux_source"></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>AXIS2C_HOME='/your_desired_path_to_axis2c_installation'</li>
<li>export AXIS2C_HOME</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>cd /your_path_to_axis2c_source</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>./configure</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Use './configure --help' for possible command line options.</li>
<li><strong>Note:</strong> If you do not provide a --prefix 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 --enable-guththila=yes option when configuring.
<ul>
<li>./configure --enable-guththila=yes [other configuration
options]</li>
<li>make</li>
<li>make install</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>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path_you_installed_axis2c/lib/</li>
<li>export LD_LIBRARY_PATH</li>
<li>cd samples</li>
<li>./configure --prefix=${AXIS2C_HOME}
--with-axis2_util=${AXIS2C_HOME}/include
--with-axiom=${AXIS2C_HOME}/include</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Please run "./configure --help" in the samples folder for more
information on the configure options.</li>
<li><strong>Note:</strong> If you do not provide a --prefix 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>cd /path_you_installed_axis2c/bin</li>
<li>./axis2_http_server</li>
</ul>
</li>
<li>To see the possible command line options, run ./axis2_http_server
-h</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>cd /path_you_installed_axis2c/bin/samples</li>
<li>To run the client for the echo service
<ul>
<li>./echo</li>
</ul>
</li>
<li>To run the client for the math service
<ul>
<li>./math</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>
<a id="win"></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">Download</a> the two
distributions.) </p>
<p>For both binary and source distributions, you have to download <a
href="http://xmlsoft.org/downloads.html">Libxml2</a>.</p>
<a id="win_binary"></a>
<h3>2. 1. Installing the Binary Distribution </h3>
<h4>2.1.1. Requirements</h4>
<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.xmlsoft.org - download the version &gt;=
libxml2-2.6.27.win32]</li>
<li>iconv.dll [http://www.gnu.org/software/libiconv/ - download the
version &gt;= iconv-1.9.1.win32]</li>
<li>zlib1.dll [http://www.gzip.org/zlib/ - download the version &gt;=
zlib-1.2.3.win32]</li>
</ul>
</li>
</ul>
<a id="bin_binaries"></a>
<h4>2.1.2. Binaries in the Release</h4>
<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>
<h4>2.1.3. Running the Binaries</h4>
<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 "axis2_http_server.exe -h" 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>
<h3>2. 2. Installing Source Distribution</h3>
<h4>2.2.1. Requirements</h4>
<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.xmlsoft.org - download the version &gt;=
libxml2-2.6.27.win32]</li>
<li>iconv [http://www.gnu.org/software/libiconv/ - download the version
&gt;= iconv-1.9.1.win32]</li>
<li>zlib [http://www.gzip.org/zlib/ - download the version &gt;=
zlib-1.2.3.win32]</li>
</ul>
</li>
</ul>
<a id="edit"></a>
<h4>2.2.3. Editing the configure.in File</h4>
<p>Please edit the &lt;source_distribution&gt;\build\win32\configure.in file
to include the following information.</p>
<ul>
<li>The default paths for Libxml2 and iconv are specified in configure.in
<ul>
<li>Example:If libxml2 is installed into C:\libxml2, edit the
configure.in file accordingly.</li>
</ul>
</li>
<li>You can either extract Libxml2 to this folder, in which case the folder
structure for C:\libxml2 should look like the following:</li>
<p><img alt="Figure: C:\libxml2 Folder Structure"
src="images/folder_structure_libxml2.jpg" /></p>
<p>Else, extract it to a location of your choice and edit the configure.in
file accordingly.</p>
<li>You need to have zlib1.dll in a library path. You may copy this DLL to
libxml2/lib.</li>
<li>If you need the parser to use Guththila XML parser, the
ENABLE_GUTHTHILA option should be set to 1 in configure.in
<ul>
<li>Example: ENABLE_GUTHTHILA = 1</li>
</ul>
</li>
</ul>
<a id="src_compile"></a>
<h4>2.2.4. Compiling the Source</h4>
<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>cd C:\axis2c\build\win32</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>
<a id="src_run"></a>
<h4>2.2.5. Running the Binaries</h4>
<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>