The post explains, how to install Octopress on Ubuntu 14.04 LTS. Octopress is a jekyll based framework. It has lots of many feature. Best part is, it is static site generator. Many website and blogs have been migrated to Octopress.
Install Octopress on Ubuntu 14.04 LTS
Follow the given below steps to install Octopress on Ubuntu 14.04 LTS.
Step 1 : Become a superuser
After login into Ubuntu system,Open terminal and switch to superuser. Run the given below command
sudo su -
Now you are login with root.
NOTE: In this post, we will follow all steps with root user
Step 2 : change to /opt
Change to directory /opt
cd /opt
Step 3 : Install ruby
For installing ruby we will use here Ruby Version Manager (RVM) . Popularly known as rvm.
With rvm you can install multiple ruby version and switch to different ruby version easily.
In previous post, I explained installation of ruby with rvm.
Before installing RVM first install curl
apt-get install curl
now install RVM
curl -sSL https://get.rvm.io | bash -s stable
Step 4 : Run script rvm.sh
Now run the script rvm.sh , which will set the environment
source /etc/profile.d/rvm.sh
Step 5: Install ruby requirement
Install all ruby requirements is quite easy. Simply run the command
rvm requirements
Step 6: Install latest ruby version
At the time of writing ,latest stable version of ruby 2.1.2 is available. Hence install ruby 2.1.2 . Replace the version number with latest version of ruby.
rvm install 2.1.2
Step 7: Using ruby version
Use the ruby version as default
rvm use 2.1.2 --default
Also check the ruby version
ruby -v
Step 8 : Install nodejs
Install nodejs. In case if it is missing you will get javascript runtime error.
apt-get install nodejs
Step 9 : Install git
Install git so that we will clone the octopress code from github
apt-get install git
Step 10 : Git clone octopress code
Copy octopress git repo from github
git clone git://github.com/imathis/octopress.git octopress
Step 11 : Install Octopress and its requirements
Install the octopress and its requirements. For this, first we have to change directory of octopress. The Octopress directory is now exist after git clone (see Step 10)
cd octopress gem install bundler bundle install
Step 12 : Install default theme
Install defualt theme of octopress.
rake install
Note: you can also install free 3rd party Octopress theme
Step 13 : Starting Rail Server
Now we will start rail server. The octopress works on port no 4000
We expect you are still in octopress directory
Run the command
rake preview
Open another terminal and run the netstat command to see 4000 port no. listening status
netstat -tanp|grep 4000
Open the web browser and type the URL
http://127.0.0.1:4000
The Octopress will be opened
Octopress Documentation link : http://octopress.org/docs/
thx for posting this. super helpful!
Welcome Josh,
Glad to know the post help you.
Regards
Sharad