Saturday, April 21, 2012

SSH tunneling on Ubuntu


ssh -L 15401:IP/HOST:1521 -L 15301:IP/HOST:1521 -L 15300:IP/HOST:1521 userid@serverhost

For building a tunneling easier, better make a simple shell script and add it into path. and run with simple command.
I simply made "db" command to establish tunneling simply way
--- Check connection
netstat -an | grep 15

SSH client configuration on Ubuntu

SSH client configuration on Ubuntu

put your open ssh private key on below

/home/UserID/.ssh/id_rsa

set permission 700

Done

Wednesday, April 18, 2012

Usage of Maven J2EE archetype instead of using Eclipse dynamic web project.

Eclipse Dynamic Web project is not suitable for a maven based project to locate jsp, java, properties and test sources.
If you use that, you will start to configure complicated configuration build path, war destination target, test source location and packaging issues so on. I strongly recommend you to use maven archetype that follows maven directory convention.

It's appeared that "maven-archetype-webapp" archetype is little outdated to use for latest project.
The best way so far is, use codehaus webapp archetype.

For JDK5 based project
mvn archetype:generate -DgroupId=<your group> -DartifactId=<your artifact> -DarchetypeArtifactId=webapp-jee5 -DarchetypeVersion=1.3 -DarchetypeGroupId=org.codehaus.mojo.archetypes

For JDK6 based project
mvn archetype:generate -DgroupId=<your group> -DartifactId=<your artifact> -DarchetypeArtifactId=webapp-javaee6 -DarchetypeGroupId=org.codehaus.mojo.archetypes


I tried to generate without "-DarchetypeGroupId=org.codehaus.mojo.archetypes" option. then it will show error message.
"The desired archetype does not exist (org.apache.maven.archetypes:webapp-jee5-1.3:1.0)". the reason is the "org.codehaus.mojo.archetypes" archetype group is not maven default archetype group id. For more detail, please refer below link
http://docs.codehaus.org/display/MAVENUSER/Archetypes+List

After that, simply import this project into eclipse




Update manager Google Chrome update error "Requires Installation of Untrusted Packages" on Ubuntu

I have tried to update Chrome browser. but, It keep showing this error message "Requires Installation of Untrusted Packages"

After Google, nothing really worked what they said.

I just typed apt-get command instead of using update manager.
You just need to type 'sudo apt-get upgrade google-chrome-stable' and 'Y' two times. that's it.
and restart your computer. then you can use latest Chrome version.

$ sudo apt-get upgrade google-chrome-stable
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  google-chrome-stable
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.2 MB of archives.
After this operation, 2,556 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
WARNING: The following packages cannot be authenticated!
  google-chrome-stable
Install these packages without verification [y/N]? Y
Get:1 http://dl.google.com/linux/chrome/deb/ stable/main google-chrome-stable amd64 18.0.1025.162-r131933 [27.2 MB]
Fetched 27.2 MB in 12s (2,249 kB/s)                                            
(Reading database ... 262166 files and directories currently installed.)
Preparing to replace google-chrome-stable 17.0.963.78-r125577 (using .../google-chrome-stable_18.0.1025.162-r131933_amd64.deb) ...
Unpacking replacement google-chrome-stable ...
Processing triggers for man-db ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Setting up google-chrome-stable (18.0.1025.162-r131933) ...

Sunday, April 15, 2012

Email Send Via telnet

Once you have some local users registered, try sending mail to one of them with SMTP (port 25).

$ telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 172.16.1.131 SMTP Server (JAMES SMTP Server 3.0-beta3) ready Sat, 6 Nov 2010 17:31:33 +0100 (CET)
ehlo test
250-172.16.1.131 Hello test (aoscommunity.com [127.0.0.1])
250-PIPELINING
250-ENHANCEDSTATUSCODES
250 8BITMIME
mail from:<YOUR_NAME@YOUR_DOMAIN>
250 2.1.0 Sender <YOUR_NAME@YOUR_DOMAIN> OK
rcpt to:<YOUR_NAME@YOUR_DOMAIN>
250 2.1.5 Recipient <YOUR_NAME@YOUR_DOMAIN> OK
data
354 Ok Send data ending with <CRLF>.<CRLF>
subject: test

this is a test
.
250 2.6.0 Message received
quit
Connection closed by foreign host.
Try now to retrieve that mail using POP3 (port 110) or IMAP (port 143).

Now, I got a test email via telnet.