≡ Menu

OSX: the first 30 minutes

After your Apple® arrives, what next?

The very first things one should do on OS X are system updates, Homebrew setup, install Java,  install GNU system tools, , install favorite editor, setup the shell & configure the bash_profile.

System Update

Before you start the 30 minute timer…

Connect to the Internet
Unplug everything except the power supply (no external drives, no usb keyboards/mice, etc.)

Select ‘’ > ‘About This Mac’ > ‘Software Update’

Install all available updates.

Start the 30 minute timer now!

Install xcode

Open Terminal and paste this into the prompt:

xcode-select --install

Agreement to the licensing is required:

xcodebuild -license

Type: ‘agree’

Set up Homebrew

Everyone needs an elegant, simple, speedy way to manage and install GUI applications.

Open Terminal and paste this into the prompt:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Source the brew path by adding the following to /Users/<user>/.bashrc

# source the brew path
export PATH="/usr/local/sbin:$PATH"
# increase the size of your history
export HISTFILESIZE=10000000
# commands that start with a space won't be written into history
export HISTCONTROL=ignorespace

Test the installation with

brew doctor

Read the output, and correct any errors.

Set .bash_profile to use .bashrc

Open /Users/<user>/.bash_profile and paste this into the file:

if [ -f ~/.bashrc ]; then
   source ~/.bashrc
fi

Save and close. To understand why, read this post (later).

Get the most up-to-date formulae (software packages)

Open Terminal and paste this into the prompt:

brew update

Install Java

The best approach for Java is to use the binaries provided by Oracle but install them using Homebrew, and select the version of Java in use with jenv.
The current version of java is output with this command:

java -version

Open Terminal and paste this into the prompt:

brew tap caskroom/cask
brew install brew-cask
brew update && brew upgrade brew-cask && brew cleanup
brew install https://raw.github.com/gcuisinier/jenv/homebrew/jenv.rb

Source jenv automatically by adding the following to /Users/<user>/.bashrc

# ensure jenv is available
if which jenv > /dev/null; then eval "$(jenv init -)"; fi

Look for available versions of java by pasting this into the prompt:

brew cask search java

Add two new versions by pasting these lines into the prompt:

brew cask install java6
brew cask install java7

Notify jenv of the newly installed java versions

jenv add /Library/Java/JavaVirtualMachines/jdk1.7.0_76.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
jenv rehash

Now set a global java version to use

jenv global oracle64-1.8.0.40

Review all the java versions known to jenv

jenv versions
  system
  oracle64-1.7.0.76
  oracle64-1.8.0.31
* oracle64-1.8.0.40 (set by /Users/<user>/.jenv/version)

One can now change Java versions for a project by passing the parameter local to jenv. This will support vendor-specific requirements (e.g., Java 6 for Eclipse, Java 7 for Jython in an FDMEE project, or an Atlasssian sdk when building add-ons to extend applications like JIRA or Confluence).

It is necessary to set JAVA_HOME in various start scripts as well. Here is an example:

jenv exec <program name>

Enable GNU core utilities

This requires some consideration of what you actually need. I just need sed, wget and rsync to behave the way I am familiar with on solaris/Ubuntu/Red Hat. Please review this post so you don’t create issues for yourself and break the default utilities. I used this post as well to understand what I needed to do.

Open Terminal and paste this into the prompt:

brew install coreutils

Modify /Users/<user>/.bashrc like:

# .source the GNU utilities
# and add brew path
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
# fix the location of man pages for the GNU utilities
export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"

This puts the gnubin directory in the path, and adds the man path to the profile.
It is necessary to install a few new items now:

brew install wget

Get a great text editor, and some other great software

Open Terminal and paste this into the prompt:

brew install atom
brew cask install eclipse-ide
brew install jython
brew cask install citrix-receiver --appdir=/Applications
brew cask install angry-ip-scanner
brew cask install cyberduck
brew cask install colloquy
brew cask install geektool
brew cask install unetbootin
brew cask install audacity210
brew cask install valentina-studio
brew install git
brew cask install google-chrome
brew cask install vlc

That’s all for now.

Remember to install and uninstall software using your new ‘package manager’ and work with jenv to understand its features and use cases. #44 is a good place to begin.

Please let me know if you find an errors.


{ 0 comments… add one }

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.