you're reading...


Setting up my development environment on new MacBook Pro

I recently got my new MacBook Pro. I plan to use this laptop for my development (Enterprise Java, Spring, AngularJS, Web et al.) as well as photo editing. This post explains steps I followed to setup my development environment on my new MacBook Pro.

– Install Growl from AppStore

  • Install Marked App from AppStore: Excellent preview app for Markdown documents. I use markdown to write my blog posts.

  • install Sublime Text 3: I recently started using to Sublime Text as my main text, blog and source editor. TextMate is another excellent editor for mac.

    • Create an Automator service to add menu to open folder/file in Sublime.
      • Select Service document type from the New Document dialog
        • Select Run Shell Script action
        • Set Service receives selected to files or folder from the dropdown
        • Set Shell option to bin/bash
        • Set Pass Input option to argument
        • Copy /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$@" in shell script text area
    • Create link to open Sublime from terminal (use subl -n )
      `sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl`
  • Install Firefox
    • Install Firebug plug-in
    • Install Empty Cache Button plug-in
    • Install Cookir Manager+` plug-in:
  • Install Chrome

  • Setup Bash
    I found the following links very useful for setting up my own bash profile:

    I use .bash_work file to keep my work related preferences and source it in the main .bash_profile like this

            if [ -f ~/.bash_work ]
                source ~/.bash_work
  • Install latest JAVA
  • Install XCode from AppStore

  • Install Homebrew, the missing package manager for OS X.

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Install Scala
    • Use brew
      brew install scala

      installed at /usr/local/Cellar/scala/2.10.3

      Note: Homebrew will install Scala in /usr/local, which is important for a number of reasons, and it also puts the man pages for the Scala tools in the appropriate place.

  • Install Mongo

    • Use brew
      brew install mongo

      To have launchd start mongodb at login:

      ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

      Then to load mongodb now:

      launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

      Or, if you don’t want/need launchctl (which is my preferred way), you can just run:

      • Add alias in ~/.bash_work:
        alias startMongo='nohup mongod &'
      • Use the following command to monitor mongo logs
        tail -F /usr/local/var/log/mongodb/mongo.log
      • Investigate the setup
        /usr/local/Cellar/mongodb/2.4.9/mongod --config /usr/local/etc/mongod.conf

      Note: Homebrew will install Mongo in /usr/local/bin

  • Install Git

    • XCode installed its own version of git in /usr/bin/git. But this is an older version (git version (Apple Git-47))
      It is difficult to upgrade this to the latest version (1.9.0). Best option is to install git to a different location and then soft link /usr/bin/git to a newer location.

    • Installed Git using Brew.

      brew install git

      Note: Homebrew will install Git in /usr/local/bin

      lrwxr-xr-x  1 rajan  admin    27B Feb 20 06:27 git -> ../Cellar/git/1.9.0/bin/git

      Note: If you get the error: Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
      You probably have installed XCode freshly and not accepted the license. Simply launch XCode and accept the license.

      Find out currently installed Git:

          which git
          Output should look like this:
              git is /usr/bin/git
              git is /usr/local/bin/git           
    • Create soft link to point to the latest git:
      sudo ln -sfv /usr/local/bin/git /usr/bin/git
    • To avoid any kind of git pack not installed error
      git config http.sslVerify false
  • Install Maven
    • Use brew
      brew install maven

      Note: Homebrew will install Maven in /usr/local/bin

      lrwxr-xr-x  1 rajan  admin    29B Feb 20 06:32 mvn -> ../Cellar/maven/3.1.1/bin/mvn

      Run mvn -version to ensure that Maven is installed correctly.

  • Install Eclipse

    • Download latest JEE eclipse (eclipse-jee-kepler-SR2-RC3-macosx-cocoa-x86_64.tar.gz)
    • unzip in to ~/tools directory
    • Optionally create alias:
      alias eclipse='~/tools/eclipse/Eclipse'
  • Install Scala-IDE Plugin
  • Install NodeJS and npm: Node Packaged Modules
    • Use brew
      brew install node

      Note: Homebrew will install NodeJS in /usr/local/bin

      lrwxr-xr-x  1 rajan  admin    31B Mar  5 10:23 node -> ../Cellar/node/0.10.26/bin/node  
      lrwxr-xr-x  1 rajan  admin    30B Mar  5 10:23 npm -> ../Cellar/node/0.10.26/bin/npm
  • Install Yeoman, grunt and bower
    • Use npm
      npm install -g yo       (installs yo, grunt-cli and bower)

    Note: npm will install yo (Ver: 1.1.2), grunt-cli (Ver: 0.1.13) and bower (Ver: 1.2.8) in /usr/local/bin

        lrwxr-xr-x  1 rajan  admin    29B Mar  5 11:32 yo -> ../lib/node_modules/yo/cli.js  
        lrwxr-xr-x  1 rajan  admin    39B Mar  5 11:32 grunt -> ../lib/node_modules/grunt-cli/bin/grunt  
        lrwxr-xr-x  1 rajan  admin    35B Mar 13 22:44 bower -> ../lib/node_modules/bower/bin/bower
    • Install angular-generator
      npm install -g generator-angular
  • Install DropBox

  • Install Evernote

This is just a beginning, but is good enough to get me started with my Java, Spring, AngularJS development.


No comments yet.

Post a Comment