Lubos Rendek

The only solution is determination.

Octopress Debian Installation

| Comments

In this article we are going to deploy octopress on debian standalone system. We will install octopress copy into user’s directory and setup a ssh deployment into /var/www/. This is a generic installation so make sure you adjust all variables to fit your needs and environment.

First we need to install all prerequisites.

1
apt-get install ruby1.9.1-dev bundler git apache2

Next give your user a sudo privileges if you have not done so already.

1
2
# visudo
lubos   ALL=(ALL:ALL) ALL

As a regular user fetch octopress from git repository:

1
$ git clone git://github.com/imathis/octopress.git 

The above command will create a new directory octopress. Navigate to this directory and install additional prerequisites:

1
2
3
4
5
$ cd octopress
$ bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Enter your password to install the bundled RubyGems to your system: 

In the next step configure your new blog by editing _config.yml. Feel free to leave it untouched and change it later. Next we are going to setup a ssh deployment by editing Rakefile. The below code will enable remote user root to deploy octopress blog into /var/www:

1
2
3
4
5
6
7
8
## -- Rsync Deploy config -- ##
# Be sure your public key is listed in your server's ~/.ssh/authorized_keys file
ssh_user       = "root@<server IP or hostname>"
ssh_port       = "22"
document_root  = "/var/www/"
rsync_delete   = true
rsync_args     = ""  # Any extra arguments to pass to rsync
deploy_default = "rsync"

Next generate you private and public key and exchange it with remote server, the one which will host your octopress blog.

1
2
$ ssh-keygen 
$ ssh-copy-id root@<server IP or hostname>

In the last step we will install default octopress theme, generate blog and deploy it on the server:

1
2
3
$ rake install
$ rake generate
$ rake deploy

If all went well you should see you blog by visiting

1
http://<server IP or hostname>

Enjoy !!!

Comments