Installing Sun Web Stack on OpenSolaris OS

 
By Brian Leonard, with contributions from Marina Sum, October 6, 2008, updated: January 9, 2009 and January 13, 2009  

In July, Sun shipped Sun Web Stack (henceforth, Web Stack), which contains popular, preconfigured tools for developing and running applications. Specifically, here are the components:

  • Apache software
  • MySQL database
  • PHP scripting language
  • Python programming language
  • Tomcat servlet container
  • Subversion version control system
  • Concurrent Versions System (CVS)
  • Squid caching proxy
  • memcached memory caching system
  • NetBeans IDE
  • Web Stack tools and UI

This article shows you how to install Web Stack on the OpenSolaris OS, a process that involves only a few simple steps.

Note: Web Stack is an open-source project hosted at opensolaris.org. To recommend or request new components in Web Stack, or to provide other feedback, participate in the project's mailing lists.

Contents
 
Download and Installation
Initialization
References
 
Download and Installation

Web Stack is available as part of the Image Packaging System (IPS) package amp-dev. Take a look at the details by running the pkg info command:

amp-dev is a large package (627 Mbytes in size) and takes several minutes to download and install. However, if you've already installed some of its packages, IPS recognizes that and does not download and install them again.

To install amp-dev, type:

% pfexec pkg install amp-dev

When installation is complete, the output looks like this:

Initialization

Next, initialize Web Stack:

  1. In the Applications menu, choose Developer Tools > Web Stack Initialize. See Figure 1.
     
    Initializing Sun Web Stack
    Figure 1: Initializing Sun Web Stack

    A terminal is displayed.

  2. Type your root password at the prompt. See Figure 2.
     
    Running the Initialization Script
    Figure 2: Running the Initialization Script
    Click here for a larger image.
     

    When initialization is complete, the script posts a confirmation. See Figure 3.

    Confirmation of Initialization
    Figure 3: Confirmation of Initialization
    Click here for a larger image.
     

    The Developer Tools menu now includes a submenu for the Web Stack GUI tools, as in Figure 4.

    Submenu for the Web Stack GUI Tools
    Figure 4: Submenu for the Web Stack GUI Tools
    Click here for a larger image.
     
  3. Initialize the Service Management Facility (SMF) services for the Apache and MySQL servers. Type this command to restart the SMF manifest import service:
     
    % svcadm restart manifest-import
     
    Give the service a few seconds to load the new service descriptions as it restarts.  

To verify that the installation is successful, query the Apache and MySQL services with the svcs command. Here are the syntax and examples of the output.

You can now start Apache or MySQL from either the Start Apache2/MySQL Servers menu or from the Web Stack Options dialog box (Figure 5).

Web Stack Options Dialog Box
Figure 5: Web Stack Options Dialog Box
Click here for a larger image.
 

You can also start the servers from the command line:

% svcadm enable apache22
% svcadm enable mysql

For details on working with the Service Management Facility, see The Observatory blog What makes OpenSolaris interesting? Reason #2: SMF .

References

For more details, including those on the installed packages, see the OpenSolaris documentation Setting Up Your AMP Development Environment .You can also track the Web Stack project at opensolaris.org.

For ongoing tips, guidelines, and announcements on OpenSolaris, visit the Solaris Developer Center and The Observatory.

Rate and Review
Tell us what you think of the content of this page.
Excellent   Good   Fair   Poor  
Comments: