Setting Up a Work Environment for ActiveBPEL
From InstallationWiki
| Official Page |
| Project Documentation |
| Download |
|
Contents |
[edit] Setting Up Your Work Environment
In this tutorial, we are going to install the following software components:
- A Web/PHP server with the PHP SOAP extension enabled
- Oracle Database XE or MySQL server
- Apache Tomcat 5.x
- ActiveBPEL engine
- ActiveBPEL Designer
It's important to note that all the above software can be downloaded and used for free. This tutorial takes you through the steps needed to install and configure the above software components.
[edit] Installing Apache HTTP Server
Before you can install PHP, you must have a Web server installed and working in your system. Although PHP has support for most of the Web servers worth mentioning, Apache/PHP remains the most popular combination among developers.
The Apache HTTP server is distributed under the Apache License, a free software/open‑source license whose current version can be found on the Licenses page of the Apache website at: http://www.apache.org/licenses/.
You can download the Apache HTTP server from the download page of the Apache website at: http://httpd.apache.org/download.cgi.
Installing Apache is a very easy process. On Windows, if you have downloaded the version of Apache for Windows with the .msi extension (the recommended way), you just run the Apache .msi file and then follow the Wizard. On Unix-like systems, once you have downloaded a source version of the Apache HTTP server, you perform the standard operations that you normally deal with when it comes to installing new software from sources: extract, configure, compile, and install.
Once you have Apache installed and configured, you can start it. On Windows, Apache is normally run as a service. You can configure the service startup by choosing Automatic, Manual, or Disabled. On Unix-like systems, Apache, the httpd program, is run as a demon. It is recommended that you use the apachectl control script to invoke the httpd executable:
# /usr/local/apache2/bin/apachectl start
To make sure that your Web server is up and running on your machine, open your Web browser to the URL: http://localhost/.
The following figure shows the default page of Apache Web server.
Now that you have your Web server up and running, you can move on to the next step, obtaining and installing PHP.
[edit] Installing PHP
The current recommended releases of PHP are available for download from the downloads page of the php.net site at:
http://www.php.net/downloads.php
From this page, you can download the latest stable release of PHP 5 and then follow the steps shown below to install PHP in your system. For further assistance along the way, you may consult the Installation and Configuration manual available on the php.net website at: http://www.php.net/manual/install.php. Alternatively, you might read the install.txt file that is shipped with PHP.
[edit] Installing PHP on Windows
Here are the basic installation steps for PHP 5 on Windows:
- Extract the distribution file into the
c:\phpdirectory. - Add the
C:\phpdirectory to the PATH to makephp5ts.dllavailable to the Web server modules. - Rename
php.ini-recommendedtophp.ini. - In
php.ini, set thedoc_rootto your Apachehtdocsdirectory. For example: doc_root = c:\Program Files\Apache Group\Apache2\htdocs - In
php.ini, uncomment the SOAP extension line in theWindowsExtensionssection: extension=php_soap.dll - In
php.ini, uncomment the OCI8 extension line: extension=php_oci8.dll Note - If you're going to use MySQL, you need to uncomment theextension=php_mysql.dllandextension=php_mysqli.dlllines inphp.iniinstead. - In
php.ini, set theextension_dirdirective to the directory in which the extention DLLs reside: extension_dir= c:\php\ext - In the Apache
httpd.confconfiguration file, to install PHP as an Apache module, insert two lines that lookslike this:LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php
- In the Apache
httpd.confconfiguration file, configure the path tophp.ini: PHPIniDir "C:/php" - Restart Apache.
As an alternative to the above manual installation, you might use the Windows PHP installer that is also available from the downloads page of the php.net website.
Note - Although the Windows PHP installer is the fastest way to make PHP work, it doesn't allow you to set every option as you might want to. So, using the installer isn't the recommended method for installing PHP.
Once you have PHP installed on your Windows system, you might want to set some extensions for added functionality. It is important to note that many extensions are built into the Windows version of PHP. To use these extensions, you just uncomment them in the php.ini configuration file no additional DLLs are required. However, some of the extensions require extra DLLs to work. For example, the PHP OCI8 extension needs the Oracle Client libraries if you have your Oracle database and Web server running on different machines. The above steps assume that you have both the database and Web server installed on the same computer. In this case, you already have all the required Oracle components, and no Instant Client is required.
[edit] Installing PHP on Unix-Like Systems
Here are basic installation steps for PHP 5 on Unix-like systems:
- Extract the distribution file:
# gunzip php-5xx.tar.gz # tar -xvf php-5xx.tar
- Change dir to the directory containing the PHP sources: # cd php-5xx
- Set the
ORACLE_HOMEenvironment variable: # export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server - Configure your PHP installation:
# ./configure \ --with-oci8=$ORACLE_HOME \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-config-file-path=/usr/local/apache2/conf \ --enable-sigchild --enable-soap
Note - If you're going to use MySQL, you must use
--with-mysqland--with-mysqli=mysql_config_path/mysql_configconfiguration options, wheremysql_config_pathis the path to themysql_configprogram that comes with MySQL. - Compile and then install PHP:
# make # make install
- Set up
php.ini: # cp php.ini-dist /usr/local/lib/php.ini - Edit the
httpd.confApache configuration file to load the PHP module into Apache: LoadModule php5_module modules/libphp5.so - In
httpd.conf, add handlers for files with the.phpand.phpsextensions:AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
- Restart Apache: # usr/local/apache2/bin/apachectl start
By now you should have a working Apache/PHP Web server.
[edit] Installing MySQL
Installing MySQL is a very straightforward process. The following sections explain how to install MySQL on Windows and Linux.
[edit] Installing MySQL on Windows
Here are the basic steps to install MySQL on Windows:
- Download the MySQL distribution from http://dev.mysql.com/downloads/mysql/5.1.html, picking up the
WindowsEssentialsfile from the Windows downloads section on the page. This file contains the minimum set of files needed to install MySQL, including the Configuration Wizard. If you want to download the package containing all the MySQL components, consider the Complete Package available on the same page and packed within a ZIP archive:mysql-5.1.xx-beta-win32.zip. Note - The above URL assumes that you download MySQL 5.1. At the time of this writing, though, MySQL 6.0 is available. You can download MySQL 6.0 from http://dev.mysql.com/downloads/mysql/6.0.html. - Execute the downloaded
mysql-essential-5.1.xx-beta-win32.msiorSetup.exeextracted frommysql-5.1.xx-beta-win32.zip, in order to install MySQL. - In the Setup Type page of the MySQL Installation Wizard, you have to choose Typical, Complete, or Custom.
- In the Confirmation dialog, click the Install button to start the installation.
- After the installation is completed, on the final screen of the installer, make sure that the Configure the MySQL Server now checkbox is checked, and click Finish. As a result, the MySQL Configuration Wizard will be launched.
- In the Configuration Type dialog of the Configuration Wizard, choose the Standard Configuration option if you want to get started with MySQL quickly. Note - The following steps assume that you choose the Standard Configuration option in the preceding step.
- In the next dialog, make sure that the Install As Windows Service option is selected.
- In the next dialog, you have to set the root password.
- In the final dialog on the MySQL Configuration Wizard, click the Execute button to start the configuration process.
Once you've completed these steps, you should have the MySQL server up and running on your machine.
[edit] Installing MySQL on Linux
Here are basic installation steps for MySQL on Linux:
- Download the MySQL distribution from http://dev.mysql.com/downloads/mysql/5.1.html, picking up RPMs for
ServerandClientfrom the appropriate section. These packages are required for a standard minimal installation. Note - Using the RPM packages is the recommended way to install MySQL on Linux. The following steps assume that your Linux supports RPMs. - Perform the following commands to install the above RPMs:
# rpm -i MySQL-server-VERSION.i386.rpm # rpm -i MySQL-client-VERSION.i386.rpm
Note - By default, the server RPM creates and adds the entries to
/etc/init.d/, which are required to start themysqldserver automatically at boot time. - After the installation, it is highly recommended that you assign a password to the anonimous accounts:
# mysql -u root mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('new_pswd'); mysql> SET PASSWORD FOR ''@'your_hostname' = PASSWORD('new_pswd');
Once you've completed these steps, you should have the MySQL server up and running on your machine.
[edit] Installing Oracle Database Express Edition (XE)
If you want to use a free edition of Oracle database, consider Oracle Database Express Edition a lightweight Oracle database that is free to develop, deploy, and distribute. The following sections describe the basic installation steps for this Oracle Database edition on Windows and on Linux.
Once you have completed the following installation steps, you will have an Oracle Database XE Server (including an Oracle database), Oracle Database XE Client, and SQL*Plus installed on your computer.
[edit] Installing Oracle Database XE on Windows
Here are the installation steps for Oracle Database 10g Express Edition on Windows:
- Log in to Windows as a user of the Administrators group.
- Make sure that the
ORACLE_HOMEenvironment variable is not set in your system. Otherwise delete it. This can be done from theSystemPropertiesdialog, which can be invoked from Control Panel/System. - Double-click the Oracle Database XE installation executable downloaded from OTN to run Oracle Database XE Server installer. The following figure shows the screen of the Oracle Database XE Server installer after you run it.
- In the Welcome window of the Wizard, click Next.
- In the License Agreement window, click I accept and then click Next.
- In the Choose Destination Location window, choose the directory for installation and click Next.
- If at least one of the port numbers 1521, 2030, and 8080 is already in use in your system, you will be prompted to enter an available port number. Otherwise, the above numbers will be used automatically.
- In the Specify Database Passwords window, enter the passwords for the SYS and SYSTEM database accounts and click Next.
- In the Summary window, click Install to proceed to installation, or Back to turn back and modify the settings.
- After the installation is complete, click Finish.
That is it. Your database is up and ready for use now.
[edit] Installing Oracle Database XE on Linux
Here are the installation steps for Oracle Database 10g Express Edition on Linux:
- Log in to your computer as root.
- Change directory to the one in which you downloaded the Oracle Database XE
oracle-xe-10.2.0.1-1.0.i386.rpminstallation executable and install the RPM:$rpm-ivhoracle-xe-10.2.0.1-1.0.i386.rpm. - When prompted, run the following command to configure the database:
$/etc/init.d/oracle-xeconfigure. - When entering configuration information, accept the default port numbers for the Oracle Database XE graphical user interface and Oracle database listener: 8080 and 1521 respectively. Also, enter and confirm the passwords for the
SYSandSYSTEMdefault user accounts.
Note - If, when configuring the database, you select Yes when asked whether you want the database to automatically start along with the computer, then the database is up and ready for use now. Otherwise you have to start it manually as follows: $ /etc/init.d/oracle-xe start.
[edit] Installing Apache Tomcat 5.5
Before you can install ActiveBPEL engine, you need to install a servlet container. According to the documentation, ActiveBPEL engine has been tested with Apache Tomcat 5.x. The following sections discuss how to install Apache Tomcat 5.5 on Windows and on Linux.
Note - For details concerning installing Apache Tomcat 5.5 for running on different platforms, you can refer to http://tomcat.apache.org/tomcat-5.5-doc/setup.html.
[edit] Installing Apache Tomcat 5.5 on Windows
Here are the steps for installing Tomcat 5.5 on Windows:
- Download Apache Tomcat 5.5 from
http://tomcat.apache.org/download-55.cgi, picking up theapache‑tomcat-5.5.xx.exefile from the Binary Distribution/Core section. - Run the downloaded
apache-tomcat-5.5.xx.exeto launch the Installation Wizard. - In the Choose Components dialog, make sure that the Normal installation option is selected, and click Next.
- In the Configuration dialog, you may need to change the value of the HTTP 1.1/Connector Port, set by default to 8080. For example, if you have an Oracle database installed on your machine, Oracle XML DB HTTP server may already use port 8080. So, you may choose 8081 for the Tomcat server port. In this page, also make sure to specify the password for the Administrator user.
- In the next dialog, you have to specify the path to the J2SE 5 JRE installed on your computer, and click Install.
After the above steps are completed, you will have the Tomcat server installed in your system as a Windows service.
[edit] Installing Apache Tomcat 5.5 on Linux
Here are the steps for installing Tomcat 5.5 on Linux:
- Get the binary distribution of Apache Tomcat 5.5 from http://tomcat.apache.org/download-55.cgi. In particular, you will need the
Coretar.gzpackage. - Unzip the package as follows: # tar -xzf apache-tomcat-5.5.xx.tar.gz
- Create a simlink to the Tomcat directory:
# ln -s apache-tomcat-5.5.xx tomcat
Note - Before you can run Tomcat, you should have the
CATALINA_HOMEenvironment variable set to the directory in which you installed Tomcat, say,/opt/tomcat, andJAVA_HOMEset to the base path of the JDK installed in your system. - If you need to change the Tomcat port set by default to
8080, open theCATALINA_HOME/conf/server.xmlconfiguration file and set theportattribute of theConnectorelement to an appropriate value, say8081. - To start Tomcat, you should run the following script: # $CATALINA_HOME/bin/startup.sh
After performing these steps, you should have the Tomcat 5.5 servlet container installed and configured on your machine.
[edit] Installing the ActiveBPEL Engine
As mentioned, you need to have a servlet container installed and properly configured before you can install the ActiveBPEL engine. The next steps assume that you have installed and configured Tomcat 5.x as discussed in the preceding sections.
Note - For detailed information on how to install the ActiveBPEL engine, you can refer to http://www.active-endpoints.com/installation-guide.htm.
- To download the ActiveBPEL engine, you can start with the home page of the Active Endpoints website at http://www.active-endpoints.com/. In this page, click the ActiveBPEL Open Source Engine link under the free downloads section. As a result, you will be taken to the Download Terms and Conditions page, where you should examine Terms of Use. If you select Accept and then click the Submit button, you will be directed to the ActiveBPEL Engine Download page, on which you can select the latest version of the ActiveBPEL engine and download the ZIP archive.
- Extract the distribution from the downloaded archive, putting the files in any directory.
- Change the current directory to the one containing the ActiveBPEL engine files extracted in the preceding step, and run the
install.batscript on Windows orinstall.shon Linux. This might look like the following on Windows: - Restart Apache: # usr/local/apache2/bin/apachectl start
These steps complete the ActiveBPEL engine installation. The ActiveBPEL engine will automatically start with the servlet container.
The install script executed in the penultimate step creates the $CATALINA_HOME/bpr directory to which you will deploy your ActiveBPEL projects as bpr archives.
[edit] Installing ActiveBPEL Designer
Here are the general steps to install ActiveBPEL Designer:
- To download ActiveBPEL Designer, you can start with the home page of the Active Endpoints website at http://www.active-endpoints.com/. In this page, click the ActiveBPEL Designer link under the free downloads section. As a result, you will be taken to the Product Download Form page, where you should select the ActiveBPEL Designer x.x checkbox and fill out the form below and then click the Submit button. As a result, you will be directed to the Thank you page.
- The Thank you page informs you that your submission has been received and, upon approval, the product download and installation instructions will be sent to the email address submitted.
- To complete the installation, follow the steps in the email received.
Note - Note that the ActiveBPEL Designer ships with the Tomcat/ActiveBPEL Server. So, if you've installed ActiveBPEL Designer, you don't need to have a separate Tomcat/ActiveBPEL Server installation.
[edit] Additional References
- For instructions on Troubleshooting WS-BPEL, click here
[edit] Source
The source of this content is Appendix A: Setting Up Your Work Environment of SOA and WS-BPEL by Yuli Vasiliev (Packt Publishing, 2007).
