Getting Started with the Sun Web Stack
At OSCON back in July the Sun Web Stack was unveiled. The Sun Web Stack contains all the popular tools needed to develop and run a web application, all pre-configured to work together. Specifically, the stack includes the following components:
- Apache
- MySQL
- PHP
- Python
- Tomcat
- Subversion
- cvs
- Squid
- memcached
- NetBeans
- WebStack Tools and UI
The stack is available as IPS package amp-dev:
bleonard@opensolaris:~$ pkg info -r amp-dev
Name: amp-dev
Summary: AMP Development cluster
State: Not installed
Authority: opensolaris.org (preferred)
Version: 0.5.11
Build Release: 5.11
Branch: 0.86
Packaging Date: Thu Aug 21 18:24:48 2008
Size: 0 B
FMRI: pkg:/amp-dev@0.5.11,5.11-0.86:20080821T182448Z
Note, the amp-dev package is large, 627 MB, so plan to give it several minutes to download and install. However, if you already have some of the packages installed, IPS will reconginze that and not download and install them again.
So to install it:
bleonard@opensolaris:~$ pfexec pkg install amp-dev DOWNLOAD PKGS FILES XFER (MB) Completed 50/50 19765/19765 618.03/618.03 PHASE ACTIONS Update Phase 2/2 Install Phase 22409/22409 PHASE ITEMS Reading Existing Index 8/8 Indexing Packages 50/50
After installation there will be an option under the developer tools menu to Initialize the web stack:
The initialization process will open a terminal where you'll need to enter your root password:
http://blogs.sun.com/observatory/resource/200809_sun_web_stack/Screenshot-Terminal.png
And the the initialization will complete:
After which the menu for the web stack GUI tool will be available to you:
However, before you can start the Apache and MySQL servers, their SMF services need to be initialized. You can accomplish this by restarting the SMF manifest import service as follows:
svcadm restart manifest-import
Give the manifest-import service a couple of seconds to load the new service descriptions as it restarts. When complete, you can properly query the services:
bleonard@opensolaris:~$ svcs -l apache22 fmri svc:/network/http:apache22 name Apache 2.2 HTTP server enabled false state disabled next_state none state_time Fri Sep 12 18:39:33 2008 restarter svc:/system/svc/restarter:default dependency require_all/error svc:/milestone/network:default (online) dependency require_all/none svc:/system/filesystem/local:default (online) dependency optional_all/error svc:/system/filesystem/autofs:default (online) bleonard@opensolaris:~$ svcs -l mysql fmri svc:/application/database/mysql:version_50 name MySQL RDBMS enabled false state disabled next_state none state_time Fri Sep 12 18:39:32 2008 restarter svc:/system/svc/restarter:default dependency require_all/none svc:/milestone/network:default (online) dependency require_all/none svc:/system/filesystem/local:default (online)
And then successfully start them using either the Start Apache2/MySQL Servers menu, or the Web Stack Options dialog:

And you should be all set. You can quickly test your setup using the sample applications that ship with the web stack.
For more information, including the details of all the installed packages, see Setting Up Your AMP Development Environment. You can also track the Web Stack project at OpenSolaris.org.
Is there any way to download Web Stack in .pkg format or as an executable ?
I need this for my friend who has problems with the Network Driver. So he cannot use IPS.
Posted by Ashwin Bhat on September 17, 2008 at 12:53 PM GMT #
Is there any other alternative to Cool Stack ?
http://cooltools.sunsource.net/coolstack/#Downloads
Posted by Ashwin Bhat on September 17, 2008 at 01:01 PM GMT #
Ashwin, yes, Cool Stack is the optimized Sun Web Stack for Solaris 10. It is available in pkg format and runs fine on OpenSolaris.
Posted by Brian Leonard on September 18, 2008 at 05:33 PM GMT #
Based on the (relatively negative) experiences I had with OpenOffice.org and Firefox 3.0, I don't think I am going to install such an important package cluster with IPS, at least at the present time.
I am running os0811_98, and I think I am going to install the Cool Stack instead of using the IPS packages as described here.
Any comments? Thanks.
Posted by W. Wayne Liauh on September 21, 2008 at 11:35 PM GMT #
I am trying very hard to get my Johnson Family Network up and running.
Posted by Paul Johnson on October 14, 2008 at 12:37 PM GMT #
Wayne,
Yes, there are some IPS bugs in 2008.05 that can make installing packages a risky endeavor. This is generally because you may be installing a package that was built using a build that differs from the one you are using. However, the amp-dev package was built using build 86 (the same build as 2008.05). You can see this in the Branch property above when I run pkg info.
/Brian
Posted by Brian Leonard on October 17, 2008 at 06:58 PM GMT #