- Install Jekyll on Ubuntu 12.10
- Install Jekyll with Ruby Version Manager on Ubuntu 11.10
- Blogging with Git using Jekyll on Ubuntu 11.04
- Git Wiki with Gollum and Smeagol
- Android SSH Key Auth with ConnectBot
Installing Jekyll is easier than ever on Ubuntu 12.10 using apt-get and gem install. Additional options such as Pygments and Rdiscount can be added with the same methods.
Install Ruby 1.9.1 which includes the
gem command, and the
sudo apt-get install ruby1.9.1 ruby1.9.1-dev make
sudo gem install jekyll
Jekyll can be run inside the website directory:
Then visit http://localhost:4000 in your web browser to see your Jekyll site.
Install Pygments code syntax highlighter:
sudo apt-get install python-pygments
Install Rdiscount and Kramdown renderers for Markdown:
sudo gem install rdiscount kramdown
If the Jekyll webserver is not started by default, you can specify the
The default port
4000 can be changed, for example when running multiple Jekyll instances:
jekyll --server 4001
Then visit http://localhost:4001
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.
Make sure the system is fully updated.
sudo apt-get update && sudo apt-get dist-upgrade
The RVM install script requires CURL
sudo apt-get install curl
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 get.rvm.io | bash -s stable
Enable RVM commands in the current shell.
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
Should say something like: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
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
Needed for some themes.
gem install sass --no-rdoc --no-ri gem install rb-inotify --no-rdoc --no-ri
Jekyll is now installed, and is ready to be used.
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://github.com/mchelen/michaelchelen.net.git
Write access to the repository, for when creating and editing web pages.
git clone firstname.lastname@example.org:mchelen/michaelchelen.net.git
cd michaelchelen.net 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
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.
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.
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.
Make this change permanent by adding the line to
Accelerate LSI by using GSL
sudo apt-get install libocamlgsl-ocaml-dev libgsl-ruby1.8
Kramdown is a Markdown renderer alternative to Rdiscount.
sudo gem install kramdown --no-rdoc --no-ri
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.
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo sed -i -e "s/# deb/deb/g" /etc/apt/sources.list
sudo apt-get update sudo apt-get -y install ruby rubygems ruby-dev libxml2-dev libxslt-dev
sudo gem install gollum --no-ri --no-rdoc sudo gem install smeagol --no-ri --no-rdoc
sudo gem install rdiscount --no-ri --no-rdoc
sudo apt-get install python-pygments
echo "export PATH=$PATH:/var/lib/gems/1.8/bin" >> ~/.bashrc source ~/.bashrc
git clone git://github.com/mchelen/michaelchelennet.wiki.git
cd michaelchelennet.wiki gollum
sudo gem install smeagol
Smeagol supports multiple repositories
Markdown is easier to read and write than HTML
<html> <body> <h3>Hello World</h1> <li> <ul>Bar1</ul> </li> </body> </html>
### Hello World - Bar1
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.
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.
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
ConnectBot home screen. There are no known hosts yet.
Click Menu, then Manage Pubkeys to configure keys.
There are no keys set up yet.
Click Menu then Generate. We are going to create a new key. This allows us to specifically revoke access if the handset is lost.
The new pubkey settings. Most of the defaults are fine. We will create a 1024 bit RSA key.
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.
Random numbers are used to generate the key. Move your finger around the screen until enough randomness has been collected.
The new key has been created. It is unlocked and will be used by ConnectBot automatically when connecting to a server.
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.
Go back to the ConnectBot home screen and enter your server information to connect to your SSH server.
Choose "Yes" to accept the server's key if this is the first time connecting to the server.
Login with a username and password to complete the connection. This is now the terminal of the remote server.
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
echo "PASTEKEYHERE" >> .ssh/authorized_keys
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDQFSzet/Qu8SLklDQyNbX5k16MwOBVKuaY9bNJhb99BkIRIVbNpr61eHUG3gP6haNC6qreTbpHscq4AQV21gLvCgVmHsTci0QAK44weFyDzVwIBFH9uUN+f/k2NTY9zV8FaBqK9CW8hS2f50EB38mGYvE7/0/S1u7/jtxnKqwAgw== htc_aria" >> .ssh/authorized_keys
.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.
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!
If the device is lost or access should to be disabled at any time, remove the key from the
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