- Install Jekyll 2 on Ubuntu 14.04
- 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
Jekyll 2 was recently released and can be installed on Ubuntu 14.04 using
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 ruby, the ruby development libraries, and the make command.
sudo apt-get install ruby ruby-dev make
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
nodejs to work around this issue.
sudo apt-get install nodejs
Check that Jekyll has been successfully installed.
The current version is
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
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.
git to clone an existing Jekyll website, such as this one!
git clone https://github.com/mchelen/michaelchelen.net.git cd michaelchelen.net
new command creates a directory structure and config files for a new Jekyll site.
jekyll new my-awesome-site cd my-awesome-site
Now that the basic config and layout are available, start Jekyll to generate the website HTML and start a local server.
Then visit http://localhost:4000 in a web browser.
Jekyll is now successfully runnning!
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 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. source ~/.rvm/scripts/rvm
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.
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.
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.
For improved security, a key size of 2048 or 4096 is now recommended. This does not affect any other steps.
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 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