- Berkeley DB XML Reference Guide:
- Berkeley DB XML Binaries for Windows systems
|
 
|
Berkeley DB XML Binaries for Windows systems
Executable files and libraries are available for Berkeley DB XML. They may be downloaded
in the form of a Windows installer package dbxml-2.4.13.msi
which must then be installed.
The binaries are built using Microsoft Visual Studio .NET 2003 and include language bindings
for C++, Java, Python, Perl and PHP. Java is compiled using -target 1.5, Python is compiled
against the 2.5.1 release of ActivePython, Perl is compiled using ActivePerl 5.8.8 and PHP
support is compiled against version 5.2.5 of PHP.
There are several installation options for installing Windows binaries ranging from
a simple runtime-only deployment to a development installation
for all languages. Source code other than examples is not available in the Windows installer
package. If source code is desired one of the source downloads must be used.
Windows Installer Options
When installing Berkeley DB XML using the Windows installer you can choose to install
any or all of a number of options. By default all options are selected.
- Core Runtime. This option includes only the .dll and .exe files
required to run Berkeley DB XML C++ applications. This option can only be used to run already-built
applications; it cannot be used to build new C++ applications. Program Database (.pdb) files
are included for executables and libraries. This option includes the PHP runtime libraries.
- C++ Development. This option bundles the
runtime libraries and adds the header files
and libraries (.lib files) required to compile and link new C++ applications.
- Documentation. This option installs the Berkeley DB XML documentation set.
- Examples. This option installs example programs for all language
bindings.
- Java Runtime. This option installs the Java runtime files (.jar) along with
the core runtime (native) libraries which are also required for Berkeley DB XML Java applications.
- Python Runtime This option installs executables for Python that require
further installation for use. See instructions below.
- Perl Runtime This option installs the core runtime and Perl binaries
which require further installation for use. See instructions below.
Installation Layout
The Windows installer allows a choice of installation location. All paths used
below are relative to that directory. The installation layout is the same as it is
for the default build from source:
- bin -- holds exectuables for the core runtime
- lib -- holds libraries (.lib) for the C++ development option
- include -- holds header files for the C++ development option
- jar -- holds Java jar files for the Java runtime option
- dbxml/doc -- holds the Berkeley DB XML documentation. This is placed in the dbxml
directory for consistency with the build from source
- dbxml/examples -- holds Berkeley DB XML examples for all languages
- perl -- holds Perl binaries
- python -- holds Python binaries
General Note on Using Windows Binaries
Because of the nature of some of the scripting language integrations it
can be necessary to use the same compiler for the scripting language itself
as for language extensions such as Berkeley DB XML support. For this reason the binaries
provided may not work in all cases. If a particular installation has problems
it may be necessary to compile from source in the case of Python, Perl and PHP.
Using C++ Runtime Libraries and Programs
It is necessary to set your PATH to run all Berkeley DB XML C++ and Java applications
PATH needs <InstallDir>/bin.
By default the installer will set the PATH and CLASSPATH of the installing user to
include the relevant directories
and files.
C++ example programs, if installed, can be found in <InstallDir>/dbxml/examples/cxx.
Visual Studio project files for the examples are in <InstallDir>/dbxml/build_windows
and can be used as templates for new applications.
Using Java Binaries
It is necessary to set your PATH and CLASSPATH to run Berkeley DB XML Java applications. CLASSPATH
needs <InstallDir>/jar/db.jar;<InstallDir>/jar/dbxml.jar. See above for PATH
additions. By default the installer will
set the PATH and CLASSPATH of the installing user to include the relevant directories
and files.
Java example programs, if installed, can be found in <InstallDir>/dbxml/examples/java.
Many users develop and deploy Berkeley DB XML Java applications in an application server environment such
as Tomcat. Most of these servers ignore PATH and CLASSPATH for applications (for security reasons)
so it is necessary to follow product-specific instructions for correct application deployment.
Installing and Using Python Binaries
Python binaries are built and packaged in executable files that can be installed
on a machine that has ActivePython 2.5.1 already installed. There are two files that need to be
installed:
- <InstallDir>/python/bsddb3-4.6.2.win32-py2.5.exe -- execute this to install pybsddb release
4.5.0
- <InstallDir>/python/dbxml-2.4.13.win32-py2.5.exe --
execute this to install Berkeley DB XML libraries
The executables above include all of the dependent libraries so it is not necessary
to install either of the core runtime libraries. The installation will fail if Python 2.5
is not installed on the target machine.
Python example programs, if installed, can be found in <InstallDir>/dbxml/examples/python.
A simple smoke test that can be done after installation is running the Python example script <InstallDir>/dbxml/examples/python/basic/helloWorld.py. If this works then your installation is good.
Installing and Using Perl Binaries
Perl binaries are built and bundled into the compressed tar archive file <InstallDir>/perl/dbxml_perl.tar.gz.
There is also an ActivePerl PPD file -- <InstallDir>/perl/dbxml_perl.ppd -- which can be used
by the PPM program for installation. If you have ActivePerl version 5.8.8 installed on your system and it
includes PPM, then you can do this to install the Perl binaries after initial installation:
- change directory to <InstallDir>/perl
- type "ppm install dbxml_perl.ppd"
This will install the Berkeley DB XML Perl binary files in the appropriate location for your system.
Perl example programs, if installed, can be found in <InstallDir>/dbxml/examples/perl/gettingStarted.
When using these examples, always start with loadExamplesData.pl. There is a Readme.txt file
for the gettingStarted examples in this directory.
Using PHP Binaries
There are two shared libraries that comprise the PHP extension modules. These are:
- <InstallDir>/bin/php_db4.dll -- Berkeley DB extension module, compiled
without support for mod_db4
- <InstallDir>/bin/php_dbxml.dll -- Berkeley DB XML extension module
These modules can be used in-place with the proper references from a php.ini file or
other configuration.
PHP example programs, if installed, can be found in <InstallDir>/dbxml/examples/php.
That directory contains a sample php.ini file that needs to be edited in order to work properly.
Instructions are in the file itself. There are 3 lines that need to be adjusted. The first one
starts with "extension_dir" and needs to be uncommented and the path edited to point to the
directory containing the .dll's referenced above, e.g. C:\Program Files\Oracle\Berkeley DB XML 2.4.13\bin. The next two lines simply need to be uncommented to tell PHP to load the shared libraries.
Once this is done you can see if PHP works on the command line by running one of the examples: "php -c . 01.php"
Copyright (c) 1996,2007 Oracle. All rights reserved.