Web Stack Getting Started Guide

compared with
Current by sriram.natarajan
on Oct 26, 2009 11:26.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (831)

View page history
{panel:title=Documentation for the Current Release (Sun GlassFish Web Stack 1.5/OpenSolaris 2009.06) - Final| borderStyle=dashed| borderColor=#FF9900| titleBGColor=#FF9900| bgColor=#FFFFFF}
!pdf.gif! [Getting Started Guide (All Platforms)|http://wikis.sun.com/download/attachments/48125322/GFWSGETSTART.pdf] | \| !pdf.gif! [Getting Started Guide (OpenSolaris 2009.06)|http://wikis.sun.com/download/attachments/48125322/GFWSGETSTART-OSOL.pdf] | \| !pdf.gif! [Getting Started Guide (Solaris 10 OS)|http://wikis.sun.com/download/attachments/48125322/GFWSGETSTART-SOL.pdf] | \| !pdf.gif! [Getting Started Guide (Red Hat Enterprise Linux))|http://wikis.sun.com/download/attachments/48125322/GFWSGETSTART-RHEL.pdf]
----
*What are you looking for?*

* [Getting Started with the *Sun GlassFish Web Stack Enterprise Manager*|http://wikis.sun.com/display/WebStack/Enterprise+Manager+Installation+and+User+Guide]
----
----*Table of Contents*
{toc:outline=true|indent=15px|style=none}
----

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
* {excerpt}* OpenSolaris 2009.06 OS
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}

{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
* {excerpt}* Solaris 10 OS
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}

{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
* {excerpt}* Red Hat Enterprise Linux
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
Throughout this document examples are shown using commands that can be executed from a console (shell). The convention followed in this document is that for commands that needs to be run with super user privileges, {{\#}} notation is used and for commands that can be run as any other user, {{$}} notation is used.

For instance,
{code}# <PERFORM_ADMIN_TASKS>
{code}
# <PERFORM_ADMIN_TASKS>
{code}$ <PERFORM_USER_TASKS>
{code}

{code}
$ <PERFORM_USER_TASKS>
{code}
The Web Stack software includes the following software:

{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}Ruby and Python are not provided as part of the Web Stack software for Red Hat Enterprise Linux. You need to use the interpreters provided by the Red Hat platform.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Getting Web Stack

{excerpt:hidden=true}
\#WITSTarget:START=rhel,solaris
{excerpt}
{note:title=Note}After downloading the Web Stack software (For Red Hat Enterprise Linux and Solaris 10 OS), follow the instructions provided in the [Web Stack Installation and Configuration Guide|http://wikis.sun.com/pages/viewpage.action?pageId=50432140] for information on installing and configuring the stack on a specific platform.
{note}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}Read the following sections for getting the Web Stack software in OpenSolaris 2009.11 OS.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h3. Installing Individual Web Stack Components

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{note:title=Note}Web Stack is fully integrated with OpenSolaris 2009.06 and can be easily installed by using the Package Manager GUI or {{pkg install}} commands.
{note}
 
OpenSolaris 2009.06 release allows you to install Web Stack components individually. The following table lists the packages and the commands necessary to install them.
| Apache 2.2 modules | {{SUNWapch22m-security, SUNWapch22m-jk, SUNWapch22m-fcgid, SUNWapch22m-dtrace, SUNWapch22m-sed}} | {{pkg install SUNWapch22m-security SUNWapch22m-jk SUNWapch22m-fcgid SUNWapch22m-dtrace SUNWapch22m-sed}} |
| PHP5 | {{SUNWphp52, SUNWphp52d, SUNWphp52-mysql, SUNWphp52-pgsql, SUNWapch22m-php52}} | {{pkg install SUNWphp52 SUNWphp52d SUNWphp52-mysql SUNWphp52-pgsql SUNWapch22m-php52}} |
| MySQL 5.1 Server | {{SUNWmysql51}} | {{pkg install SUNWmysql51}} |
| MySQL 5.1 Client Libraries | {{SUNWmysql51lib}} | {{pkg install SUNWmysql51lib}} |
| MySQL 5.1 Regression Tests | {{SUNWmysql51test}} | {{pkg install SUNWmysql51test}} |
| MySQL 5.0 Server | {{SUNWmysql5}} | {{pkg install SUNWmysql5}} |
| MySQL 5.0 Client Libraries | {{SUNWmysql5lib}} | {{pkg install SUNWmysql5lib}} |
| MySQL 5.0 Regression Tests | {{SUNWmysql5test}} | {{pkg install SUNWmysql5test}} |
| Squid | {{SUNWsquid}} | {{pkg install SUNWsquid}} |
| lighttpd | {{SUNWlighttpd14}} | {{pkg install SUNWlighttpd14}} |
| Apache Tomcat Server | {{SUNWtcat}} | {{pkg install SUNWtcat}} |
{note:title=Note}You need to be the {{root}} user to run the previously mentioned commands.
{note}
{note}You can install the components using the Package Manager graphical user interface for IPS. To install, update, and manage packages using the Package Manager, [see this document|http://dlc.sun.com/osol/docs/content/2009.06/IMGPACKAGESYS/].
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris,rhel
{excerpt}
{excerpt}For installing the Web Stack components in Red Hat Enterprise Linux and Solaris 10 OS, see the [Installation Guide|http://wikis.sun.com/display/WebStack/Sun+GlassFish+Web+Stack+1.5+Installation+and+Configuration+Guide#SunGlassFishWebStack1.5InstallationandConfigurationGuide-InstallingSunGlassFishWebStackonSolarisandLinuxPlatforms]
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h3. Installing the Whole Web Stack Bundle

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}If you are an AMP developer, you can download the AMP cluster package, which is a super set of all individual AMP packages. To download the AMP package, execute the following command:
{code}# pkg install amp-dev
{code}
# pkg install amp-dev
{code}
{note:title=Note}For executing the pkg install command, you should be a root user. You can also invoke the pkg install command with pfexec command as a non-root user. For instance, as a non-root user, execute {{pfexec pkg install amp-dev}}.
{note}
{note:title=Note}{{{}amp-dev}} package is the set of all the web stack packages. The approximate size of this package is 650 mega bytes (MB). You need to download and install this package for AMP development. If you are unable to download this package, you can download individual packages as shown in the following sections.
{note}If you need just the AMP runtime components, you can download the {{amp}} package. This package does not include any development environment packages.
 
{note:title=Note}{{amp-dev}} package is the set of all the web stack packages. The approximate size of this package is 650 mega bytes (MB). You need to download and install this package for AMP development. If you are unable to download this package, you can download individual packages as shown in the following sections.
{note}
If you need just the AMP runtime components, you can download the {{amp}} package. This package does not include any development environment packages.
To download and install the amp package, execute the following command:
{code}# pkg install amp
{code}
# pkg install amp
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h3. Available Packages

{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
 
See the [Installation Guide|http://wikis.sun.com/display/WebStack/Sun+GlassFish+Web+Stack+1.5+Installation+and+Configuration+Guide#SunGlassFishWebStack1.5InstallationandConfigurationGuide-InstallingSunGlassFishWebStackonSolarisandLinuxPlatforms] for more information.

{note:title=Note}Always use the Web Stack installer to install individual packages or the whole stack.{note}
 
See the [Web Stack Installation and Configuration Guide|http://wikis.sun.com/pages/viewpage.action?pageId=50432140].
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}See the [Installation Guide|http://wikis.sun.com/display/WebStack/Sun+GlassFish+Web+Stack+1.5+Installation+and+Configuration+Guide#SunGlassFishWebStack1.5InstallationandConfigurationGuide-InstallingSunGlassFishWebStackonSolarisandLinuxPlatforms] for more information.

The following table shows the list of all packages available through the Web Stack software for Red Hat Enterprise Linux:
| MySQL 5.1.30 | {{sun-mysql51-5.1.30}} |
| MySQL Libraries 5.1.30 | {{sun-mysql51lib-5.1.30}} |
| Regression tests for MySQL 5.0.67 | {{sun-mysql50test-5.0.67}} |
| Regression tests for MySQL 5.1.30 | {{sun-mysql51test-5.1.30}} |
| \- | \- |
| PHP 5.2.9 | {{sun-php52-5.2.9}} |
{note:title=Note}Always use the Web Stack installer to install individual packages or the whole stack.
{note}
 
The following list provides you with information on what is *not supported* by the Web Stack software on the Red Hat platform:

{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Web Stack UI

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}Before you can use Web Stack for web development, you need to initialize the environment for your login. Every new user logged into the system must initialize their own environment. After downloading and installing the {{amp-dev}} package, initialize the Web Stack environment. Click *Applications > Developer Tools > Web Stack Initialize* to start the initialization process.

To download and install the Web Stack UI, execute the following command:
{code}# pkg install webstackui
{code}
# pkg install webstackui
{code}
{note:title=Note}If you have already installed {{amp-dev}} package, {{webstackui}} package is also installed. You need to install {{webstackui}} only when you are installing the AMP packages separately or if you have installed the {{amp}} package.
{note}
{note}Since {{webstackui}} package depends on other Apache packages, if you have not already installed the Apache Web Server, it will be automatically downloaded when you install the {{webstackui}} package. As mentioned earlier, Web Stack UI is just the GUI option to control the AMP components. You still need to download and configure AMP packages if you have not installed the {{amp-dev}} package.

After installing the Web Stack UI, you can create and run the co-packaged sample applications from the menu item. Go to *Applications > Developer Tools > Web Stack Admin > Sample App* to find these menu items.
For advanced options such as editing the configuration files, click {{Advanced Configuration}} the Apache, MySQL, and PHP tabs.
{note:title=Note}You must restart the servers for the changes to take effect.
{note}
{note}You can edit the {{httpd.conf}} file for Apache advanced configuration options. For information about how to configure Apache, refer to the documentation at {{/usr/apache2/2.2/manual/configuring.html.en}}.

For PHP advanced configuration, you can edit the {{php.ini}} file. For information about how to configure PHP using the {{php.ini}} file, see the documentation at {{/usr/php/5.2/doc/html/configuration.html}}.

{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris,rhel
{excerpt}
{excerpt}Not applicable for Solaris 10 OS and Red Hat Enterprise Linux.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. Web Stack IPS Repository

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}Web Stack IPS repository is an experimental repository hosting applications and tools pertaining to the Web Stack. For example, you can find applications like Drupal or PHPMyAdmin in the Web Stack repository, which you can download and install instead of downloading the applications directly from their sites. The applications that are available in the Web Stack repository are pre-configured to work with other components in the Web Stack.

The Web Stack repository is available at [http://pkg.opensolaris.org/webstack|http://pkg.opensolaris.org/webstack].
While you are free to install software from the Web Stack IPS repository, support will not be provided through the Sun GlassFish Portfolio subscription.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris,rhel
{excerpt}
{excerpt}Not applicable for Solaris 10 OS and Red Hat Enterprise Linux.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. Apache Web Server

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, if you have installed the optional package {{amp-dev}}, you don't need to download other Apache Web Server packages separately.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
The Web Stack comes with Apache 2.2.11 Web Server fully configured and optimized for PHP deployment. The NetBeans IDE lets you add Apache web server in the servers list so the applications that you build including PHP based web applications can be deployed to the Apache web server. To set up Apache Web Server in the NetBeans IDE, refer to the later sections in this document.

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}To start the Apache Web Server in OpenSolaris 2009.06, execute the following command:
 
{code}# svcadm enable -s apache22
{code}
# svcadm enable -s apache22
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris,rhel
{excerpt}
 
For more information on the configuration file layout, see the [Installation and Configuration Guide |http://wikis.sun.com/pages/viewpage.action?pageId=50432140#SunWebStackInstallation%26ConfigurationGuide-UnderstandingWebStack]
If you are using the NetBeans IDE, you can add the Apache Web Server in the servers list so the applications that you build including PHP based web applications can be deployed to the Apache Web Server directly from the IDE. To set up the Apache Web Server in the NetBeans IDE, refer to the later sections in this document.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}To start the Apache Web Server on Solaris 10 OS, execute the following command:
{code}
# {code}# svcadm enable -s sun-apache22
{code}
{code}You need to have the necessary permission to execute the previous command.

{note:title=Note}The previous command starts the Apache Web Server in the 32-bit prefork MPM mode (the default mode).{note}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}To start the Apache Web Server on Red Hat Enterprise Linux, execute the following command:
{code}# /sbin/service sun-apache22 start
{code}
# /sbin/service sun-apache22 start
{code}
To start the Apache Web Server (worker MPM) on Red Hat Enterprise Linux, execute the following command:
# Stop {{sun-apache22}} service.{code}
$ /sbin/service sun-apache22 stop
# Stop {{sun-apache22}} service.{code}$ /sbin/service sun-apache22 stop
{code}
# Edit {{/etc/opt/sun/webstack/apache2/2.2/envvars}} file to set the {{HTTPD}} variable, as shown below:{code}HTTPD=/opt/sun/webstack/apache2/2.2/bin/httpd.worker
HTTPD=/opt/sun/webstack/apache2/2.2/bin/httpd.worker
{code}
# Start {{sun-apache22}} service.{code}
$ /sbin/service sun-apache22 start
# Start {{sun-apache22}} service.{code}$ /sbin/service sun-apache22 start
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}

{excerpt:hidden=true}
\#WITSTarget:START=solaris,opensolaris
{excerpt}
{excerpt}Apache Web Server's SMF properties are listed in the following table:

|| SMF Property Name || Value ||

# *To list the SMF properties*
{code}# svccfg -s <service-name> listprop httpd/*
{code}
# svccfg -s <service-name> listprop httpd/*
{code}
# *To switch to a 32-bit-prefork server (one-time action)*
{code}
# {code}# svccfg -s <service-name> setprop httpd/enable_64bit=false
# svccfg -s <service-name> setprop httpd/server_type=prefork
# svcadm refresh <service-name>
{code}
# *To switch to a 64-bit-prefork server (one-time action)*
{code}
# {code}# svccfg -s <service-name> setprop httpd/enable_64bit=true
# svccfg -s <service-name> setprop httpd/server_type=prefork
# svcadm refresh <service-name>
{code}
# *To switch to a 32-bit-worker server (one-time action)*
{code}
# {code}# svccfg -s <service-name> setprop httpd/enable_64bit=false
# svccfg -s <service-name> setprop httpd/server_type=worker
# svcadm refresh <service-name>
{code}
# *To switch to a 64-bit-worker server (one-time action)*
{code}
# {code}# svccfg -s <service-name> setprop httpd/enable_64bit=true
# svccfg -s <service-name> setprop httpd/server_type=worker
# svcadm refresh <service-name>
{code}
# *To start the server*
{code}# svcadm enable -s <service-name>
{code}
# svcadm enable -s <service-name>
{code}
# *To stop the server*
{code}# svcadm disable <service-name>
{code}
# svcadm disable <service-name>
{code}

{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In the OpenSolaris 2009.06 OS, replace the {{<service-name>}} with {{apache22}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In the Solaris 10 OS, replace the {{<service-name>}} with {{sun-apache22}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris,opensolaris
{excerpt}
{note:title=Note}
{note:title=Note}mod_perl and mod_php cannot be used with the Apache Web Server running in 64-bit mode.
{note}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}Not applicable for Red Hat Enterprise Linux.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Setting Up a Secure Website with a Self-Signed Certificate
{note:title=Note}You can only run one secure web server on a machine (if IP alias is not configured) because the certificates are server wide, and must contain the name of the site they represent. But you can let the server work on both secure and non-secure connections.
{note}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}For OpenSolaris 2009.06, from a shell, run:
 
{code}$ /usr/bin/openssl req -new -x509 -nodes -out server.crt -keyout server.key
{code}
$ /usr/bin/openssl req -new -x509 -nodes -out server.crt -keyout server.key
{code}
The {{openssl}} utility is available in OpenSolaris 2009.06 by default.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}For *Solaris 10* OS, from a shell, run:
 
{code}$ /usr/sfw/bin/openssl req -new -x509 -nodes -out server.crt -keyout server.key
{code}
$ /usr/sfw/bin/openssl req -new -x509 -nodes -out server.crt -keyout server.key
{code}
The {{openssl}} utility is available in Solaris 10 OS by default.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}For Red Hat Enterprise Linux, from a shell, run:
 
{code}$ /usr/bin/openssl req -new -x509 -nodes -out server.crt -keyout server.key
{code}
$ /usr/bin/openssl req -new -x509 -nodes -out server.crt -keyout server.key
{code}
The {{openssl}} utility is available in Red Hat Enterprise Linux by default.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
You will be asked some questions to fill the certificate's attributes. [Read this document|http://sial.org/howto/openssl/self-signed/] for more information.

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, the {{samples-conf.d}} directory is under {{/etc/apache2/2.2/}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, the {{samples-conf.d}} directory is under {{/etc/opt/webstack/apache2/2.2/}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux, the {{samples-conf.d}} directory is under {{/etc/opt/sun/webstack/apache2/2.2/}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
Move the {{ssl.conf}} file to the {{conf.d}} directory.

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, the {{conf.d}} directory is under {{/etc/apache2/2.2/}}.
 
{code}# cp /etc/apache2/2.2/samples-conf.d/ssl.conf /etc/apache2/2.2/conf.d/ssl.conf
{code}
# cp /etc/apache2/2.2/samples-conf.d/ssl.conf /etc/apache2/2.2/conf.d/ssl.conf
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, the {{conf.d}} directory is under {{/etc/opt/webstack/apache2/2.2/}}.
 
{code}$ cp /etc/opt/webstack/apache2/2.2/samples-conf.d/ssl.conf /etc/opt/webstack/apache2/2.2/conf.d/ssl.conf
{code}
$ cp /etc/opt/webstack/apache2/2.2/samples-conf.d/ssl.conf /etc/opt/webstack/apache2/2.2/conf.d/ssl.conf
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux, the {{conf.d}} directory is under {{/etc/opt/sun/webstack/apache2/2.2/}}.
 
{code}# cp /etc/opt/sun/webstack/apache2/2.2/samples-conf.d/ssl.conf /etc/opt/sun/webstack/apache2/2.2/conf.d/ssl.conf
{code}
# cp /etc/opt/sun/webstack/apache2/2.2/samples-conf.d/ssl.conf /etc/opt/sun/webstack/apache2/2.2/conf.d/ssl.conf
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
Then modify the {{ssl.conf}} file in order to change the values of the following parameters:
{code}...
...
SSLCertificateFile "<path to server.crt>"
SSLCertificateKeyFile "<path to server.key>"
{code}
 
Configuration files are read from the {{conf.d}} directory automatically.

{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}Not applicable for Red Hat Enterprise Linux.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris,opensolaris
{excerpt}
{excerpt}The SSL-enabled Apache Web Server can use the services of its Kernel SSL proxy to improve the performance of the HTTPS packets processing. This is acheived by creating an instance of the Kernel SSL service, specifying the SSL proxy port and parameters, and by listening on the proxy port.

To configure the KSSL with the Apache Web Server using the {{pkcs12}} key type, export the key/cert. in a PKCS12 file as shown in the following command:
{code}$ ksslcfg create -f pkcs12 -i /kssl-conf/cert.pk12 -p /kssl-conf/cert.pass -x 8443 443
{code}
$ ksslcfg create -f pkcs12 -i /kssl-conf/cert.pk12 -p /kssl-conf/cert.pass -x 8443 443
{code}
You must run {{ksslcfg}} to configure your Kernel SSL proxy before you start the Apache Web Server.

To Configure the KSSL with the {{pkcs11}} key type provided the Server Cert. is in the "Sun Software PKCS#11 softtoken" database, execute the following commands:
{code}
$ {code}$ cryptoadm disable metaslot
$ ksslcfg create -f pkcs11 -T "Sun Software PKCS#11 softtoken" -C "Server-Cert" -p ./password.conf -x 8444 444
$ cryptoadm enable metaslot
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. lighttpd Server

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}For starting the lighttpd server in the OpenSolaris OS, execute the following command:
 
{code}# svcadm enable -s lighttpd14
{code}
# svcadm enable -s lighttpd14
{code}
In OpenSolaris OS, the lighttpd configuration file {{lighttpd.conf}} and the configuration directory {{conf.d}} are available under the {{/etc/lighttpd/1.4}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}For starting the lighttpd server in the Solaris OS, execute the following command:
 
{code}# svcadm enable -s sun-lighttpd14
{code}
# svcadm enable -s sun-lighttpd14
{code}
In Solaris OS, the lighttpd configuration file {{lighttpd.conf}} and the configuration directory {{conf.d}} are available under the {{/etc/opt/webstack/lighttpd/1.4}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}For starting the lighttpd server in the Red Hat Enterprise Linux, execute the following command:
 
{code}# /sbin/service sun-lighttpd14 start
{code}
# /sbin/service sun-lighttpd14 start
{code}
In Red Hat Enterprise Linux OS, the lighttpd configuration file {{lighttpd.conf}} and the configuration directory {{conf.d}} are available under the {{/etc/opt/sun/webstack/lighttpd/1.4}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. MySQL DB Server

{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
| {excerpt}| Solaris 10 OS | {{/opt/webstack/mysql/5.1}} |

To start the MySQL Server on Solaris 10, execute the following command:
{code}
# {code}# svcadm enable -s sun-mysql51
{code}
{code}You need to have the necessary permission to execute the previous command.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
 
| Red Hat Linux Enterprise Linux | {{/opt/sun/webstack/mysql/5.1}} |

To start the MySQL Server on Red Hat Enterprise Linux, execute the following command:
{code}# /sbin/service sun-mysql51 start
{code}
# /sbin/service sun-mysql51 start
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
 
| OpenSolaris 2009.06 | {{/usr/mysql}} |

To start the MySQL Server on OpenSolaris 2009.06, execute the following command:
{code}# svcadm enable -s mysql:version_51
{code}
# svcadm enable -s mysql:version_51
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Automatic Startup of Servers

{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}Not applicable for Red Hat Enterprise Linux.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris,solaris
{excerpt}
 
MySQL Server's SMF properties are listed in the following table:

# *To list the SMF properties*
{code}# svccfg -s mysql:version_51 listprop mysql/*
{code}
# svccfg -s mysql:version_51 listprop mysql/*
{code}
# *To run MySQL 5.1 server as 32-bit (default)*
{code}
# {code}# svccfg -s mysql:version_51 setprop mysql/enable_64bit=false
# svcadm refresh mysql:version_51
# svcadm disable mysql:version_51
{code}
# *To run MySQL 5.1 server as 64-bit*
{code}
# {code}# svccfg -s mysql:version_51 setprop mysql/enable_64bit=true
# svcadm refresh mysql:version_51
# svcadm disable mysql:version_51
{code}
# *To change the location of MySQL data directory (default is /var/mysql/5.1/data)*
{code}
# {code}# svccfg -s mysql:version_51 setprop mysql/data=/zpool/data
# svcadm refresh mysql:version_51
# svcadm disable mysql:version_51

Perform the following steps as a root user to start the MySQL Server:
{code}# svcadm enable -s application/database/mysql:version_51
{code}The first command shows how you can import the MySQL Server manifest file. You need to execute this only once. To stop the server, execute the following command:
{code}svcadm disable application/database/mysql:version_51
{code}
# svcadm enable -s application/database/mysql:version_51
{code}
The first command shows how you can import the MySQL Server manifest file. You need to execute this only once. To stop the server, execute the following command:
{code}
svcadm disable application/database/mysql:version_51
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris,rhel
{excerpt}
 
{note:title=Note}The default installation of the MySQL Server creates a file {{my.cnf}} under {{/etc/opt/webstack/mysql/5.1}} (Solaris 10 OS) or {{/etc/opt/sun/webstack/mysql/5.1}} (Red Hat Enterprise Linux). This default configuration is only for very small deployments. There are other sample configurations under {{mysql/5.1/my-*.cnf}} that you can use for medium to large deployments. Copy one of these files to {{my.cnf}} before starting the MySQL service.
{note}
 
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Setting the MySQL {{root}} Password

{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}For *Solaris 10* OS:
{code}/opt/webstack/mysql/5.1/bin/mysql -u root
{code}
/opt/webstack/mysql/5.1/bin/mysql -u root
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}For *Red Hat Enterprise Linux* OS:
{code}/opt/sun/webstack/mysql/5.1/bin/mysql -u root
{code}
/opt/sun/webstack/mysql/5.1/bin/mysql -u root
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}For *OpenSolaris 2009.06* OS:
{code}/usr/mysql/bin/mysql -u root
{code}
/usr/mysql/bin/mysql -u root
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
For changing the default {{root}} password, perform the following step:

{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}For *Solaris 10* OS:
{code}/opt/webstack/mysql/5.1/bin/mysqladmin -u root password {{<new-pass>}}
{code}
/opt/webstack/mysql/5.1/bin/mysqladmin -u root password {{<new-pass>}}
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}For *Red Hat Enterprise Linux* OS:
{code}/opt/sun/webstack/mysql/5.1/bin/mysqladmin -u root password {{<new-pass>}}
{code}
/opt/sun/webstack/mysql/5.1/bin/mysqladmin -u root password {{<new-pass>}}
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{warning:title=Warning}Change the default MySQL Server root password before deploying it in a production environment.
{warning}
 
After setting the MySQL {{root}} password, if you need to use the MySQL prompt as the MySQL {{root}} user, you will need to invoke the following command:
{code}$ mysql -u root -p
{code}
$ mysql -u root -p
{code}
Enter the password at the prompt.

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06 OS, the MySQL 5.1 configuration file is {{/etc/mysql/5.1/my.cnf}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, the MySQL 5.1 configuration file is {{/etc/opt/webstack/mysql/5.1/my.cnf}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux, the MySQL 5.1 configuration file is {{/etc/opt/sun/webstack/mysql/5.1/my.cnf}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. MySQL-JDBC Driver

{code}mysql-connector-java-[version]-bin.jar{code}
 
and a debug build of the driver in a file named:

{code}mysql-connector-java-[version]-bin-g.jar{code}
 
Once you have extracted the distribution archive, you can install the driver by placing the:

{code}mysql-connector-java-[version]-bin.jar{code}
 
file in your classpath.
Before you can use the MySQL DB, you need to create databases and tables. You can either use the PHPMyAdmin application or use the {{mysql}} command line client.
{code}
# {code}# mysql -u root -p
Enter the root password.
mysql>
{code}
 
To create a new database, execute the following command from the MySQL prompt:
{code}mysql> CREATE DATABASE database1;
{code}
mysql> CREATE DATABASE database1;
{code}
To create a new user with all privileges (*for test purpose only*), execute the following command from the MySQL prompt:
{code}mysql> GRANT ALL PRIVILEGES ON *.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
{code}
mysql> GRANT ALL PRIVILEGES ON *.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
{code}
To create a new user with lesser privileges (allowing access only to the database named "database1"), execute the following command from the MySQL prompt:
{code}mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON database1.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';
{code}
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON database1.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';
{code}
h2. Upgrading from MySQL 5.0 Server to MySQL 5.1 Server
# Start the MySQL 5.0 Server.
# Create a backup directory to store the SQL dump files.
# Execute the {{mysqldump}} script to obtain the dump of all the databases. For instance, execute the {{mysqldump \--all-databases \-p > dump.sql}} command.
# Stop the MySQL 5.0 Server.
# Start the MySQL 5.1 Server.
# Restore the SQL dump using the {{mysql \-p < dump.sql}} command.
# Run the {{mysql_upgrade}} script.

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06 OS, execute the following commands to upgrade the MySQL Server 5.0 to MySQL Server 5.1 assuming that you have installed both the DB versions from the IPS repository and their respective directories are under {{/usr/mysql/5.0}} and {{/usr/mysql/5.1}}.
 
{code}
# {code}# svcadm disable mysql:version_51
# svcadm enable mysql:version_50
# mkdir /mydbbackup
# /usr/mysql/5.1/bin/mysql_upgrade
{code}
 
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. Squid Proxy Server

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}For OpenSolaris 2009.06, the squid directory is {{/usr/squid}}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}For Red Hat Enterprise Linux, the squid directory is {{/opt/sun/webstack/squid}}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}For Solaris 10 OS, the squid directory is {{/opt/webstack/squid}}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
Open the {{squid.conf}} file available under the squid directory, in a text editor. Make the following changes to specify the port for the web site, and to specify the IP address for the web server. By default Squid Proxy Server listens at port 3128. Also, specify access controls to allow access to your web site.
{code}
{code}http_port 80 accel defaultsite=www.foo.com
cache_peer ip.of.server1 parent 80 0 no-query
acl sites_server_1 dstdomain www.foo.com
http_access allow sites_server_1
{code}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.11 OS, to start the Squid Proxy Server, execute the following command:
 
{code}# svcadm enable squid
{code}
# svcadm enable squid
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, to start the Squid Proxy Server, execute the following command:
 
{code}# svcadm enable sun-squid
{code}
# svcadm enable sun-squid
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux, to start the Squid Proxy Server, execute the following command:
 
{code}# /sbin/service sun-squid start
{code}
# /sbin/service sun-squid start
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
You need to start the Squid as a privileged user or use the {{sudo}} prefix.

{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}You can also start the Squid Proxy Server in Red Hat Enterprise Linux as follows:
{code}# /etc/init.d/sun-squid start
{code}
# /etc/init.d/sun-squid start
{code}
{note:title=Note}For Red Hat Enterprise Linux, see the logs at {{/var/opt/sun/webstack/squid/logs}} (especially in the cache.log file) to verify if there are any errors in configuring the Squid Proxy Server.
{note}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{note:title=Note}For Solaris 10 IS, see the logs at {{/var/opt/sun/webstack/squid/logs}} (especially in the cache.log file) to verify if there are any errors in configuring the Squid Proxy Server.
{note}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Using SMF to Manage Services

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, you can start the Squid Proxy Server by executing the following command:
{code}# svcadm enable -s squid
{code}
# svcadm enable -s squid
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, you can start the Squid Proxy Server by executing the following command:
{code}# svcadm enable -s sun-squid
{code}
# svcadm enable -s sun-squid
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}Not applicable for Red Hat Enterprise Linux
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. Sun GlassFish Enterprise Server

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris OS, you can install the GlassFish Enterprise Server by executing the following command:
 
{code}# pkg install glassfish-2
{code}
# pkg install glassfish-2
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris,rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux and Solaris 10 OS, you can install the GlassFish Enterprise Server by running the installer available through the Web Stack software. [Read this document|http://wikis.sun.com/display/WebStack/Sun+GlassFish+Web+Stack+1.5+Installation+and+Configuration+Guide#SunGlassFishWebStack1.5InstallationandConfigurationGuide-InstallingSunGlassFishEnterpriseServer] for more information.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
* You can download and read the GlassFish Enterprise Server documentation from [this site|http://docs.sun.com/app/docs/coll/1343.6].

{excerpt:hidden=true}
\#WITSTarget:START=solaris,rhel
{excerpt}
{excerpt}Not applicable for Solaris OS and Red Hat Enterprise Linux.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}The GlassFish Server has had {{mod_jk}} support since the first release; a common use case is where the Apache Web Server is serving static pages and delegating dynamic content to the GlassFish Server.

The GlassFish Server also supports the case where the Apache Web Server works as a load balancer to a cluster of the GlassFish Server instances.
* *Set up the Web Stack and the GlassFish Server*.
Set up the Web Stack software (if not setup already).
{code}
# {code}# pkg install amp
{code}
{code}Set up the GlassFish Server.
{code}
# {code}# pkg install glassfishv2
{code}
{code}The GlassFish Server is installed in the {{/usr/appserver}} directory.
** * Configure the GlassFish Server to use the Cluster Profile. See [this blog entry|http://blogs.sun.com/observatory/entry/glassfish_in_production] for more information.
* Configure SSL for the Apache Web Server.
{code}$ /usr/bin/openssl req -new -x509 -nodes -out server.crt -keyout server.key
{code}The 2 files 1. {{server.crt}} and 2. {{server.key}} are created.
{code}# cp /etc/apache2/2.2/samples-conf.d/ssl.conf /etc/apache2/2.2/conf.d/ssl.conf
{code}Modify the {{ssl.conf}} file in order to change the values of the following parameters:
{code}...
$ /usr/bin/openssl req -new -x509 -nodes -out server.crt -keyout server.key
{code}
The 2 files 1. {{server.crt}} and 2. {{server.key}} are created.
{code}
# cp /etc/apache2/2.2/samples-conf.d/ssl.conf /etc/apache2/2.2/conf.d/ssl.conf
{code}
Modify the {{ssl.conf}} file in order to change the values of the following parameters:
{code}
...
SSLCertificateFile "<path to server.crt>"
SSLCertificateKeyFile "<path to server.key>"
...
{code}Restart the Apace Web Server
{code}# svcadm restart apache22
{code}
Restart the Apace Web Server
{code}
# svcadm restart apache22
{code}
* Download the GlassFish Load Balancer plug-in for the OpenSolaris OS from [this site|http://download.java.net/javaee5/external/SunOS_X86/aslb/jars/aslb-9.1.1-b8.jar].
* Extract the file {{aslb-9.1.1-b8.jar}} to get the 2 files 1. {{SUNWaslb.zip}} and 2. {{SUNWaspx.zip}}.
* Create a Temp. dir. structure.
{code}
$ {code}$ mkdir <TMP_PREFIX>/glassfish/lib/plugin
{code}
{code}where TMP_PREFIX can be your home directory.
Extract the content of both the zip files {{SUNWaslb.zip}} and {{SUNWaspx.zip}} into the <TMP_PREFIX>/glassfish/lib/plugin dir.
After extracting the content the <TMP_PREFIX>/glassfish/lib/plugin directory should look like:
{code}+lib
+lib
----dtds
----install
----webserver-plugin
----lib*.so
{code}Set the neccessary permission.
{code}$ chmod -R 755 <TMP_PREFIX>/glassfish/lib/plugin/lib
{code}
Set the neccessary permission.
{code}
$ chmod -R 755 <TMP_PREFIX>/glassfish/lib/plugin/lib
{code}
* Create the required directories in the Apache Web Server directory. Create the modules, resource, and the errorpages directory.
{code}
# {code}# mkdir /var/apache2/2.2/modules
# mkdir /var/apache2/2.2/modules/resource
# mkdir /var/apache2/2.2/modules/errorpages
{code}
* Populate the resource directory.
{code}
# {code}# cp <TMP_PREFIX>/glassfish/lib/plugin/lib/webserver-plugin/solaris/apache2.2/LBPluginDefault_root.res /var/apache2/2.2/modules/resource
# cp <TMP_PREFIX>/glassfish/lib/plugin/lib/webserver-plugin/solaris/apache2.2/LBPlugin_root.res /var/apache2/2.2/modules/resource
{code}
* Populate the modules directory.
{code}# cp <TMP_PREFIX>/glassfish/lib/plugin/lib/webserver-plugin/solaris/apache2.2/mod_loadbalancer.so /var/apache2/2.2/modules
{code}
# cp <TMP_PREFIX>/glassfish/lib/plugin/lib/webserver-plugin/solaris/apache2.2/mod_loadbalancer.so /var/apache2/2.2/modules
{code}
* Populate the errorpages directory.
{code}# cp <TMP_PREFIX>/glassfish/lib/plugin/lib/webserver-plugin/solaris/apache2.2/errorpages/* /var/apache2/2.2/modules/errorpages
{code}
# cp <TMP_PREFIX>/glassfish/lib/plugin/lib/webserver-plugin/solaris/apache2.2/errorpages/* /var/apache2/2.2/modules/errorpages
{code}
* Create and populate the configuration directory.
{code}
# {code}# mkdir /var/apache2/2.2/conf
$ cd /var/apache2/2.2/conf
# cp <TMP_PREFIX>/glassfish/lib/plugin/lib/install/templates/loadbalancer.xml.example /var/apache2/2.2/conf
{code}
* Create and populate the Certificate DB directory.
{code}
# {code}# mkdir /var/apache2/2.2/sec_db_files
# cp <TMP_PREFIX>/glassfish/lib/plugin/lib/webserver-plugin/solaris/apache2.2/*.db /var/apache2/2.2/sec_db_files
{code}
* Modify the {{httpd.conf}} file. Add the following lines to the {{/etc/apache2/2.2/httpd.conf}} file:
{code}
{code}LoadModule apachelbplugin_module /var/apache2/2.2/modules/mod_loadbalancer.so
<IfModule mod_apache2lbplugin.cpp>
config-file "/var/apache2/2.2/conf/loadbalancer.xml"
{code}
* Restart the Apache Web Server
{code}# svcadm restart apache22
{code}
# svcadm restart apache22
{code}
* Start the GlassFish Server domain
{code}# svcadm enable domain1
{code}
# svcadm enable domain1
{code}
* Deploy web applications in the GlassFish Server.

{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
h1. PHP Environment

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, if you have installed the optional package {{amp-dev}}, you don't need to download PHP runtime libraries separately. But if you have not installed the {{amp-dev}} package, you can install the PHP libraries by executing the following command:
{code}# pkg install SUNWphp52 SUNWphp52-mysql SUNWphp52-pgsql SUNWapch22m-php52
{code}
# pkg install SUNWphp52 SUNWphp52-mysql SUNWphp52-pgsql SUNWapch22m-php52
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris,rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux and Solaris 10 OS, if you have installed the Web Stack software through the most common {{amp}} configuration option, you don't need to install the PHP runtime libraries separately. But if you have not installed the complete {{amp}} stack, you can install the PHP libraries by providing the {{php}} option during installation. For more information, see the [Web Stack Installation and Configuration Guide|http://wikis.sun.com/pages/viewpage.action?pageId=50432140]

For instance,
{code}$ ./install php
{code}
$ ./install php
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Where is PHP Installed?

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, when you download and install the PHP packages mentioned in the preceding section, the binaries will be available from {{/usr/php/5.2}} and other runtime configuration files will be available under the {{/etc/php/5.2}} directory.
{note:title=Note}Available Version - PHP 5.2.9.
{note}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, when you install PHP through the Web Stack software, the PHP configuration and runtime files will be available under the locations provided in the following table:

|| Platform || Install Location ||

{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux, when you install PHP through the Web Stack software, the PHP configuration and runtime files will be available under the locations provided in the following table:

|| Platform || Install Location ||

{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Available PHP Extensions

The following is the list of PHP extensions available through the Web Stack:
{code}
{code}APC, GD, LDAP, OpenSSL, PostgresSQL, XDebug , Bzip2,
Gettext, Mcrypt, PDO, SQLite, Zlib, Curl, Iconv,
Memcache, PDO MySQL, Suhosin, DTrace (Solaris 10 OS and OpenSolaris OS),
PDO SQLite, and Tidy.
{code}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, if you have installed the {{amp-dev}} package, some PHP modules are available as extensions. Each of the modules has a respective INI file under the {{/etc/php/5.2/conf.d}} directory. These PHP extensions are enabled by default. Some custom third-party PHP extensions are not enabled by default. However, you can edit the PHP extension specific INI file for any specific configuration changes.

{note:title=Note}Not all co-packaged extensions are mentioned in the list provided. See the {{/etc/php/5.2/conf.d}} directory for the available extensions.
{note}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel,solaris
{excerpt}
{excerpt}In Red Hat Enterprise Linux and Solaris 10 OS, if you have installed the Web Stack software using the {{amp}} installation option, some PHP modules are made available as extensions. Each of the modules has a respective INI file under the PHP {{conf.d}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}For instance, INI files for Red Hat Enterprise Linux is available under {{/etc/opt/sun/webstack/php/5.2/conf.d}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}For instance, INI files for Solaris 10 OS is available under {{/etc/opt/webstack/php/5.2/conf.d}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Enabling/Disabling Bundled PHP Extensions

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, the PHP {{conf.d}} directory is available under the {{/etc/php/5.2}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, the PHP {{conf.d}} directory is available under the {{/etc/opt/webstack/php/5.2/}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux, the PHP {{conf.d}} directory is available under the {{/etc/opt/sun/webstack/php/5.2/}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
For example, to enable the Suhosin PHP extension, perform the following tasks:
# Un-comment the line enabling the Suhosin extension
{code}extension=suhosin.so
{code}
extension=suhosin.so
{code}
To disable the extension, insert a comment character {{;}} at the beginning of the line.
{note:title=Note}You must restart the web server for changes to take effect.
{note}
 
h2. PHP Configuration through AMP GUI

{excerpt:hidden=true}
\#WITSTarget:START=rhel,solaris
{excerpt}
{excerpt}Not applicable for Red Hat Enterprise Linux and Solaris 10 OS.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}You can use the AMP GUI to modify PHP settings as supported by Apache Web Server. To invoke the GUI tool, click Applications > Developer Tools > WebStack Admin > Options.

The PHP Debugger is not enabled by default. You need to select the PHP Debugger check box to enable this option. The NetBeans IDE supports the use of {{XDebug}} for debugging PHP projects.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Debugging Support for PHP Applications

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
# {excerpt}# From the Launch menu of the Solaris operating system, select Applications > Developer Tools > Web Stack Admin > Options. The Options screen is displayed.
# Select the PHP tab.
# Select the Debug check box. By selecting the check box you are enabling the automatic debug option for all PHP applications.
# Click Restart for the change to take effect.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}

Optionally, you can enable debugging by adding the following lines in the {{xdebug.ini}} file:
{code}zend_extension=/usr/php/5.2/modules/xdebug.so
zend_extension=/usr/php/5.2/modules/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
{code}
 
where:

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris OS, the {{xdebug.ini}} file is available under the {{/etc/php/5.2/conf.d}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, the {{xdebug.ini}} file is available under the {{/etc/opt/webstack/php/5.2/}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux, the {{xdebug.ini}} file is available under the {{/etc/opt/sun/webstack/php/5.2/}} directory.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. Python Environment

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, Python is co-packaged. If {{SUNWpython}} is not already available, install the package through the IPS package manager.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{note:title=Note} Python is not provided through the Web Stack software for Red Hat Enterprise Linux. You need to use the Python interpreter provided by the platform. Also {{mod_python}} is not part of the Web Stack software.
{note}
{note}You can download {{mod_python}} from [http://httpd.apache.org/modules/python-download.cgi|http://httpd.apache.org/modules/python-download.cgi].
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, you can install Python by providing the {{python}} option during installation. For more information, see the [Web Stack Installation and Configuration Guide|http://wikis.sun.com/pages/viewpage.action?pageId=50432140].

For instance,
{code}$ ./install python
{code}
$ ./install python
{code}
When you install Python from the Web Stack software, the Python runtime files will be available under the locations provided in the following table:

{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris,opensolaris
{excerpt}
{note:title=Note}Python 2.5.2 has DTrace probes integrated. You can trace your Python-based applications for performance bottlenecks and other problems using the [Solaris DTrace|http://www.sun.com/bigadmin/content/dtrace/] feature.
{note}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. Ruby Environment

{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}Ruby is available through the Web Stack software only for Solaris 10 OS and OpenSolaris OS. The Web Stack software does not include the Ruby interpretor on the Red Hat platform; use the OS-supplied Ruby instead.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, you can install the Ruby runtime by providing the {{ruby}} option during installation. For more information, see the [Web Stack Installation and Configuration Guide|http://wikis.sun.com/pages/viewpage.action?pageId=50432140]

For instance,
{code}$ ./install ruby
{code}
$ ./install ruby
{code}
When you install Ruby from the Web Stack software, the Ruby configuration and runtime files will be available under the locations provided in the following table:

{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, to download and install Ruby packages, execute the following command:
{code}# pkg install ruby-dev
{code}When you download and install the {{ruby-dev}} package, you are also installing the NetBeans plug-in for Ruby. If you are not planning to use NetBeans IDE for your Ruby development, you can get only the ruby package as show below:
{code}# pkg install SUNWruby18
{code}
# pkg install ruby-dev
{code}
When you download and install the {{ruby-dev}} package, you are also installing the NetBeans plug-in for Ruby. If you are not planning to use NetBeans IDE for your Ruby development, you can get only the ruby package as show below:
{code}
# pkg install SUNWruby18
{code}
When you download and install the Ruby package mentioned in the above section, the binaries will be available from {{/usr/ruby/1.8}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Ruby Gems

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}{{/var/ruby/1.8/gem_home}} contains the Ruby gems repository. {{GEM_HOME}} is {{/var/ruby/1.8/gem_home}}. {{/usr/ruby/1.8/bin}} contains the Ruby executable as well as other utility programs.

If you are running {{gem install}} and have no write access to the {{GEM_HOME}} path, the gem will be installed to {{$HOME/.gem}}. You can also add the {{GEM_HOME}}/bin directory to the PATH to easily access commands installed with gems (such as the {{rails}} command).
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, {{/var/opt/webstack/ruby/1.8/gem_home}} contains the Ruby gems repository. Configure the {{GEM_HOME}} environment variable to point to {{/var/opt/webstack/ruby/1.8/gem_home}} to use this installation of Ruby gems. {{/var/opt/webstack/ruby/1.8/bin}} contains the Ruby executable as well as other utility programs. These programs are linked from {{/usr/bin}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.11 OS, the installation of Ruby native extensions requires the {{SUNWgcc}} package. gem is preconfigured to use {{gcc}} for C language extensions. Set the {{CXX}} environment variable to:
 
{code}/usr/sfw/bin/g++
{code}
/usr/sfw/bin/g++
{code}
when installing {{C+\+}} language extensions, such as eventmachine, and thin.
 
when installing {{C++}} language extensions, such as eventmachine, and thin.
For example:
{code}$ CXX=/usr/sfw/bin/g++ gem install eventmachine
{code}
$ CXX=/usr/sfw/bin/g++ gem install eventmachine
{code}
When installing the mysql gem, the paths to the MySQL 5.1 client libraries and header files must be provided, as follows:
{code}# gem install mysql --with-mysql-include=/usr/mysql/5.1/include --with-mysql-lib=/usr/mysql/5.1/lib
{code}
# gem install mysql --with-mysql-include=/usr/mysql/5.1/include --with-mysql-lib=/usr/mysql/5.1/lib
{code}
{note:title=Note}To use gem, make sure you have direct access to the Internet. If your system is behind a firewall or if it uses a proxy server, set the {{HTTP_PROXY}} variable.
{note}
 
The directory referenced by {{GEM_HOME}} should be writable. So make sure you execute the following command:
{code}$ chmod -R a+w <GEM_HOME_PATH>
{code}
$ chmod -R a+w <GEM_HOME_PATH>
{code}
*Caution* - \- Do not perform the previously mentioned tasks, if {{GEM_HOME}} refers to {{$HOME/.gem}}.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Ruby on Rails (RoR)

Rails is a full-stack framework for developing database-backed web applications. Rails provide a pure-Ruby development environment. Ruby gems is the standard Ruby package manager. If you have successfully installed Ruby through the Web Stack software, Ruby gems are already loaded. Hence you can install Rails and its dependencies by executing the following command:
{code}
{code}/usr/bin/gem install rails
{code}
{code}You can also install rails directly from the NetBeans IDE rather than invoking the gem command through a command line. The Ruby on Rails environment is now ready for development. You can now use the NetBeans IDE to create a Ruby on Rails project. When you create a project, the IDE creates the same folders and files that a rails command would create.

h1. Tomcat Servlet Container

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
* {excerpt}* In *OpenSolaris 2009.06*, Tomcat is available under {{/usr/tomcat6}}.

To start the Tomcat Server in *OpenSolaris 2009.06 OS*, perform the following task:

# Execute the following command:
{code}# svcadm enable -s tomcat6
{code}
# svcadm enable -s tomcat6
{code}

To stop Tomcat, perform the following tasks:
{code}# svcadm disable tomcat6
{code}
# svcadm disable tomcat6
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
* {excerpt}* In *Solaris 10 OS*, Tomcat is available under {{/opt/webstack/tomcat/6.0}}.

To start the Tomcat Server in *Solaris 10 OS*, perform the following task:
{code}# svcadm enable -s sun-tomcat6
{code}To stop the Tomcat Server, perform the following task:
{code}# svcadm disable sun-tomcat6
{code}
# svcadm enable -s sun-tomcat6
{code}
To stop the Tomcat Server, perform the following task:
{code}
# svcadm disable sun-tomcat6
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
* {excerpt}* In *Red Hat Enterprise Linux*, Tomcat is available under {{/opt/sun/webstack/tomcat/6.0}}.

To start the Tomcat Server in *Red Hat Enterprise Linux*, perform the following task:
{code}# /sbin/service sun-tomcat6 start
{code}To stop the Tomcat Server, perform the following task:
{code}# /sbin/service sun-tomcat6 stop
{code}
# /sbin/service sun-tomcat6 start
{code}
To stop the Tomcat Server, perform the following task:
{code}
# /sbin/service sun-tomcat6 stop
{code}
In Red Hat Enterprise Linux, you need to set the {{JAVA_HOME}} variable or modify the {{/opt/sun/webstack/tomcat/6.0/bin/setenv.sh}} file to point to the correct Java SE installation path.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. Distributed Caching with {{memcached}}

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris,solaris
{excerpt}
{excerpt}memcached is a high-performance, distributed caching system most widely used by popular web sites. The main benefit of using memcached is to speed up dynamic Web applications by reducing database load. memcached is used on LiveJournal, Slashdot, Wikipedia, and other high-traffic sites.

In OpenSolaris 2009.11 and Solaris 10 OS, perform the following steps as a {{root}} user to start memcached:
{code}# svcadm enable -s memcached
{code}
# svcadm enable -s memcached
{code}
Execute the {{disable}} command to stop the server.
{code}svcadm disable memcached
{code}
svcadm disable memcached
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}In Red Hat Enterprise Linux, as the root user you need to create the file {{/etc/opt/sun/webstack/sysconfig/memcached}}. You can modify the following default values for the parameters already available in the file:
{excerpt} {code}PORT=11211
In Red Hat Enterprise Linux, as the root user you need to create the file {{/etc/opt/sun/webstack/sysconfig/memcached}}. You can modify the following default values for the parameters already available in the file:
{code}
PORT=11211
USER=memcached
MAXCONN=1024
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Starting the memcached server

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris,solaris
{excerpt}
{excerpt}This section describes how to start {{memcached}}.

* Log in as non-root user.
* Start the memcached server.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, you can start the memcached server by executing the following command:
{code}# svcadm enable -s memcached
{code}
# svcadm enable -s memcached
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, you can start the memcached server by executing the following command:
{code}# svcadm enable -s sun-memcached
{code}
# svcadm enable -s sun-memcached
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
If you need to pass some options to {{memcached}}, you can use {{setprop}} option as shown below:

{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
 
In Solaris 10 OS, execute the following command:
{code}
# {code}# svccfg -s sun-memcached setprop 'memcached/options=("-u" sun-memcached/options='("-u" "noaccess" "-m" "512")'
# svcadm refresh sun-memcached
# svcadm enable -s sun-memcached
{code}
 
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
 
In OpenSolaris 2009.06, execute the following command:
{code}
# {code}# svccfg -s memcached setprop 'memcached/options=("-u" memcached/options='("-u" "noaccess" "-m" "512")'
# svcadm refresh memcached
# svcadm enable -s memcached
{code}
 
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris,solaris
{excerpt}
{excerpt}The previously mentioned command will start the server as user {{noaccess}} with 512 MB as memory.
For information about the {{memcached}} command and its options, see the {{memcached}} man page.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux, to the memcached server, execute the following command:
 
{code}# /sbin/service sun-memcached start
{code}
# /sbin/service sun-memcached start
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h2. Using memcached with Solaris Zones

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris,solaris
{excerpt}
[Read this document |http://wikis.sun.com/display/WebStack/Memcached+On+Zones].
 
[Read this document | http://wikis.sun.com/display/WebStack/Memcached+On+Zones].
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}Not applicable for Red Hat Enterprise Linux.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. Automatic Startup of Servers

{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
{excerpt}In OpenSolaris 2009.06, if you have started the servers through the Web stack menu, the servers will automatically start when the machine restarts.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=solaris
{excerpt}
{excerpt}In Solaris 10 OS, the Apache Web Server automatically starts when the machine restarts if you enable the {{sun-apache22}} service.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}In Red Hat Enterprise Linux, startup script {{sun-apache22}} is available under {{/etc/init.d}}. To automatically start the service when the machine starts, use the {{chkconfig}} mechanism.

To start the Apache Web Server in Red Hat Enterprise Linux when the machine starts, execute the following command:
{code}# /sbin/chkconfig sun-apache22 on
{code}To start the MySQL DB in Red Hat Enterprise Linux when the machine starts, execute the following command:
{code}# /sbin/chkconfig sun-mysql51 on
{code}To start the MySQL DB in Red Hat Enterprise Linux when the machine starts, execute the following command:
{code}# /sbin/chkconfig sun-mysql51 on
{code}
# /sbin/chkconfig sun-apache22 on
{code}
To start the MySQL DB in Red Hat Enterprise Linux when the machine starts, execute the following command:
{code}
# /sbin/chkconfig sun-mysql51 on
{code}
To start the MySQL DB in Red Hat Enterprise Linux when the machine starts, execute the following command:
{code}
# /sbin/chkconfig sun-mysql51 on
{code}
{note:title=Note}{{{}chkconfig}} command only ensures that the start-on-boot feature is enabled in Red Hat Enterprise Linux. However, to start/stop the Apache Web Server or MySQL Server, you must use the {{service}} command in Red Hat Enterprise Linux.
{note}
 
For instance,
{code}# /sbin/service sun-apache22 start
{code}
# /sbin/service sun-apache22 start
{code}
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. NetBeans IDE as a Development Environment
The NetBeans IDE takes care of all these factors with an elegant interface thereby making web development easy. You can build your web applications in PHP or use Rails framework and work with databases like MySQL or PostgreSQL in the NetBeans IDE.
{note:title=Note}If you are already using the NetBeans IDE, you can use the Web Stack components along with NetBeans IDE by following some steps. For instance, you can use *Add Server* option of NetBeans IDE to add the Apache Tomcat Server 6.0 provided through the Web Stack software.
{note}
{note}You can also use the NetBeans IDE for Java/PHP/Ruby development. The NetBeans IDE supports integrated configuration windows for managing web servers and databases directly from the IDE. Note that the version of NetBeans available in the official pkg repository may be of an older version than the one available through the NetBeans web site. The following sections show how to configure the NetBeans IDE 6.5.1 for your development needs.

The NetBeans IDE supports various Java EE servers and other web servers for application deployment. You can have multiple servers configured in NetBeans irrespective of the server that will be used in your projects. Thus you can have the Apache 2 Web Server configured for deploying PHP files, the Apache Tomcat container configured for deploying Java based web applications or a WEBrick Server for deploying Rails applications.

{excerpt:hidden=true}
\#WITSTarget:START=rhel,solaris
{excerpt}
{excerpt}Not applicable for Red Hat Enterprise Linux and Solaris 10 OS.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris
{excerpt}
* {excerpt}* [Using the NetBeans IDE with the Web Stack Software|http://wiki.netbeans.org/NetBeansAndWebStack#section-NetBeansAndWebStack-NetBeansIDEAndWebStacK]
* [MySQL DB Integration|http://wiki.netbeans.org/NetBeansAndWebStack#section-NetBeansAndWebStack-MySQLDBSupport]
* [Server Integration|http://wiki.netbeans.org/NetBeansAndWebStack#section-NetBeansAndWebStack-ServerSupport]

{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. Migrating From Development to Production Environment
h1. File Layout of Web Stack Components in the OpenSolaris 2009.06 OS
[Read this document | http://wikis.sun.com/display/WebStack/Sun+GlassFish+Web+Stack+1.5+Installation+and+Configuration+Guide#SunGlassFishWebStack1.5InstallationandConfigurationGuide-SunGlassFishWebStackFileLayout].

h1. Deploying Common Open Source Applications
[Read this document | http://wikis.sun.com/display/WebStack/Deploying+Common+Applications].

h1. DTrace Support for Web Stack

{excerpt:hidden=true}
\#WITSTarget:START=rhel
{excerpt}
{excerpt}Not applicable for Red Hat Enterprise Linux.
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
{excerpt:hidden=true}
\#WITSTarget:START=opensolaris,solaris
{excerpt}
{excerpt}[Read this document | http://wikis.sun.com/display/WebStack/DTrace+and+Web+Stack].
{excerpt:hidden=true}
\#WITSTarget:END
{excerpt}
 
h1. Troubleshooting Web Stack
[Read this document | http://wikis.sun.com/display/WebStack/Troubleshooting+Web+Stack].

{panel}
{panel:title=Documentation for the Previous Release (Sun GlassFish Web Stack 1.4/OpenSolaris 2008.11) - Final| borderStyle=dashed| borderColor=#FF9900| titleBGColor=#FF9900| bgColor=#FFFFFF}
[Getting Started Guide for the previous release|http://wikis.sun.com/display/WebStack/Web+Stack+1.4+Getting+Started+Guide]
!pdf.gif! [Getting Started Guide (All Platforms)|http://wikis.sun.com/download/attachments/48125322/WSGSG.pdf] | \| !pdf.gif! [Getting Started Guide (OpenSolaris 2008.11)|http://wikis.sun.com/download/attachments/48125322/WSGSG-OS.pdf] | \| !pdf.gif! [Getting Started Guide (Solaris 10 OS)|http://wikis.sun.com/download/attachments/48125322/WSGSG-SOL.pdf] | \| !pdf.gif! [Getting Started Guide (RHEL)|http://wikis.sun.com/download/attachments/48125322/WSGSG-RHEL.pdf]
{panel}

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact