Showing posts with label administration. Show all posts
Showing posts with label administration. Show all posts

Wednesday, May 16, 2012

Using Vim Tabs Instead of Multiple Vim Instances

... I found out that you can open multiple files in tabs with one instance of vim, instead of across multiple instances of vims in different terminal windows!

vim -p *.py
Will open all python source files in the current directory in tabs inside vim.

gt and gT will move forwards and backwards in your tab list.

If you want to create a new tab with vim already running, use the following command:
:tabnew
Yeow!

Slow SSH Password Prompt

... I finally solved a small, but annoying issue I'd been having with SSH. I think it'd been happening since our newer VMs started using Centos6 instead of 5.

It was taking the guts of 10 seconds for the password prompt to appear whenever I  tried to SSH into the server.

I found that this was caused by some sort of reverse DNS lookup being done on my host.

Arsebiscuits to that!

Make sure that GSSAPIAuthentication is set to no as follows in /etc/ssh/sshd_config:


GSSAPIAuthentication no
Then restart your sshd service.

Wednesday, March 9, 2011

HPUX, Java and Tomcat

... I was presented with a lovely HPUX VM by HP's partner program.

Having not used a UNIX-based operating system for many years (even then I had NO wish to be anywhere near them), I was faced with the fairly daunting task of deploying our software on the VM using Tomcat Application Server.

That's all well and good when you see it written on paper - Tomcat is a beaut to work with compared to some of it's bigger, mostly uglier, but some times saner (time stamped logs are a winner, THANKS IBM) siblings in the Application Server family. Tomcat, of course, has a rather large dependence on our good friend, Java, so I decided this should be my first port of call.

So, off I wander to google and am soon going about downloading a Java 1.6 JRE from HP's site. Of course, the VM hasn't come with wget pre-installed, so I have to download the JRE to my local file system before SCPing it to the VM. Post-download/Pre-Upload I figure I have to decide on a destination for the upload .depot file and, as most people in a UNIX-e world would, I take a gander at /opt.

This is where the fun starts.

An `ls -al` returns a huge list of goodies that have been thrown into the VM, presumably by the script that built it. These included java1.4 AND java1.5. This /opt directory is definitely my ferrero roche for the day - "spoilt" isn't the word.

With Java firmly on board, I take aim at google again, this time in search of tomcat. This is a slightly less informative affair with most results that have ANY info hinting towards a "build from source" holiday on board a pleasure cruise populated by me, my keyboard and a lovely family, The Dependency O'Hells, with their 5,000 screaming children.

2 hours have passed and I'm four or five pages deep in the google results of "tomcat+hpux". I see what looks like the product of a results farm, with ads splattered left, right and left, but on closer inspection, it would appear that I have found my holy hand grenade - "HP Web Suite". This little bundle includes Tomcat and the tab-complete-less morning I have had looks like it's finally reaching it's Hardy Boys conclusion. The bad guy has AGAIN tried to break into my office and wreck my day. I have just HAPPENED to be lucky as hell and stumbled across his secret hiding place in a remote location known only to Jim Corr. When it looked like I was about to fall off the cliff of Bourne HELL into a boiling pot of "security through obscurity"..... Mr. Hardy bursts through the door with 9,000 of his closest mercenary friends and saves the day.

On the final leg of my trip, I take one more stop at google to find the packages required for installation of this bad boy. I'm skimming over installation instructions when I spy my old friend, /opt...... I look again. I see the line "/opt/hpws/".... The once retreating clouds are now doing u-turns on a one way street and heading straight for me. I take the plunge, I browse to the directory and THERE. Before me it stands proud. After 2.5 hours of head melt.

Already installed.

"Tomcat"