Skip to content

Instantly share code, notes, and snippets.

@bhague1281
Created September 24, 2015 20:35
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 bhague1281/7675546114bfaa40fe34 to your computer and use it in GitHub Desktop.
Save bhague1281/7675546114bfaa40fe34 to your computer and use it in GitHub Desktop.
Installfest

General Assembly Logo

#Ubuntu install instructions

##Install Oh My ZSH

sudo apt-get update
sudo apt-get install git-core zsh
chsh -s /bin/zsh
wget --no-check-certificate http://install.ohmyz.sh -O - | sh
sudo shutdown -r 0

Close terminal and re-open

##Install Sublime

download link

Download the .deb file and run it to install. Follow on screen prompts

##Install Node

curl -sL https://deb.nodesource.com/setup | sudo bash -

sudo apt-get install build-essential
sudo apt-get install nodejs
sudo apt-get install nodejs-legacy npm

##Install postgres

sudo apt-get install postgresql-client postgresql postgresql-contrib

####configure postgres user

sudo -u postgres psql postgres

\password postgres

Choose an easy to remember password then type \quit to exit psql

####create postgres alias

Edit your zshrc file by typing subl ~/.zshrc add these lines to the bottom of the file:

alias psql="sudo -u postgres psql"
alias pgserver="sudo -u postgres service postgresql start"

pgserver will be used to start the postgres server

psql will be used to access the psql termainal

##Install Postgres GUI

sudo apt-get install pgadmin3

##Testing setup

###Node


node -v

npm -v

###Postgres

Start Server

pgserver

enter psql terminal

psql

Should enter psql terminal and have no error.

exit psql

\q

#Installing Ruby

####Install dependencies

sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev

###Install rbenv rbenv lets us change ruby verions on the fly, useful for working with diffrent versions.

cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL

git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash

rbenv install 2.2.2
rbenv global 2.2.2
ruby -v

Disable rdocs and and install bundler

sudo gem update
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
gem install bundler
sudo gem install rails

#Verify your installation

Run each of these commands and then call someone over to validate your installation is correct.

rails -v
ruby -v

node -v
npm -v

git --version
psql --version
subl -v

General Assembly Logo

#WDI Seattle Install Fest

For the first portion of the class, we'll be working exclusively inside of the browser and Node. We'll be installing the following tools.

  • Homebrew
  • Git
  • Node
  • Oh my ZSH
  • iTerm
  • Postgres.app
  • Ruby
  • Rails

##Homebrew Homebrew is a package manager that we will use to install various command line tools in our class.

Open up terminal, and paste the following command to install Homebrew. You might be prompted to install XCode Command Line Tools during the install process.

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

You may be prompted to installed xcode command line tools. When prompted, click and install through that, and you're homebrew installation will continue.

After the installation process, run the command brew doctor. If any warnings or errors are displayed, we will need to resolve them before proceeding with the rest of the install fest.

##GIT Before we do this process, please make sure you have signed up for an account on Github. We will be installing a version of GIT from home brew and also configuring it.

To install GIT

brew install git

####Configuring GIT

Using your email credentials for GIT, run these commands with your user and email configured.

git config --global user.name "YOUR-USERNAME"
git config --global user.email YOUR-EMAIL-ADDRESS
git config --global push.default simple
git config --global credential.helper cache

####Setting up SSH Key You might find your self having to re-authenticate GIT every time you work on your command line. Setup SSH Keys to let Github remember your machine in the future.

##Node We'll be using the official Node installer provided from nodejs.org

Download and run the installer. The installation usually goes smoothly, and you can verify Node is working by restarting terminal, and typing

Verify the installation afterwards by running

node -v
npm -v

The above should display without any errors.

To finish up your installation, run this command to allow for global installations of npm tools.

sudo chown -R $USER /usr/local/lib

##Sublime 3 We'll be running Sublime 3, not Sublime 2 as our text editor of choice.

Download and install version 3 from http://www.sublimetext.com/3

It is a pretty typical installation for an app, but we need to add a shortcut so we can load sublime from the Terminal.

ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

Restart terminal, and you should be able to open a folder to edit by typing subl .

##ZSH Oh my ZSH?!!! We will be tricking out commandline with another shell. A shell is an interface into our computer, and we will be using a lot to run commands.

We'll be using a shell and configuration package called Oh-My-Zsh

To install, we will run

curl -L http://install.ohmyz.sh | sh

Restart Terminal, and you should see a brand new and colorful command prompt.

##iTerm For those running, mac, download iterm2, a better featured terminal. iterm2

Drag and drop into your Applications folder.

##Postgres.app We will be using a relational database called Postgres for Node and Rails portion our class. Download

Download and install from http://postgresapp.com/

If you have successfully configured zsh and sublime, the following command should work.

subl ~/.zshrc

Your sublime editor will popup with configuration settings, at the bottom of the file append

export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin

Save the file, close Sublime, and restart your terminal.

Type which psql at which point should display

/Applications/Postgres.app/Contents/Versions/9.4/bin/psql

#Installing Ruby

###Install rbenv rbenv lets us change ruby verions on the fly, useful for working with diffrent versions.

brew update
brew install rbenv
echo 'eval "$(rbenv init -)"' >> ~/.zlogin
source ~/.zlogin

###Configuring rbenv

brew update

brew install rbenv-gem-rehash
brew install ruby-build

rbenv install 2.2.2
rbenv global 2.2.2

###Install Rails

sudo gem update
sudo gem install rails --no-rdoc --no-ri

You may need to press "yes" for various entries

#Verify your installation

Run each of these commands and then call someone over to validate your installation is correct.

rails -v
ruby -v

node -v
npm -v

git --version
psql --version
subl -v

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