Are your ready to taste the awesome power of Docker? I hope you are. Because once you get your feet wet in Docker, you will be unstoppable :-). In this blog post, I want to quickly show you how you can install Docker on RedHat Enterprise Linux. The procedure should be similar in other flavors.
- First, login as root into your system. If you don’t have root access, you should at least have sudo access to root.
- Create a docker repository file as follows
- Use your favorite text editor to create a file named /etc/yum.repos.d/docker.repo
- Add the following contents
OK. So, you want to get AppDynamics controller installed on your Mac. Perhaps you want to test the awesome power of AppDynamics locally before purchasing the product. Great. In this blog post, I’m going to show you how to get AppDynamics Controller installed on your Mac. Let’s get to work.
- Login to https://aperture.appdynamics.com/download/
- Scroll down on the left pane and select the Mac check box
When working with shells, if your Mac does not show various colors automatically, you can enable them by two easy steps.
First add a line as shown below to your .bash_profile. This file should be under your home directory.
Second, add the following line in your .vimrc file. This file should be under your home directory. If it is not there, create one.
While Unix/Linux is the most popular OS for hosting enterprise java applications, there are still significant amount of applications deployed on Windows Platform. If your application is running on a Windows box, you ought to know how to get around Windows in order to support your application effectively.
In this piece, I’m going to share with you 10 tricks every Java Developer should know. I tested these in Windows 2008 R2. But it should work on most Windows flavors. Let’s get right to it.
1. Find the full command line of your java application
In Unix/Linux, if you need to see the full command line of your application, you can simply use ‘ps –ef’. For example,
ps –ef | grep <my application>
Alas! There is no ‘ps’ in windows. So, how do you do this? Say hello to Windows Task Manager.
Oracle Hotspot, IBM SDK, HP NonStop Server for Java, Jrockit…. Why so many flavors of JVM? And more importantly, why do you care ?
While it is Sun/Oracle that originally created the Java Virtual Machine, since JVM is basically a set of specifications, any vendor could create their own version of JVM. Several vendors jumped in to create their spin offs. Some are free and open source but some are proprietary. The following JVMs are prominent in the market today
In addition to the above, Apple has their own spin off that is used in MAC.
Sun/Oracle HotSpot is still the market leader (about 60%). Oh, by the way, you will be surprised to know that there are more than 30 JVMs out there. Did you know apache had its own JVM (Apache harmony) ?
Why do you care which JVM is being used?
As an Application Support Engineer, you have to care about the flavor of the JVM for four major reasons
In a JEE Application Server such Oracle WebLogic or IBM WebSphere, where exactly does JVM fit in?
In short, each instance of a JEE Application server runs as a JVM that executes one or more JEE Applications deployed. In other words, Application Server is yet another java application (a big one) that executes custom developed JEE Applications.
Earlier we saw how a JVM can be started by using the ‘java’ command and passing the class name as the parameter
In a JEE Application Server’s case, it will be something like this:
java –classpath /opt/jboss-as/bin/run.jar com.jboss.Main
The above example starts a Jboss Application Server. Note that there will be several additional Java command line parameters in real world.
Let us understand what a JEE Application Server really is.
A Java application is launched with the java command which starts a JVM and runs the application. As an Application support engineer, there are few basic operations that you will typically perform on the JVM. Here are they:
Starting the JVM simply means starting the Java application. A Java application is started using the java command.
java is the command
HelloWorld is the classfile without the .class extension
Note: Don’t use the .class extension in the java command. If you do, you will get an error
[ec2-user@java]$ java HelloWorld.class
Error: Could not find or load main class HelloWorld.class
There are numerous command line options for the java command. Here are some of the main ones you need to know.
As an Application Support Engineer, you will invariably end up managing Java based applications. JVM (Java Virtual Machine) is the all-important process that runs the Java Application you are going to manage (which can be either custom developed by your development group, or a commercial off the shelf product). It is imperative that you have a very good understanding of how JVM works.
Note: Some of the material in this section will be very basic that experienced Administrators can choose to skip.
At a high level:
- Java is a high level programming language (this is the code). A java program is a text file(s) that is/are human readable.
- Javac is a compiler program that compiles the human readable java code in to machine readable byte code.
- JVM (Java virtual machine) is a process that runs the java byte code. It is an implementation of specification created by Sun/Oracle.
Virtualization is a technique using which you can run multiple Operating Systems (aka Guest) in a physical server (host) by abstracting (or virtualizing) CPU, Memory, Disk and Network resources. The core component of any virtualization solution is Hypervisor – the software that performs the abstraction of bare metal resources.
Here are the primary benefits of using Virtualization:
- Save cost on hardware
- Centrally manage the infrastructure
- Add effective fault tolerance and high availability
- Dynamically update the infrastructure
The diagram below shows virtualization at a high level.