Wednesday, January 28, 2015

GHOST: glibc vulnerability (CVE-2015-0235) - How to fix the issue in Ubuntu and Red Hat

In Linux Ubuntu, the easy way to fix is update your library to the following version:


Follow the command below to update the Ubuntu library
  • $ sudo apt-get update
  • $ sudo apt-get dist-upgrade
In Linux Red Hat, the easiest way to resolved the issue is to update the glibc and nscd  packages on your system using the package release with the following errata: 


Thursday, January 8, 2015

What is working in IT in a non-IT Company vs an IT Software or Service Provider company?

After working in both conditions here are my observations:

Working for pure IT services company:

- I worked on many projects involved many technologies, latest and old.
- Less pressure during development since SDLC involved, sufficient time for
development. Even with agile also, I used to get much time to do things since we followed "agile way of estimating effort" 
- I used to get time to do things for my own learning, for example using JUnit ,MUnit, Mockito, writing unit test cases, doing POC, setting local dev environment using Virtual Box or VMware or Fusion and now, you can actually leverage the AWS for the cheapest t2.nano instance for almost $5 / month.
- I don't have to interact with customer directly unless I am in a big role.
- Challenging work environment and you will be on the go. 

Working for non-IT company as an IT support engineer:

- Working closely with customers (people who doesn't know technology well).
- Things changes so fast, even after project launch I used to get change requests to modify something instantly! 
- Very tight schedules and too much pressure.
- Once project goes live I used to get couple of weeks to one month free time.
- I am only working on one project, to support the users on technical issues etc. I am quite familiar with the system now and there is nothing to learn much. 
- Not so challenging, doing simple things within shortest time is challenging.

- Convincing users on certain things is difficult. Whenever we tell them that certain things cannot be done this way or that way, they immediately says "if you can't do it, why you need this computer system?"

Hard to pick which field you want to take:

To work in a IT Service company, is fun and you will envolve on different company, high expectation of course, don't afraid if you fail because the today's failure can make way for your tomorrow's triumph...

To work in IT support or in-house is kind of layback especially if your rule is supporting internal client. You can make your life busy if you want to. Make your own challenge but it's up to you. You can do that or just go with the flow.


Wednesday, August 27, 2014

How to download Java 8 or JDK 8 in Linux using WGET command

Just want to make it short: If you're using a Linux that does not have UI and want to download Java 8 or JRE 8 just follow the command below:

wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jre-8u20-linux-x64.tar.gz"

The command I listed above will simply download the Server JRE 8. You can change the URL location if you want to download a different version of JDK. To get the actual URL for the download location, open an internet browser and enter the URL "http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html" and right click on the download file that you want to download then click "Copy link address"


Thursday, June 26, 2014

Customized Maven Settings for Different Workspace - One Workspace Per Project

I've been looking for a solution on how to customized the maven settings for different project but there was none. So, I've created my own solution on this blog on how to do it, instead of customizing each project, I basically configure it on each workspace. My practice is one workspace for each project. This is what I have done so far:

Step 1: 
  • Open Eclipse or Springsource Tool Suite (STS) IDE
Step 2: 
  • Click Window - Preferences
Step 3: 
  • In Filter box, enter "Maven"
Step 4: 
  • Click the Installation and add the Maven home that you have in your computer. In my case I downloaded Maven 3.2.1 then extracted the TAR.GZ file to C:\Devtools\Apache\Maven\3.2.1
Step 5: 
  • Click User Settings then Browse the settings.xml file. In my case the location of the settings.xml is C:\Devtools\Apache\Maven\3.2.1\conf\settings.xml then click Update Settings and click Apply then Click OK.
That's it. That's my 5 easy steps.

Regarding changing the path of your local repository, you need to add the following code inside the settings.xml file from our maven conf directory:

<localRepository>D:/Devtools/Maven/Repository</localRepository>


Tuesday, April 1, 2014

Patching CVE-2014-0160 on your Ubuntu Linux using OpenSSL for your HTTP Server

For Ubuntu 12.04 SSL version - You need to patch this version to use the latest OpenSSL. On my server, the OpenSSL version was built on July 3 2012. I provide a simple and straightforward solution below: command: openssl version -a OpenSSL 1.0.1 14 Mar 2012 built on: Tue Jul 3 20:15:07 UTC 2012 platform: debian-amd64 Simple and straightforward solution. Issue the following command from your console or terminal: Step 1 -Update your Ubuntu command: sudo apt-get update Step 2 -issue a patch for the openssl command: sudo apt-get install -y libssl1.0.0 openssl Step 3 - Lets confirm the version of the openssl that you've just update command: openssl version -a built on: Mon Apr 7 20:33:29 UTC 2014 platform: debian-amd64 If you're using a web server (i.e. HTTP, IIS) with SSL enabled, all you need is just restart your web server and your web site is now safe.

Friday, March 28, 2014

Switch Java Version in Mac OS - Java 1.7.0_51

Why after installing a newer version of Java, it doesn't reflect immediately on your profile to use the right version?

Anyway, I have a simple solution on how to switch java in Mac OS. My Mac have different version of Java and I want to switch it anytime I want depends on the project that I'm working. Let's do it in 4 simple steps:


Step 1:(Check what is your current java version)
Enter the command:
   java -version
Output:
  java version "1.7.0_25"
  Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
  Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Step 2: (Display all the installed Java from your Mac OS)
Enter the command:
  /usr/libexec/java_home -V
Output:
Matching Java Virtual Machines (5):
    1.8.0, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
    1.7.0_51, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
    1.7.0_25, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home
    1.6.0_65-b14-462, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-462, i386: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

Step 3: (I will use the Java 1.7.0_51)
Enter the command:
  export JAVA_HOME=$(/usr/libexec/java_home -v 1.7.0_51)

Step 4:(Check what is your current java version after you execute the Step 3)
Enter the command:
   java -version
Output:
  java version "1.7.0_51"
  Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
  Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)


Step 5:(Update your bash_profile)
Enter the command:
 sudo nano ~/.bash_profile
Add the following line or update the export JAVA_HOME line and the save it (CTRL X):
  export JAVA_HOME=$(/usr/libexec/java_home -v 1.7.0_51)



Tuesday, February 11, 2014

SpringSource Tool Suite 3.4.0 and Tomcat 8.0.1 - Unknown version of Tomcat was specified

The STS 3.4.0 latest release doesn't recognize the Tomcat 8.0.1 when adding it to a runtime server environment.

When adding the Tomcat 8 to Server Runtime Environment, you will encounter "Unknown version of Tomcat was specified." or "The Apache Tomcat installation at this directory is version 8.0.1.  A Tomcat 7.0 installation is expected."

I noticed that the last Apache Tomcat Version available in STS 3.4.0 environment is Apache Tomcat 7.

Anyway, you can make Tomcat 8.0.1 run in STS 3.4.0 by simple tweaking the ServerInfo.properties inside the catalina.jar folder. Please follow the simple steps below:

1) Open the catalina.jar using 7z in Windows.
2) Browse to org/apache/catalina/util
3) Open the ServerInfo.properties and replace or comment the 8.0.1 information to 7.0.47.A.RELEASE

Example:

From:
#server.info=Apache Tomcat/8.0.1
#server.number=8.0.1.0
#server.built=Jan 29 2014 11:13:21

To:
server.info=TC 8.0.1 to TC 7 Tweak/7.0.47.A.RELEASE
server.number=7.0.47.0
server.built=Oct 28 2013 08:15:22
4) Save the text then close the 7z.

That's it.

If you're using Mac and need more info, please leave a comment.