Skip to content

Instantly share code, notes, and snippets.

@AshCoolman
Forked from DenisIzmaylov/INSTALLATION.md
Last active July 25, 2018 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AshCoolman/7f59e9fba03e8be4017a to your computer and use it in GitHub Desktop.
Save AshCoolman/7f59e9fba03e8be4017a to your computer and use it in GitHub Desktop.
Fresh OSX install guide for Node development (El Capitan version)

Fresh OSX install guide for Node development (OS X 10.11 - El Capitan version)

My flavour/fork of the an OSX setup guide

Content

Appearance

The best fonts to code:

WebStorm

XCode & Command Line Tools

  • Download XCode 7.0 Beta or latest. Install it.
  • Then open Xcode > Preferences > Downloads > Command Line Tools or execute in Terminal:
xcode-select --install
  • Select Xcode > Preferences > Locations > Command Line Tools (to avoid ld: library not found for -lgcc_s.10.5 error in working with npm).

Git

Setup

git config --global user.name "Ashley Coleman"
git config --global user.email "writetofish@gmail.com"

Configure GitHub

There is 2 ways to configure keys. The first is:

  • Create new key:
ssh-keygen -t rsa -C "example@izmy.lv"
  • Copy public key:
cat ~/.ssh/id_rsa.pub
  • Add it to github.com

The second way was just to backup your ~/.ssh before re-install and restore it now. Be aware - private keys should have 0400 access.

Test connection

ssh -T git@github.com

Homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor # Perform the tasks as recommended

I followed this guide here, and although the first line failed to uninstall, it seemed prudent to follow the advice in the guide:

brew uninstall qt5
brew install qt5
brew linkapps qt5
brew link --force qt5

Node.js and io.js Environment

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
nvm install v4.0.0
nvm install v0.10.28
nvm alias default v0.10.28
  • Update NPM (bundled with node)
npm install npm -g
npm install bower -g
  • Install development tools e.g.:
npm install gulp webpack node-inspector -g
  • Install testing frameworks e.g.:
npm install protractor karma -g
  • Install transpilers e.g.:
npm install coffee babel -g
  • To get installed Phantom.js and use it:
npm install phantom phantomjs -g

RVM

I followed https://rvm.io/rvm/install

brew install gpg
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash

at which point I got this warning and followed its advice

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

  * WARNING: You have '~/.profile' file, you might want to load it,
    to do that add the following line to '/Users/ashleycoleman/.bash_profile':

I found I needed the --disable-binary flag to install ruby without sudo link

Then I could do bundle install etc

rvm install ruby-2.2.2 --disable-binary 

Note: 2.2.2 worked better that 2.1.2 when updating (An error occurred while installing libv8 (3.16.14.7), and Bundler cannot continue)

gem install bundler
bundle update

System settings

  • Allow gulp (or whatever) to what many files:

Previous versions of OSX let you simply set ulimit -n 10000 at the terminal - no more.

Now you must edit your ~/.bash_profile file like so:

  • Hide applications from ⌘ + TAB menu link:
ulimit -n 3000 # remember to reset your terminal window

Electron

Build cross platform desktop apps with web technologies. Formerly known as Atom Shell.

npm install electron-prebuilt -g

Database

Redis

  • Install
brew install redis
  • Launch:
launchctl load /usr/local/opt/redis/homebrew.mxcl.redis.plist
  • To have launchd start redis at login:
mkdir -p ~/Library/LaunchAgents
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
  • Test:
redis-cli

MongoDB

  • Try to install with Homebrew:
brew install mongodb
  • If you could not install with Homebrew try to do it manually:
curl -O https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.0.4.tgz
tar -zxvf mongodb-osx-x86_64-3.0.4.tgz
mv mongodb-osx-x86_64-3.0.4/ /usr/local/opt/mongodb
export PATH=/usr/local/opt/mongodb/bin:$PATH
echo export PATH=/usr/local/opt/mongodb/bin:\$PATH>~/.bash_profile
chmod +x ~/.bash_profile
mkdir -p ~/data/mongodb
  • Then execute in Terminal:
sudo mongod --dbpath=$HOME/data/mongodb 

PostgreSQL

  • Install:
brew install postgres
  • Launch:
launchctl load /usr/local/opt/postgresql/homebrew.mxcl.postgresql.plist
  • To have launchd start postgres at login:
mkdir -p ~/Library/LaunchAgents
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents

Tools

One of easiest ways to install apps is using Cask. So let's install it before:

brew install caskroom/cask/brew-cask

Now we can install tools by single command. Let's use it.

Essentials

brew cask install atom
brew cask install sublime # not tested

webp-quicklook

Open-source QuickLook plugin to generate thumbnails and previews for WebP images. Requires Mac OS X 10.7 or later.

brew cask install webpquicklook

More:

Midnight Commander

Just install:

brew install mc

And start:

mc

Nice Grep replacements

brew install ack
brew install the_silver_searcher

Tools

  • Follow the instructions up until actual installation:
  • Actually installation commandsudo pip install awscli --ignore-installed six

Applications

  • Editor:
  • RescueTime helps you understand your daily habits so you can focus and be more productive. Runs securely in the background. Tracks time spent on applications and websites, giving you an accurate picture of your day.
  • Databases:

Other Installation Tracks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment