Skip to content

Instantly share code, notes, and snippets.

@loganhasson
Last active April 9, 2024 02:53
Show Gist options
  • Save loganhasson/d179d50d19e5ae85c3e46e3ce5759830 to your computer and use it in GitHub Desktop.
Save loganhasson/d179d50d19e5ae85c3e46e3ce5759830 to your computer and use it in GitHub Desktop.

Basic Ubuntu Setup

Note: Need a user with sudo access

  1. sudo groupadd npm
  2. sudo usermod -a -G npm,staff $USER
  3. sudo apt-get update
  4. sudo apt-get upgrade
  5. sudo apt-get dist-upgrade (this one is optional)
  6. sudo apt-get -y install curl postgresql libpq-dev default-jre build-essential phantomjs nodejs
  7. sudo apt-get -y install ack-grep vim libgnome2-bin (these are optional)
  8. curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
  9. sudo apt-get install nodejs
  10. sudo chown root:staff /usr/bin
  11. sudo chmod 0775 /usr/bin
  12. sudo chown -R root:npm /usr/lib/node_modules
  13. sudo chmod 0755 /usr/lib/node_modules
  14. touch ~/.netrc && chmod 0600 ~/.netrc
  15. gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
  16. \curl -sSL https://get.rvm.io | bash
  17. rvm install 2.3.0
  18. rvm use 2.3.0 --default
  19. echo "gem: --no-ri --no-rdoc" > $HOME/.gemrc
  20. gem update --system 2.4.8
  21. gem install learn-co
  22. gem install phantomjs
  23. gem install pg
  24. gem install sqlite3
  25. gem install bundler
  26. gem install rails
  27. npm install -g protractor
  28. ssh-keygen (ONLY DO THIS IF YOU DON'T ALREADY HAVE A GENERATED SSH KEY: just press return for everything, and don't enter a passphrase)
  29. cat ~/.ssh/id_rsa.pub, copy output, and add as ssh key on github
  30. learn whoami and enter oauth token when asked (from https://learn.co/<github_username>)
  31. Install Chrome

Optional Dotfiles

  1. curl "https://raw.githubusercontent.com/flatiron-school/dotfiles/master/irbrc" -o "$HOME/.irbrc"
  2. curl "https://raw.githubusercontent.com/flatiron-school/dotfiles/master/ubuntu-gitignore" -o "$HOME/.gitignore"
  3. curl "https://raw.githubusercontent.com/flatiron-school/dotfiles/master/linux_bash_profile" -o "$HOME/.bash_profile" (this will overwrite existing bash profile, so back up if you want to)
  4. curl "https://raw.githubusercontent.com/flatiron-school/dotfiles/master/linux_gitconfig" -o "$HOME/.gitconfig" then nano $HOME/.gitconfig and edit what needs to be edited (github username and github email in a few places)
@hebersandoval
Copy link

Logan,

Thank you for putting this together. It was referred by Mendel, from the Flatiron Team, as optional environment to work on learn.co. Do you have general instructions on how to use the environment or navigate on it, once the above commands are installed? Do I fork, clone and push the labs in the Learn Dir: /home/heber/code/labs? Also, I had chruby, a lighter RVM, already installed. Steps 16 -18 didn't install properly;

  • WARNING: you have GEM_HOME="/home/heber/.gem/ruby/2.3.0" this is conflicting with RVM, make sure to:

    unset GEM_HOME

Am I able to use the environment as intended, despite this conflict? Thank you in advance for your help.

@RMcNeely
Copy link

To date everyone I have seen who has had an issue with setting up Learn on Ubuntu has been stuck with /netrc make sure the file exists and has appropriate permissions. There have been a few people who have deleted it and had it be recreated in a working format.

Hope that helps!

@tracypholmes
Copy link

tracypholmes commented Nov 23, 2016

Hi Logan:

I made some changes to this. Would you have time to review them? Thank you for providing such a great resource. https://gist.github.com/tracypholmes/9146a13a220dc4466082c7a2988383db

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