Skip to content

Instantly share code, notes, and snippets.

@aahan
Last active December 15, 2015 07:59
Show Gist options
  • Save aahan/5226975 to your computer and use it in GitHub Desktop.
Save aahan/5226975 to your computer and use it in GitHub Desktop.
Setting up my Jekyll/Octopress site on my Ubuntu 12.04 LTS virtual server.

Initial setup

Update System

sudo apt-get update && sudo apt-get upgrade

Install Git

sudo apt-get install git

Install Ruby using Ruby Version Manager

Ubuntu Server comes with Curl, so you won't need this (just know that Curl is needed):

sudo apt-get install curl

Install RVM:

\curl -L https://get.rvm.io | bash -s stable

And be sure to follow any subsequent instructions as guided by the installation process. For example, in my case, it was like this:

RVM post-installation instructions

So, what does it say?

  1. Add the following line to ~/.bash_profile or ~/.bash_login, whichever exists. .bash_profile exists in my case, so I edited it as suggested.

     source ~/.profile
    
  2. Before you start using RVM, run the following command in all your open shell windows, then (it's best to) exit out of your shell session(s) and start up new one(s).

     source ~/.rvm/scripts/rvm
    
  3. Read output of rvm requirements and rvm notes commands. So, I did (it's very very important, IMO).

    rvm requirements output

    As you can see rvm requirements command told me to do this:

     sudo apt-get update
    
     sudo apt-get --no-install-recommends install bash curl git patch bzip2
    
     sudo apt-get --no-install-recommends install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev
    

Install Ruby 1.9.3 and the latest version of RubyGems:

rvm install 1.9.3
rvm use 1.9.3
rvm rubygems current

Run ruby --version to be sure you're using Ruby 1.9.3.

Setup Octopress

pwd  # In my case /home/aahan
git clone git://github.com/imathis/octopress.git octopress
cd octopress  # You'll be asked if you trust the '.rvmrc' file (hit 'y' - for yes).
ruby --version  # Should report Ruby 1.9.3

Install dependencies:

gem install bundler
bundle install

Install the default Octopress theme:

rake install

Basic Configuration

_config.yml - the main config. file that contains your Jekyll site's settings. Here's what I've changed in mine.

A

Resources

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