文章目录
  1. 1. macOS
    1. 1.1. 安装准备
    2. 1.2. 新建文件
    3. 1.3. 卸载
  2. 2. CentOS
    1. 2.1. 安装准备
  3. 3. Quick Start
  4. 4. 参考资料

macOS


安装准备

1
2
$ sudo gem install -n /usr/local/bin jekyll
$ sudo gem install -n /usr/local/bin bundler
1
2
gem install bundler:1.17.2
bundle update --bundler

将依赖库安装到项目目录下,而不是安装在系统中的 RubyGems

1
$ bundle install --path vendor/bundle

1
gem install nokogiri -v '1.8.2'

新建文件

1
$ jekyll new blogsite

卸载


1
2
gem uninstall -n /usr/local/bin bundler
gem uninstall -n /usr/local/bin jekyll

CentOS


安装准备

1
2
$ yum -y install ruby
$ yum install rubygems -y
1
2
3
4
5
6
7
8
9
10
11
12
13
$ yum -y update

$ yum install gcc g++ make automake autoconf curl-devel openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel

$ sudo yum install ruby-rdoc ruby-devel

$ wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.gz

$ ./configure
$ make
$ sudo make install

$ gem update --system

By default, this will install Ruby into /usr/local. To change, pass the –prefix=DIR option to the ./configure script.

1
$ jekyll --version

.tar.gz 和 .tgz
解压:tar zxvf FileName.tar.gz
压缩:tar zcvf FileName.tar.gz DirName

Quick Start


1
2
3
4
5
$ gem install jekyll bundler
$ jekyll new my-awesome-site
$ cd my-awesome-site
$ bundle exec jekyll serve
=> Now browse to http://localhost:4000
1
2
bundle config set path 'vendor/bundle'
bundle install

参考资料


文章目录
  1. 1. macOS
    1. 1.1. 安装准备
    2. 1.2. 新建文件
    3. 1.3. 卸载
  2. 2. CentOS
    1. 2.1. 安装准备
  3. 3. Quick Start
  4. 4. 参考资料