Archive for September, 2006

NFS server + Automount on Solaris 10

I just followed the one-line command on this page. It’s amazing that a single command is all you need to enable NFS server.
Then, I followed the instructions on this page with one correction. I edited /etc/auto_home instead of /etc/auto.home.

After that, I edited /etc/passwd file and changed /export/home to /home. It worked beautifully.

Comments (3)

Configure Hibernate with Glassfish

I just followed this blog post. Here are additional nots:

For the step on copying libraries, refer to the _README or README in Hibernate’s /lib directory for runtime dependencies.

For more information about persistance.xml, see this page.

You might want to also see Connection Pool and JDBC Resources.

This is still work in progress for me. More notes later.

Comments (1)

Access an Oracle database with NetBeans 5.5 beta2

I just discovered that NetBeans can allows a user to access databases to view, edit, and execute commands. It looks pretty cool for an IDE. If you prefer to use command line, use sqlplus or command line tool for the database. If you use Windows operating system and Oracle database, TOAD could be another option. If you are using NetBeans and prefer to stay within the IDE, you can use its database features.

To get started, here are my notes on connecting to an existing Oracle database:

1. Click on Runtime tab on the panel on the upper left side.

2. Expand Databases node

3. Right click on Drivers and choose New Driver

4. Click Add

5. Choose class12.zip file from your local file system and click Open
6. Click Ok to accept the default config

7. Right click on database and choose New Connection

8. Seect Oracle driver

9. Change <HOST> with proper host name. Change <PORT> with proper port number. And change <SID> with the proper SID value.

10. Enter a user name and password for the database.

11. Click OK

12. You should see an extra node that shows the connection you established. Expand the code and browse around. Right click on a node and see what tasks you can do.

This little discovery certainly was a pleasant surprise.

Comments (106)

Studio 11 on Solaris 10 x64 installation notes

The notes that I have here are nothing special when compared to the official installation documentation. The official documentation and FAQs have extra troubleshooting guidelines that I don’t need or did not encounter. One key task that I did was make sure I installed all patches, which saved me some grief. ;)

1. Download required patches.
2. Install Solaris 10 patches using the following command:

patchadd -M <your_patch_directory> <patch-id> <patch-id> ...

Instruction source.

3. (Optional) To double check, run the following command and do a search use “/<patch_number”:

showrev -p |less

You can also use the following command:

showrev -p |grep <patch_number>

4. (Recommended) See the following links:
* Official Developer Portal
* Official forum
* Official FAQ
* Unofficial FAQ
* Official documentation : Installation Guide

5. Downoad the binary

6. Extract

bzcat  studio11-sol-x86.tar.bz2 |tar xvf -

7. Run installer

./installer

8. Click Next

9. Click Accept and click Next

10. Uncheck any locale you don’t want and click Next

11. Accept Default Install options and click Next

12. Accept default install directory (/opt) and click Next

13. Click Install Now

14. Click Exit, click Exit on the pop-up confirmation window

15. Install Studio 11 patches downloaded in #1. See #2 for installation instruction. Note: I had to use -G to install in global zone only. I also had to install patch #121022 before I can install patch #121020.

16. (Optional) Add /opt/SUNWspro/bin to your PATH environment variable.

Comments (1)

A few ImageMagic notes

ImageMagic is a collection of useful command line tools that  allows you to edit an image without using a heavyweight photo editing application like Photoshop or GIMP. This is great for batch processing a large volume of images. Here are a few tasks that I found useful for my own uses:

To rotate an image:

convert -rotate <degree> <src file> <target file>

To resize an image:

convert -geometry 800x600 <src file> <target file>

To add watermark:

composite -dissolve 50% -gravity SouthEast -geometry +5+5 <watermark file> <src file> <target file>

composite command deserves an additional comment. The -dissolve option defines how visible you want the watermark image to appear on your target image. -gravity option defines which side/corner you want to place the watermark in the target image. The choices are NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast -geometry option allows you to define offset values on the placement after applied -gravity option. In the command above, the input values will cause the watermark image to move 5 units (first +5) left of the right boarder and 5 units (second +5) above the bottom border. So there is a little bit of space between the boarder of the target image and the border of the watermark.

See official web site for more information.

Comments (4)

It’s unfortunate bluehost.com failed on their last mile

While browsing around on web hosting companies, I came across bluehost.com. They offer a very competitive package with many great features and values. At the time of this blog post, they offer 30GB of space, 750GB of traffic/mo, lots of php web applications available, shopping cart, awstats/webalizer, certificate, etc. All these are for a low price of $6..95/mo if sign-up with them for 2 years. I was really impressed by how much the customer can get for so little money.

To make sure this is really a good deal, I went on to read user reviews. Just about all are great. I noticed one user stated that the hosting company requires an extra identification before they would permit ssh/shell access for an user. Although their term of service do say that they will protect customer’s privacy, asking for driver’s license or passport seem a bit overkill and may raise concerns about the safety of personal data.

Such an extra identification requirement got me thinking a bit more and I went to bbb.org and looked up their record. Oh boy. That is a deal killer. Matt, If you ever read this, tell your customer support department to resolve the complaints ASAP.

I am sure they work very hard to deliver the best value and service in this cut throat business. Combined with their recent service issues, I would give them a bit of time and check back later to see if they improve. So, I would not recommend bluehost.com until they get their act together.

Comments (3)

A bug in php5 module for Apache HTTP server

I just updated Apache HTTP server and all of its modules on a Solaris 10 x64 server today through blastwave’s package repository. I noticed that the server can’t load libphp5.so. A google search on the net revealed that this is a well known issue. So, I workedaround the issue by copying /opt/csw/lib/php/sapi/apache2-libphp4.so to /opt/csw/apache2/libexec/apache2-libphp4.so and edit the following lines in /opt/csw/apache2/etc/httpd.conf

Remove/comment out the following line:

LoadModule php5_module        libexec/libphp5.so

and replace it with the following line:

LoadModule php4_module        libexec/apache2-libphp4.so

Change the following line from:

<IfModule php5_module>

to:

<IfModule php4_module>

And start the server. Fortunately, Subversion works with either php4 or php5 and I was able to start the server and get Subversion server running again. :)

Leave a Comment

A subjective comment about VNC vs. set display

A couple weeks ago, I used set display and foward a rich client application’s display across a very long distance network, it was a very painful experience. Today, I used VNC server to do essentially the same thing over the same distance. The difference was night and day. I was able to use the remote application with no significant lag. I am much happier with the current experience. I am not sure if the difference was caused by network or not and that’s why I titled this post as subjective. So, your milage may vary. You have any similar/different experience?

Comments (2)

How to checkout and open a NetBeans project from a Subversion server using NetBeans 5.5 beta2

1. cd to the bin directory in NetBeans. i.e. cd ~/netbeans-5.5beta2/bin
2. ./netbeans
3. If you have proxy server, click Proxy Configuration, else skip to #6
4. Enter Proxy Host name
5. Enter Proxy Port and click OK
6. Tools –> Update Center
7. Click Next
8. Select Subversion and Click Add
9. Click Next
10. Click Accept
11. Click Accept again
12. Click Accept for the third time (you are downloading 3 components and need to accept to the license agreement to all 3)
13. Click Next when all modules are downloaded
14. Click Finish
15. Subversion –> Checkout
16. Enter Repository URL
17. Enter a User name
18. Enter a Password
19. Click Next
20. If you want to change the local folder for checked out files, click Browse and choose/create a local folder.
21. Click Finish
22. If the project is in NetBeans project format, you should see a pop-up window asking if you want to open the project. Click Close or cancel. You need to correct some of the path references before you can begin.
23. Go into <checkout project directory directory>/private
24. vi private.properties
25. All path references are full path and are specific to the machine that the initial project creator used. So, you may want to change all path to the correct location for your local environment. In vi, you can use

%s/original_text/new_text/g

to search and replace globally. All “/” characters should be escaped by adding a “\” before each “/” that is supposed to be part of the path. (Note: Somehow I can’t figure out how to make wordpress to show the two characters next to eachother. So, let me know if you know how.)
26. File –> Open Project
27. Choose the project folder and click Open Project Folder

Leave a Comment

“universal wireless access for the benefit of the public”

Folks at Seakay established a big goal for them selves. It certainly looks bigger than Google’s wifi project. Hopefully more open access to wifi, it might lead to wider adoption to interesting mash-ups like this, or more creative use of Location Based Services.

Leave a Comment

Older Posts »