Fork me on GitHub

[Home] All Posts

Post Titles:

All Posts:


Jekyll 2 was recently released and can be installed on Ubuntu 14.04 using apt-get and gem install. Additional features such as Rdiscount can be added with the same method. Although there are packages for Jekyll in the Ubuntu repository, the packages are for older versions of Jekyll.

Jekyll is a static site generator with a templating system that can be adapted for many types of websites, including blogs. It can be run on a server, or run locally and the generated files uploaded to a server. It is the default software used by Github Pages.

Tested with Jekyll 2.1.1 and Ubuntu Server 14.04

Install Prerequisites

Install ruby, the ruby development libraries, and the make command.

sudo apt-get install ruby ruby-dev make

Install Jekyll

Install the Jekyll gem system wide. For speed, we are excluding the extended documentation. To include all documentation, omit the --no-rdoc --no-ri switches.

sudo gem install jekyll --no-rdoc --no-ri

ExecJS Workaround

There is a current issue that causes Jekyll to require a JavaScript runtime even if it will not be used.

Install nodejs to work around this issue.

sudo apt-get install nodejs

Start Jekyll

Check that Jekyll has been successfully installed.

jekyll -v

The current version is jekyll 2.1.1.


Although not required, git is often used to manage the files of a Jekyll website.

sudo apt-get install git

Additional gems can add features to Jekyll, such as the alternate rdiscount Markdown renderer.

sudo gem install rdiscount --no-rdoc --no-ri

Get Website Content

Now that Jekyll is installed, we need content for it to serve. We can either use a current website, or set up a new site from scratch.

Use Existing Site

Use git to clone an existing Jekyll website, such as this one!

git clone

Create New Site

The new command creates a directory structure and config files for a new Jekyll site.

jekyll new my-awesome-site
cd my-awesome-site 

Start Jekyll

Now that the basic config and layout are available, start Jekyll to generate the website HTML and start a local server.

jekyll serve

Then visit http://localhost:4000 in a web browser.

Jekyll is now successfully runnning!

Extra Options

Jekyll can watch the directory for changes and regenerate the website when files are modified.

jekyll serve -w

The default port 4000 can be changed, for example when running multiple Jekyll instances.

jekyll serve --port 4001

Then visit http://localhost:4001 in a web browser.

The website can be generated without starting a local server. The files are placed into the _site directory and can be uploaded to a web server.

jekyll build



Jekyll generates a complete website such as a blog from plain text files. The generated files can be served by any standard webserver. Markup languages such as Markdown are supported through Gems. Jekyll is made to be compatible with version control systems such as Git. These steps will install Ruby and Jekyll for the current user. Tested on Ubuntu Server 11.10 Oneiric


The Ruby Version Manager can be used to install the latest version of Ruby on Ubuntu.

Update System

Make sure the system is fully updated. sudo apt-get update && sudo apt-get dist-upgrade

RVM Dependencies

The RVM install script requires CURL sudo apt-get install curl

RVM Install Script

The RVM install script will install the stable version of RVM for the current user. After RVM is installed Ruby will automatically be installed.

curl -L | bash -s stable

Enable RVM commands in the current shell. source ~/.rvm/scripts/rvm

Ruby Dependencies

Use rvm requirements to generate a list of Ruby dependencies. In Ubuntu 11.10 it is:

sudo apt-get 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 ncurses-dev automake libtool bison subversion


Now use RVM to install the default version of Ruby. rvm install ruby

Test Ruby

ruby -v

Should say something like: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Install Jekyll

gem install jekyll --no-rdoc --no-ri



Pygments allows syntax highlighting. sudo apt-get install python-pygments


Two alternative Markdown renderers are Rdiscount and Kramdown.


gem install rdiscount --no-rdoc --no-ri


gem install kramdown --no-rdoc --no-ri

SASS and rb-inotify

Needed for some themes. gem install sass --no-rdoc --no-ri gem install rb-inotify --no-rdoc --no-ri

Run Jekyll

Jekyll is now installed, and is ready to be used.

Clone Repository

Download the latest copy of your website. Use the URL for your project.

Read-only access to the repository, such as on servers. git clone git://

Write access to the repository, for when creating and editing web pages. git clone

Start Jekyll


The website files will be generated in the _site directory. These can be served by any standard webserver such as Apache.

Site settings are stored in the _config.yml file.

These settings can be overriden through the command line. For example the website can be viewed through the Jekyll server using --server instead of another web server. The --auto option will cause the website to be regenerated when any files are edited.

jekyll --server --auto

Jekyll is a Git compatible static site generator that can be installed on Ubuntu. The template system can be configured for a blog style layout. Tested on Ubuntu Server 11.04 Natty.

Install Dependencies

sudo apt-get install git ruby rubygems python-pygments
sudo gem install rdiscount --no-rdoc --no-ri

The --no-rdoc --no-ri options are suggested for lightweight server installs.

Install Jekyll

sudo gem install jekyll --no-rdoc --no-ri

The Ubuntu package uses a Gem directory of /var/lib/gems/1.8/bin/ which must be added to your path. export PATH=/var/lib/gems/1.8/bin:$PATH

Make this change permanent by adding the line to ~/.profile


Speed up LSI

Accelerate LSI by using GSL
sudo apt-get install libocamlgsl-ocaml-dev libgsl-ruby1.8

Install Kramdown

Kramdown is a Markdown renderer alternative to Rdiscount. sudo gem install kramdown --no-rdoc --no-ri

Recommended Templates

Additional Site Examples


Git is a revision control system. Gollum is a webserver to work with the repository locally. Smeagol is webserver to publically display the repository pages.

Gem install sudo is optional for system-wide install.


enable universe repository

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i -e "s/# deb/deb/g" /etc/apt/sources.list

install dependencies

sudo apt-get update
sudo apt-get -y install ruby rubygems ruby-dev libxml2-dev libxslt-dev

Install Gollum and/or Smeagol

sudo gem install gollum --no-ri --no-rdoc

sudo gem install smeagol --no-ri --no-rdoc

Markdown support

sudo gem install rdiscount --no-ri --no-rdoc

Syntax highlighting

sudo apt-get install python-pygments

Update PATH and reload .bashrc

echo "export PATH=$PATH:/var/lib/gems/1.8/bin" >> ~/.bashrc
source ~/.bashrc

Clone Wiki repository

Public Git URL

git clone git://

Start Gollum

Change to the directory with the Git repo and start repo.


GitHub wikis can be branched and merged

Install Smeagol


sudo gem install smeagol

Smeagol supports multiple repositories

Why Markdown?

Markdown is easier to read and write than HTML

Hello World

    <h3>Hello World</h1>


    ### Hello World
    - Bar1



ConnectBot running on HTC Aria from AT&T.

ConnectBot is an open source SSH client for Android. SSH provides secure access to a remote server. Both password and public key authentication are allowed. A key can be created in ConnectBot for use with the server. The key can be disabled at any time.

Use VX ConnectBot for a more updated Android SSH client. All steps from this guide still apply.

This method can be performed entirely from your Android handset if you currently have password access to an SSH server. ConnectBot supports shell login and port forwarding, and file transfer is planned. Tested with ConnectBot 1.7.0, Android 2.2, and Ubuntu 10.10 Maverick Beta.

Install Open SSH server

SSH server must be installed on the remote system. Key authentication is usually enabled by default. To install in Ubuntu:

sudo apt-get install openssh-server

Start ConnectBot

ConnectBot home screen. There are no known hosts yet.

Select Manage Pubkeys

Click Menu, then Manage Pubkeys to configure keys.

Manage Pubkeys Screen

There are no keys set up yet.

Generate Pubkey

Click Menu then Generate. We are going to create a new key. This allows us to specifically revoke access if the handset is lost.

Generate Pubkey Settings

The new pubkey settings. Most of the defaults are fine. We will create a 1024 bit RSA key.

For improved security, a key size of 2048 or 4096 is now recommended. This does not affect any other steps.

Example Settings

You can call your key anything you like. I have named mine after the device, htc_aria. Enable "Load key at start" to have the key automatically loaded by ConnectBot.

Collect Entropy

Random numbers are used to generate the key. Move your finger around the screen until enough randomness has been collected.

New Pubkey Created

The new key has been created. It is unlocked and will be used by ConnectBot automatically when connecting to a server.

Copy Pubkey

Long press on the new key to bring up a menu. Click "Copy public key" This public part of the key will be copied onto the remote server.

Connect to Server

Go back to the ConnectBot home screen and enter your server information to connect to your SSH server.

First Connection

Choose "Yes" to accept the server's key if this is the first time connecting to the server.

Connection Established

Login with a username and password to complete the connection. This is now the terminal of the remote server.

Add Key

The list of keys accepted for this user is stored in the authorized_keys file. This file is located in the .ssh directory within the user's home directory. Use the echo command and paste in the key, surrounded by parentheses. The >> will append your public key onto the .ssh/authorized_keys file.

echo "PASTEKEYHERE" >> .ssh/authorized_keys

For example:

echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDQFSzet/Qu8SLklDQyNbX5k16MwOBVKuaY9bNJhb99BkIRIVbNpr61eHUG3gP6haNC6qreTbpHscq4AQV21gLvCgVmHsTci0QAK44weFyDzVwIBFH9uUN+f/k2NTY9zV8FaBqK9CW8hS2f50EB38mGYvE7/0/S1u7/jtxnKqwAgw== htc_aria" >> .ssh/authorized_keys

Set Permissions for authorized_keys

The .ssh/authorized_keys file must be writeable only by the owner. Set the permissions to 644 which means rw-r--r-- if it is not already that way.

chmod 644 .ssh/authorized_keys


Disconnect from the server. It will be now be listed on the screen.

Test Connection

Connect to the server again. While logging in it will say that public key authentication is being attempted:

Attempting "publickey" authentication with any in-memory public keys

If the key is working, no username or password will be required to complete login. The SSH key authentication is now configured!

Optional: Disable Key

If the device is lost or access should to be disabled at any time, remove the key from the server's authorized_keys file. Use any text editor, or sed, to find the appropriate line. With a key named htc_aria for example:

cd ~/.ssh
sed '/htc_aria$/d' authorized_keys | tee authorized_keys

Recent Comments

Follow @mikechelen

Recent Posts

Install Jekyll 2 on Ubuntu 14.04
Posted 14 May 2014
Install Jekyll with Ruby Version Manager on Ubuntu 11.10
Posted 13 Nov 2011
Blogging with Git using Jekyll on Ubuntu 11.04
Posted 07 Jun 2011
Git Wiki with Gollum and Smeagol
Posted 06 Jun 2011
Android SSH Key Auth with ConnectBot
Posted 07 Dec 2010