Toss the most of the day, finally fix, this can be written down.
My Linux version: CentOS 6.5
The main installation sequence is also the official website instructions: http://jekyllrb.com/docs/installation/, so install Jekyll before installing Ruby, Gem, NodeJs
1-First , replace the system with GCC
Yum Install GCC
2-then , it is recommended to install Rvm,ruby and gem installation here to RVM to do it:https://ruby-china.org/wiki/install_ruby_guide
There are a few things to note: Step 0 is for Mac, Linux doesn't need this step, just start with step 1.
After a long wait, it depends on your speed. Last installation succeeded, RVM, Ruby, gem version information is as follows:
1 [email protected] myblog]# rvm-v2RVM 1.25.28 (Stable) by Wayne E. Seguin<Wayneeseguin@gmail. com>, Michal Papis<Mpapis@gmail. com>[https://rvm.io/]3 [email protected] myblog]# ruby-v4 Ruby 2.0.0p481 (2014-05-08 revision 45883) [I686-linux]5 [email protected] myblog]# gem-v62.2.2
3-Installing Jekyll
There is a big pit here!!!
You will find that after a long wait, the system error is as follows: Unable to download data from https://rubygems.org/and so on, this is to say that the resources of foreign official website has been wall dropped. It doesn't matter, we can use the domestic image to complete the download, here you need to set the following default, reference: http://ruby.sdutlinux.org/
Execute the following command:
$ gem Sources--remove https://rubygems.org/$ gem sources-a http://ruby.sdutlinux.org/$ gem sources-l
Then see:
http://ruby.sdutlinux.org# Please make sure only ruby.sdutlinux.org
Then execute:
Gem Install Jekyll
After a long wait, the installation is complete; View Jekyll version:
1 [email protected] myblog]# node-v 2 v0.10.30
Indicates that the installation was successful.
4-Installation NodeJS
This blog is a big help: http://my.oschina.net/blogshi/blog/260953
I downloaded the red box:
Then change the environment variable: (Note to change the path of node and NPM to your own)
1 ln-s/home/kun/mysofltware/node-v0.10.28-linux-x64/bin/node/usr/local/bin/node 2 ln-s/home/kun/mysofltware/node-v0.10.28-linux-x64/bin/npm/usr/local/bin/npm
View Nodejs version:
1 [email protected] myblog]# node-v 2 v0.10.30
Indicates that the NODEJS installation was successful.
At this point, the Jekyll environment is well-equipped. You can start our Jekyll tour!
5-Check whether Jekyll is easy to use, a QuickStart (http://jekyllrb.com/docs/quickstart/):
1 $ jekyll New MYBLOG2 $ cd MyBlog
To.. /myblog/to see what the documents are:
1 [[email protected] myblog]# ls 2 about.md _config.yml css feed.xml _includes index.html _layouts _posts _sass
To run the service:
1 [email protected] myblog]# Jekyll serve2 Configuration file:/home/qyj/node-v0.10.30-linux-x86/myblog/_config.yml3 Source:/home/qyj/node-v0.10.30-linux-x86/myblog4 Destination:/home/qyj/node-v0.10.30-linux-x86/myblog/_site5 Generating ...6 Done .7 auto-regeneration:disabled. Use--watch to enable.8 Configuration file:/home/qyj/node-v0.10.30-linux-x86/myblog/_config.yml9 Server address:http://0.0.0.0:4000/TenServer running. Press Ctrl-c to stop.
6-Type the address in the browser: 0.0.0.0:4000, Success:
The next step is how to upload to GitHub, leaving the next article to toss.