{"id":1325,"date":"2013-10-29T20:37:56","date_gmt":"2013-10-29T19:37:56","guid":{"rendered":"http:\/\/www.xenonique.co.uk\/blog\/?p=1325"},"modified":"2013-10-29T20:41:04","modified_gmt":"2013-10-29T19:41:04","slug":"day-1-contract-mac-os-x-client","status":"publish","type":"post","link":"https:\/\/www.xenonique.co.uk\/blog\/2013\/10\/29\/day-1-contract-mac-os-x-client\/","title":{"rendered":"Day 1 Contract Mac OS X Client"},"content":{"rendered":"<p>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.<\/p>\n<p>First thing is to set up BASH PROFILE<\/p>\n<p>Set up BASH profile with the following command.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nset -o emacs\r\n# Do not exit on EOF. To exit the shell type `exit'\r\nset -o ignoreeof\r\n# Do not allow output redirection (&gt;) to overwrite an existing file\r\nset -o noclobber\r\n# set the core limit\r\nulimit -c 10240\r\n\r\nset history=100\r\nset savehist=50\r\n\r\n## export LDFLAGS='-lpthread'\r\n## Slackware: export LS_OPTIONS='--8bit --color=tty -F -b -T 0'\r\n## export LS_OPTIONS='--color=tty -F -b --author'\r\n## export LS_OPTIONS='--color=tty -F'\r\nexport LS_OPTIONS='-F'\r\n\r\n# Aliases\r\nalias ls=&quot;\/bin\/ls $LS_OPTIONS&quot;\r\nalias ll='ls -l'\r\nalias lsd='ls -ld'\r\nalias la='ls -a'\r\nalias lf='ls -F'\r\nalias lr='ls -alFRt'\r\nalias lx='ls -xF'\r\nalias llar='ls -laFR'\r\nalias lt='ls -lartF'\r\nalias lrt='ls -lrt'\r\n\r\nalias home='cd ${HOME}'\r\nalias up='cd ..'\r\nalias pe='printenv'\r\nalias senv='env | sort'\r\nalias pu='pushd'\r\nalias po='popd'\r\nalias pud='pushd .'\r\nalias rot='pushd +1'\r\nalias rot2='pushd +2'\r\nalias rot3='pushd +3'\r\nalias rot4='pushd +4'\r\nalias brot='pushd -1'\r\nalias brot2='pushd -2'\r\nalias brot3='pushd -3'\r\nalias brot4='pushd -4'\r\nalias jobs='jobs -l'\r\nalias mroe=more\r\nalias lses=less\r\nalias lsse=less\r\nalias l=ls\r\nalias f=file\r\nalias c=cat\r\nalias m=more\r\nalias j=jobs\r\nalias k=kill\r\nalias d=dirs\r\nalias h=history\r\nalias his=history\r\nalias hm='history | less'\r\nalias sy3='sync; sync; sync; echo &quot;sync 3 times ...&quot;'\r\nalias del='rm -i'\r\nalias bye=exit\r\nalias ciao=exit\r\n\r\nalias macjava='\/usr\/libexec\/java_home'\r\n\r\nalias vibashpro='vi ~\/.bash_profile'\r\nalias rebashpro='. ~\/.bash_profile'\r\n\r\nPS1=&quot;`whoami`@`hostname` [\\$HISTCMD] &gt; &quot;\r\nexport PS1\r\n\r\nOLDPATH=\/usr\/bin:\/bin:\/usr\/sbin:\/sbin:\/usr\/local\/bin\r\n\r\nexport JAVA_HOME=\/System\/Library\/Java\/JavaVirtualMachines\/1.6.0.jdk\/Contents\/Home\r\n\r\nexport GRADLE_HOME=\/Library\/opt\/gradle-1.8\r\n\r\nexport GROOVY_HOME=\/Library\/opt\/groovy-2.1.7\r\n\r\nexport M2_HOME=\/Library\/opt\/apache-maven-3.1.1\r\n\r\nexport ANT_HOME=\/Library\/opt\/apache-ant-1.9.2\/\r\n\r\nPATH=.:${HOME}\/bin:\\\r\n${GROOVY_HOME}\/bin:${GRADLE_HOME}\/bin:${M2_HOME}\/bin:${ANT_HOME}\/bin:\\\r\n${JAVA_HOME}\/bin:${JAVA_HOME}\/jre\/bin:\\\r\n\/usr\/local\/git\/bin:\\\r\n\/usr\/bin:\/bin:\/usr\/sbin:\/sbin:\/usr\/local\/bin\r\nexport PATH\r\n<\/pre>\n<p>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 <code>1.6.0_45-b06-451<\/code>. Also notice how handy alias <code>macjava<\/code> is and it helps to write <code>macjava -x<\/code> on the command line.<\/p>\n<p>*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?)<\/p>\n<p>**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&#8217;t have the need for nroff on Apple computers anymore.<\/p>\n<p>Reveal hidden files in MacOS X to find pesky troublesome files:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% defaults write com.apple.Finder AppleShowAllFiles TRUE\r\n<\/pre>\n<p>Afterwards, turn it off again, when we have completed the second or third contractor day at the client with:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% defaults write com.apple.Finder AppleShowAllFiles TRUE\r\n<\/pre>\n<p>Ensure the system Library folder is visible:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% sudo chflags nohidden \/Library\r\n<\/pre>\n<p>Ensure the HOME Library folder is visible:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% sudo chflags nohidden ~\/Library\r\n<\/pre>\n<p>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.<\/p>\n<p>Download Maven 3.1.1 (https:\/\/maven.apache.org\/)<br \/>\nDownload Groovy 2.1.7 (https:\/\/groovy.codehaus.org\/)<br \/>\nDownload Tomcat 7.0.42 (https:\/\/tomcat.apache.org\/)<br \/>\nDownload Gradle 1.8 (https:\/\/gradle.org\/)<br \/>\nYou might also have to download Ant 1.9 (https:\/\/ant.apache.org) from some brain-dead task or so.<\/p>\n<p>Install all of the above in the folder \/Library\/opt, assuming admin rights to the machine.<\/p>\n<p>% sudo mkdir -p \/Library\/opt<br \/>\n% chown -R peterpilgrim \/Library\/opt<\/p>\n<p>Now we can just to things like this:<\/p>\n<p>% cd ~\/Downloads<br \/>\n% unzip apache-maven-3.1.1.zip -d \/Library\/opt<\/p>\n<p>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, &#8220;Bob is your uncle.&#8221;<\/p>\n<p>Ensure the BASH profile agrees with installation folders.<\/p>\n<p>Install IDEA 12<br \/>\nInstall Eclipse Kepler with Web Tool Platform<br \/>\nInstall Sublime 2 (https:\/\/www.sublimetext.com\/2)<\/p>\n<p>Install GIT for Mac OS-X https:\/\/git-scm.com\/download\/mac<br \/>\nThe executable is found as the path \/usr\/local\/git\/bin\/git<br \/>\nSet this path is an IDEA preference.<\/p>\n<p>Also worth getting is Atlassian SourceTree, which is now free and works for Git and Mercurial repositories (https:\/\/www.atlassian.com\/software\/sourcetree\/overview)<\/p>\n<p>That is the end of Contractor with Apple Mac Book Pro work machine Installation Day One (if you are very lucky) or Day Two.<\/p>\n<p>It is also worth looking at <a href=\"https:\/\/www.xenonique.co.uk\/blog\/?p=1019\" title=\"KeyRemap4MacBook for a Microsoft Natural Keyboard 4000\">configuration for Microsoft Natural Keyboard 4000<\/a>.<\/p>\n<p>+PP+<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. Substitute your own reference to Oracle or Apple provided [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[113,164,75,154,81,144,86,68,31,52],"tags":[],"_links":{"self":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1325"}],"collection":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1325"}],"version-history":[{"count":11,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1325\/revisions"}],"predecessor-version":[{"id":1366,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1325\/revisions\/1366"}],"wp:attachment":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}