Moving From Working PC to Own USB-Disk Based 4

TurnToJPG -->

Writing Blog

I use octopress for writing blog, so this time in USB system I also want to enable it.
Edit the /etc/hostname and name my computer into “USBArch”, because we want to setup the in next step.

$ ssh-keygen
$ cat ~/.ssh/

Copy the content and add it into the [“"](""), Then use command ssh -T to verify if you can successfully be authenticated.

$ git clone
$ git clone

Now the repository is OK, but the ruby environment should be set.

$ curl -L | bash -s stable
$ rvm use 1.9.3
# log out the terminal and log in again
$ rvm rubygems latest
$ cdheroku
# Choose yes, trust the .rvmrc
$ gem install bundler
$ bundle install

Test the rake command:

$ rake generate && rake deploy

OK, Then we can octopress for writing blogs.


We will use xampp for webserver, because it’s very convinient to configure. Login as root, then:

# yaourt xampp

The detailed configuration steps could be viewed at:

In fact here I met a very strange problem, it seems if I put the whole blog under /home/Trusty/code, then the browser will complains that 403, so here I make a trick in rakefile(Which is used for generating the static website), add following line in rake generate

desc "Generate jekyll site"
task :generate do
  raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless
  puts "## Generating Site with Jekyll"
  system "compass compile --css-dir #{source_dir}/stylesheets"
  system "jekyll"
  system "sudo cp -ar ./public/ /opt/ && sudo chown -R nobody /opt/public/ && sudo chgrp -R nobody /opt/public/ && sudo chmod 755 -R /opt/public/"

I don’t find another method, because xampp is too complex for configuring, we needn’t spend much more time on it.

Tomorrow I will setup the other language development environment.