Skip to content
 

Test and Deploy in virtual times Part 3

So, now that we have a running OpenSolaris install in our VirtualBox, let’s get to the next step: Installation of Glassfish and MySQL

First: Installation of Glassfish

Let’s take the easy approach and use the built-in graphical tools. This is specifically easy as both applications are integrated into OpenSolaris Package Manager. So startup the Package Manager (you can see a link to it on the Desktop). There is an icon called “Add more software”, just double-click on this and the Package Manager will start up. It will look like this:

Initial View of Package Manager

Initial View of Package Manager

Give it some time to update it’s catalog. Then select the category Web and find Glassfish. Click on the selection and then press the “Install”-Button.

Select Glassfish Package

Select Glassfish Package

The Package-Manager checks the dependencies and downloads Glassfish plus potentially additional packages which Glassfish depends upon. All required packages will be installed and Package Manager keeps you informed about the steps taken:

Package Manager keeps you informed

Package Manager keeps you informed

Then you can do the configuration and there is a great entry on this blog:  http://blogs.sun.com/observatory/en_US/entry/glassfish which describes creating domain1 (in a self-defined directory) and also setting up Glassfish as a Service in OpenSolaris.
NOTE: in order to change the default path for the domain and go along with the blog’s author, I needed to use pfexec vi /usr/appserver/config/asenv.config as the file is writable for root only.

I also recommend to save the output of the create-domain command as it includes the list of the network ports to which Glassfish will listen.Using the SMF Service for Glassfish makes it easy to administer the service and this is another great feature of OpenSolaris.

Second: Installation of MySQL

The installation of MySQL can be done as a single package, but there is a pre-configured package which makes it a lot easier. So I recommend to install the AMP Package. And a good description of how to install the AMP package, set the initial passwords and enable SMF Service for it, can be found at this blog-entry: http://blogs.sun.com/trawick/entry/setting_up_amp_with_glassfish

That’s it for now, next post will talk about configuring VirtualBox so that from the Macbook and specifically from NetBeans running on the MacBook we are able to connect to Glassfish and MySQL running on OpenSolaris in the VirtualBox.