Saturday, November 30, 2013

3 Steps to Run H2 Database in Ubuntu server remote

Step 1: Pre-requisite: make sure you have Java installed from your machine

Step 2: From you console / terminal download H2 Database jar file:
wget http://repo1.maven.org/maven2/com/h2database/h2/1.3.174/h2-1.3.174.jar 
Step 3: Execute the command below from the (one-line)
java -cp ./h2-1.3.174.jar org.h2.tools.Server -web -webPort 8081 -webAllowOthers -tcp -tcpPort 8082 -tcpAllowOthers -baseDir [data_folder_location]
Now let's verify if the server is running.

Open a browser from a different machine and type the IP address of your Ubuntu server and port 8081 (i.e. http://[IP_ADDRESS]:8081). This will display the remote console web UI for your H2.


After connecting to the database, you will see a new file created from [data_folder_location]and an Admin Console will display from your browser (pls refer screenshot below). You can start creating your schema, tables, etc.



Note: If you don't have Java installed from your Ubuntu server, the H2 database will not work. To verify if you have Java version "java -version". For more information regarding Java installation from Ubuntu please visit the link http://interface101.blogspot.com/2013/11/how-to-download-java-7u45-ubuntu.html

Hope this will guide for those who are looking for quick configuration of H2 Database. 

If you have any questions or comments, please don't hesitate to comment below.

How to download Java 7u45 Ubuntu console or terminal using WGET command?

When downloading a Java JDK installer using a simple "WGET" command from Ubuntu terminal or Mac OS terminal, you will end of getting an HTML file because it requires you to click the "Accept agreement..." from the web browser. In my case I need to download it from a console or terminal because my server doesn't have ubuntu-desktop GUI installed.

To make the WGET command work from a terminal or console and download the Java JDK 7, use the command below:
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-x64.tar.gz"
The code snippet above is the command that I used to download the JDK 7u45 into my Ubuntu 12.04 64 bit Server from a terminal perspective. The command is just a one line.

Hope it helps for those who are looking for a quicker way.

That's all. 

Tuesday, October 15, 2013

Adobe Illustrator CS5 stopped working. Reason: ScriptingSupport.aip

I just recently encountered this error "ScriptingSupport.aip" when I tried to open my Illustrator CS5. It was working before and the only changes that I've made was adding a 4th monitor in replacement of my built-in laptop display.

The previous setup:
One monitor connected in DVI DELL M4600 docking station
Two monitor connected in Toshiba Dynadock and Dynadock was connected in USB of DELL M4600 docking station
One built-in DELL M4600 laptop display
Note: On this setup, the Illustrator CS5 was working fine

The current setup:
One monitor connected in DVI DELL M4600 docking station
Two monitor connected in Toshiba Dynadock and Dynadock was connected in USB of DELL M4600 docking station
One monitor connected in VGA DELL M4600 docking station
Built-in DEll M4600 laptop display is closed
Note: On this setup, the Illustrator CS5 has stopped working

To solve the error:
Close Illustrator CS5 if it still open
Disconnect one of the monitor, in my case I disconnected the 3rd monitor because it was my new additional monitor in replacement of my built DELL M4600 monitor
Apply the settings
Open Illustrator CS5 now and it will open successfully

Monday, July 22, 2013

How to fix the vFabric Web Server Error - Permission denied: access to / because search permission are missing - Linux

Permission denied: access to /favicon.ico denied (filesystem path '/opt/myserver/vfabricws') because search permissions are missing on a component of the path

[Mon Jul 22 16:08:30 2013] [crit] [client 10.1.1.88] (13)Permission denied: DBM failure while logging transaction in mod_bmx_vhost
[Mon Jul 22 16:08:31 2013] [error] [client 10.1.1.88] (13)Permission denied: access to /index.html denied (filesystem path '/opt/myserver/vfabricws') because search permissions are missing on a component of the path
[Mon Jul 22 16:08:31 2013] [crit] [client 10.1.1.88] (13)Permission denied: DBM failure while logging transaction in mod_bmx_vhost

I noticed that after I upgrade the server from ERS to vFabric WS, I encountered an error which I stated above. I listed below on how to fix it.

How to fix the error:

Step 1) Check the user and group owner of the folder where you install the vFabric Web Server (i.e. ls -l ).
            Example:
[rhserver]$ ls –l /opt/myserver/vfabricws
drwxrwxr-x. 2 wadmin wsgrp 4096 Jul 22 17:02 vfabricws
            The vabfricws user owner is wadmin and groupowner is wsgrp

Step 2) Open your file conf/httpd.conf and look for the text User vfhttpd and Group vfhttpd or sometimes User nobody or Group nobody
            Example:
User vfhttpd
Group vfhttpd
Or
User nobody
Group nobody

Step 3) Change User for vfhttpd or nobody to wadmin, and change Group owner from vfhttpd or nobody to wsgrp
Example:
User wadmin
Group wsgrp

Step 4) Save the httpd.conf file.

Step 5) Restart your vfabric WS (i.e. sudo ./httpdctl stop; sudo ./httpdctl start;)

Now verify if you still getting an error in you error.log

Sunday, April 14, 2013

VirtualBox VDI - Compacting to save space

For Windows Only: Easy way to compact or remove your unused space of VDI and free some space in your host drive.

Do this in your VDI Guest
Step 1: Defragmenter your disk drive. Use the simple Windows Disk Defragmenter. (Be patience coz this will take a while, it probably be finished after Pass 7 or 8)

Step 2: Execute "sdelete -c " example "sdelete -c C:". If you don't have sdelete, download it from Windows Sysinternals http://technet.microsoft.com/en-us/sysinternals/bb897443 and extract it.

Step 3: Shutdown your VDI and close VirtualBox
  Note: Before going to Step 4, make sure that your VDI is shutdown

Do this in your Host
Step 4: Open a command prompt

Step 5: Change your directory to where you install VirtualBox

Step 6: Type the command "VBoxManage modifyhd --compact" example: VBoxManage modifyhd "C:\VirtualBox VDIs\MyGuest.vdi" --compact.

If you noticed that I enclosed the location of my VDI with quote because I have space between VirtualBox and VDI, if you don't have space of the location of your VDI, you can ignore double quote.

Step 7: Wait until it finished the Step 6 then you have regain some disk space.

Enjoy Virtual Box VDI compacting!!

Thursday, February 7, 2013

How to Install NodeJS in Ubuntu 12.10 from package manager?

Instruction on how to install NodeJS in Ubuntu 12.10 64bit Server

Note: Line 2 is required if you encountered an error "Command Not Found" on Line 3.
Line 1: sudo apt-get install python-software-properties python g++ make
Line 2: sudo apt-get install software-properties-common
Line 3: sudo add-apt-repository ppa:chris-lea/node.js
You are about to add the following PPA to your system:Evented I/O for V8 javascript. Node's goal is to provide an easy way to build scalable network programs
More info: https://launchpad.net/~chris-lea/+archive/node.js
Press [ENTER] to continue or ctrl-c to cancel adding it
   gpg: keyring `/tmp/tmp2xgu27/secring.gpg' created
   gpg: keyring `/tmp/tmp2xgu27/pubring.gpg' created
   gpg: requesting key C7917B12 from hkp server keyserver.ubuntu.com
   gpg: /tmp/tmp2xgu27/trustdb.gpg: trustdb created
   gpg: key C7917B12: public key "Launchpad chrislea" imported
   gpg: Total number processed: 1
   gpg:               imported: 1  (RSA: 1)
   OK
Line 4: sudo apt-get update Line 5: sudo apt-get install nodejs npm
Enjoy NodeJS!!!