Setting up AMP Stack within OpenSolaris
By sriram on Jan 12, 2009
With the first release of OpenSolaris - OpenSolaris 2008.05 - I wrote this and this and this blog on how to use AMP stack for this platform. Well, these blogs very much holds true for the latest release of OpenSolaris - OpenSolaris 2008.11 .
However, OpenSolaris 2008.11 includes a nice GUI application known as Package Manager is available which further simplifies the process of downloading and configuring software applications that are available within its software repository.
Let us use this application in this blog to see how easy it is to get an AMP (Apache, PHP and MySQL) stack going on your OpenSolaris 2008.11.
Assuming you have successfully installed opensolaris , let us start Package Manager as shown here
Now, you will need to choose whether you need either
- amp - only the Apache
18.104.22.168.9, PHP 5.2.6 and MySQL 5.0.655.0.67 runtime
- amp-dev - complete development environment and its tools like cvs, subversion, netbeans along with amp runtime
and any other software packages that you are interested and click on Install / Update.
Before Package Manager actually installs the packages on your system, you will get another chance to review your selection like below.
Now, click on Next should start the installation process. That should all be required to complete the installation of AMP runtime stack for OpenSolaris.
Finally, if you are a GUI person and would prefer a GUI way to start/stop Apache and MySQL services as well as to edit your Apache configuration files then you might want to initialize the Web Stack environment as shown below
and will need to enter your 'root' password for the initialization to complete.
Now, if you are a command line person - like myself, you can manage your Apache and MySQL SMF service as below
For starting Apache and MySQL service, open a command line window and run the following command
pfexec /usr/sbin/svcadm enable http:apache22
pfexec /usr/sbin/svcadm enable mysql:version_50
Similarly, for stopping these services, run the following command:
pfexec /usr/sbin/svcadm disable http:apache22
pfexec /usr/sbin/svcadm disable mysql:version_50
If in case, you wonder what is SMF - you might wanna check out Service Management Facility project page for more information on how this is useful to you.