Getting Ruby or AMP (Apache, MySQL and PHP) on OpenSolaris 2008.05
Today, Sun officially released a distribution - OpenSolaris 2008.05 based on a 3 year long open source effort happening with Solaris at Open Solaris web site. You can catch more on this release from here.
Now, if you are web developer interested in figuring out how it is useful to you, here is what you might like
* Ruby binaries can be downloaded and installed with the single command
Open a command line terminal window and run the following command
pfexec pkg install ruby
Now, you can Ruby specific components by doing some thing like
pfexec /usr/ruby/1.8/bin/gem install <component name>
* MySQL or PHP developers can get their binaries (again from a command line window) by doing some thing like
pfexec pkg install amp
The Apache, PHP and MySQL binaries are available under /usr/apache2 , /usr/php5 and /usr/mysql directories respectively. The corresponding configuration files are found under /etc/apache2 , /etc/mysql and /etc/php5 directories respectively.
* Once you have successfully install MySQL or Apache , you will need to initialize the SMF service. The following command does the initialization job for you.
pfexec /usr/sbin/svccfg import /var/svc/manifest/network/http-apache22.xml
pfexec /usr/sbin/svccfg import /var/svc/manifest/application/database/mysql.xml
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.
* Now, you can start these Apache and MySQL services by doing something like
pfexec /usr/sbin/svcadm enable network/http:apache22
pfexec /usr/sbin/svcadm enable database/mysql:version_50
Similarly, the way to stop these services, if you need to , you would do
pfexec /usr/sbin/svcadm disable network/http:apache22
pfexec /usr/sbin/svcadm disable database/mysql:version_50
* PHP runtime is configured by default within default Apache Service. So, you should be able to deploy PHP applications by simply writing a PHP application within Web Server document root directory - /var/apache2/2.2/htdocs.
That is all you need to do to get your web site up and running. If you want to do Joomla or MediaWiki, you can simply unpack these tar ball within the web server document root directory (/var/apache2/2.2/htdocs) and hit their index page . This is all you need to get them up and running.
Does this sound simple enough for you to try it out ?
Now, if you need to read more information on this , please check out the Getting Starting Guide from here . Kindly, give OpenSolaris 2008.05 a spin and let us as to what you think and how we can improve it


I wonder of you have the steps to intall amp on the Opensolaris 2008.11?
also, i tried
-pfexec pkg install amp
this is what I get
-pkg: 0/1 catalogs successfully updated:
Could not retrieve catalog from 'opensolaris.org'
URLError, reason: (8, 'node name or service name not known')
do you have any suggestions?
thanks!
Tom
Posted by hi Sriram on December 16, 2008 at 03:14 PM PST #
looks like the above error means that you do not have a valid internet connection do you could verify if you need to be under any proxy or some thing like that..
if you need to proxy to connect to internet, then you need to set htp_proxy in your shell environment before connecting to the internet.
also, within opensolaris 2008.11, you can also use the gui (updatemanager) to download and install amp
thanks
sriram
Posted by Sriram Natarajan on December 16, 2008 at 03:19 PM PST #
thanks Sriram, I did manage to get amp installed and it seems to be working.
do you know where to root web directory is?
this is the directory where i would save all my php files and apache will spit out the end results.
thanks again.
Tom
Posted by Tom on December 17, 2008 at 06:28 AM PST #
Tom - good to know that it worked out for you. the apache document root is in one of those weird unfriendly location - /var/apache2/2.2/htdocs
now, if you install this useful tool from the command line
pfexec pkg refresh
pfexec pkg install webstack-ui
and then followed by
applications -> developer tools -> web stack initialize.
this command would give you permission to directly write files under apache document root. check out this useful blog on this topic
http://wikis.sun.com/display/WebStack/Web+Stack+Getting+Started+Guide
http://dlc.sun.com/osol/docs/content/WEBSTACK/gfvda.html
http://www.netbeans.org/kb/docs/php/configure-php-environment-sxde.html
hope this helps
Posted by Sriram Natarajan on December 17, 2008 at 07:28 PM PST #
HI Sriram,
This is what I get when I type in this on the command line. Please advice.
sam@lcts1:~$ pfexec pkg install ruby
pkg: no package matching 'ruby' could be found in current catalog
suggest relaxing pattern, refreshing and/or examining catalogs
pkg: install failed: Unable to assemble image plan
Regards,
Sam
Posted by sam on January 17, 2009 at 09:55 AM PST #
HI Sriram,
This is what I get when I type in this on the command line. Please advice.
sam@lcts1:~$ pfexec pkg install ruby
pkg: no package matching 'ruby' could be found in current catalog
suggest relaxing pattern, refreshing and/or examining catalogs
pkg: install failed: Unable to assemble image plan
Regards,
Sam
Posted by sam on January 17, 2009 at 10:14 AM PST #
HI Sriram,
This is what I get when I type in this on the command line. Please advice.
sam@lcts1:~$ pfexec pkg install ruby
pkg: no package matching 'ruby' could be found in current catalog
suggest relaxing pattern, refreshing and/or examining catalogs
pkg: install failed: Unable to assemble image plan
Regards,
Sam
Posted by sam on January 17, 2009 at 10:16 AM PST #
hi
if you would like to install ruby, please use
pfexec pkg install ruby-dev
then you should be able to use ruby by doing /usr/ruby/bin/ruby ..
hope this helps
Posted by Sriram Natarajan on January 18, 2009 at 03:29 PM PST #