PEAT Online Course -
How To Improve Your Personal Performance in Java work Technology

  • Focus
  • Autonomy
  • Proficiency
  • Purpose
  • Covid-19!!!
  • Deep Hidden Meaning
  • FREE updates
Your Promo code: TECHLAYOFF
Exclusively on

Day 1 Contract Mac OS X Client

29 October 2013 Comments off

5 minutes


Hey this is just for me. Every time I start a new contract at client that has Mac OS X computers I find myself repeating setup just like Groundhog Day.

First thing is to set up BASH PROFILE

Set up BASH profile with the following command.

set -o emacs
# Do not exit on EOF. To exit the shell type `exit'
set -o ignoreeof
# Do not allow output redirection (>) to overwrite an existing file
set -o noclobber
# set the core limit
ulimit -c 10240

set history=100
set savehist=50

## export LDFLAGS='-lpthread'
## Slackware: export LS_OPTIONS='--8bit --color=tty -F -b -T 0'
## export LS_OPTIONS='--color=tty -F -b --author'
## export LS_OPTIONS='--color=tty -F'
export LS_OPTIONS='-F'

# Aliases
alias ls="/bin/ls $LS_OPTIONS"
alias ll='ls -l'
alias lsd='ls -ld'
alias la='ls -a'
alias lf='ls -F'
alias lr='ls -alFRt'
alias lx='ls -xF'
alias llar='ls -laFR'
alias lt='ls -lartF'
alias lrt='ls -lrt'

alias home='cd ${HOME}'
alias up='cd ..'
alias pe='printenv'
alias senv='env | sort'
alias pu='pushd'
alias po='popd'
alias pud='pushd .'
alias rot='pushd +1'
alias rot2='pushd +2'
alias rot3='pushd +3'
alias rot4='pushd +4'
alias brot='pushd -1'
alias brot2='pushd -2'
alias brot3='pushd -3'
alias brot4='pushd -4'
alias jobs='jobs -l'
alias mroe=more
alias lses=less
alias lsse=less
alias l=ls
alias f=file
alias c=cat
alias m=more
alias j=jobs
alias k=kill
alias d=dirs
alias h=history
alias his=history
alias hm='history | less'
alias sy3='sync; sync; sync; echo "sync 3 times ..."'
alias del='rm -i'
alias bye=exit
alias ciao=exit

alias macjava='/usr/libexec/java_home'

alias vibashpro='vi ~/.bash_profile'
alias rebashpro='. ~/.bash_profile'

PS1="`whoami`@`hostname` [\$HISTCMD] > "
export PS1


export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

export GRADLE_HOME=/Library/opt/gradle-1.8

export GROOVY_HOME=/Library/opt/groovy-2.1.7

export M2_HOME=/Library/opt/apache-maven-3.1.1

export ANT_HOME=/Library/opt/apache-ant-1.9.2/

export PATH

Substitute your own reference to Oracle or Apple provided JDK edition. JDK 6 editions are supplied by Apple Corp and as of October 2013, it was 1.6.0_45-b06-451. Also notice how handy alias macjava is and it helps to write macjava -x on the command line.

*Here the client has not upgraded to Java SE 7 for some particular reason. (Adobe CQ5 and Jack Rabbit Repository (JCR) are not compatible with Java SE 7, anybody out there know different? Has Adobe not fixed this issue?)

**I used to have a much deeper BASH PROFILE when I really got in Linux years ago, which is turn was derived from Solaris 1 and 2 in the 1990s. It had all sorts of aliases and commands for GNU emacs and Xemacs, nroff, troff and man pages. I was lost on some Dell Inspiron machine years ago and I don’t have the need for nroff on Apple computers anymore.

Reveal hidden files in MacOS X to find pesky troublesome files:

% defaults write AppleShowAllFiles TRUE

Afterwards, turn it off again, when we have completed the second or third contractor day at the client with:

% defaults write AppleShowAllFiles TRUE

Ensure the system Library folder is visible:

% sudo chflags nohidden /Library

Ensure the HOME Library folder is visible:

% sudo chflags nohidden ~/Library

Get Administration rights for the machine. Ask the system administrator to make my username part of the administration group. Some clients have machines that are locked down from Apple Mac App Store, these businesses say they cannot track application installed from it. This also means that updates like XCode and Apple Updates are blocked by the business.

Download Maven 3.1.1 (
Download Groovy 2.1.7 (
Download Tomcat 7.0.42 (
Download Gradle 1.8 (
You might also have to download Ant 1.9 ( from some brain-dead task or so.

Install all of the above in the folder /Library/opt, assuming admin rights to the machine.

% sudo mkdir -p /Library/opt
% chown -R peterpilgrim /Library/opt

Now we can just to things like this:

% cd ~/Downloads
% unzip -d /Library/opt

Rinse and repeat for other important software like Groovy, Ant or whatever else is a command line tool. Edit the BASH PROFILE and as they say, “Bob is your uncle.”

Ensure the BASH profile agrees with installation folders.

Install IDEA 12
Install Eclipse Kepler with Web Tool Platform
Install Sublime 2 (

Install GIT for Mac OS-X
The executable is found as the path /usr/local/git/bin/git
Set this path is an IDEA preference.

Also worth getting is Atlassian SourceTree, which is now free and works for Git and Mercurial repositories (

That is the end of Contractor with Apple Mac Book Pro work machine Installation Day One (if you are very lucky) or Day Two.

It is also worth looking at configuration for Microsoft Natural Keyboard 4000.


Hey all! Thanks for visiting. I provide fringe benefits to interested readers: checkout consultancy, training or mentorship Please make enquiries by email or
call +44 (0)7397 067 658.

Due to the Off-Payroll Working plan for the UK government, I am enforcing stricter measures on contracts. All potential public sector GOV.UK contracts engagements must be approved by QDOS and/or SJD Accounting. Please enquire for further information.