前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Install Jekyll

Install Jekyll

作者头像
franket
发布2021-08-10 17:37:25
7080
发布2021-08-10 17:37:25
举报
文章被收录于专栏:技术杂记技术杂记

前言

Jekyll 可以将 markdown 格式的文本快速转换成博客

Transform your plain text into static websites and blogs

这里演示一下如何用十分钟搭建一个 Jekyll 博客

Tip: 当前最新版本 Jekyll 3.8.3


操作

环境

代码语言:javascript
复制
[root@h105 ~]# hostnamectl 
   Static hostname: h105
         Icon name: computer-vm
           Chassis: vm
        Machine ID: d027b43535bc4dbe83ef5a6f935dffdb
           Boot ID: b8c9c157cc6e423b933e2a6a641c0910
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-862.2.3.el7.x86_64
      Architecture: x86-64
[root@h105 ~]# ip a 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:c9:c7:04 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global noprefixroute dynamic eth0
       valid_lft 85841sec preferred_lft 85841sec
    inet6 fe80::5054:ff:fec9:c704/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:4c:ad:6a brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.105/24 brd 192.168.56.255 scope global noprefixroute eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe4c:ad6a/64 scope link 
       valid_lft forever preferred_lft forever
[root@h105 ~]# 

安装 gcc

代码语言:javascript
复制
[root@h105 ~]# yum install gcc
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: mirror.pregi.net
 * extras: mirror.pregi.net
 * updates: mirror.pregi.net
base                                                     | 3.6 kB     00:00     
extras                                                   | 3.4 kB     00:00     
updates                                                  | 3.4 kB     00:00     
(1/4): extras/7/x86_64/primary_db                          | 150 kB   00:00     
(2/4): base/7/x86_64/group_gz                              | 166 kB   00:00     
(3/4): base/7/x86_64/primary_db                            | 5.9 MB   00:02     
(4/4): updates/7/x86_64/primary_db                         | 3.6 MB   00:03     
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-28.el7_5.1 will be installed
--> Processing Dependency: libgomp = 4.8.5-28.el7_5.1 for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: cpp = 4.8.5-28.el7_5.1 for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: libgcc >= 4.8.5-28.el7_5.1 for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-28.el7_5.1 will be installed
---> Package glibc-devel.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-222.el7 for package: glibc-devel-2.17-222.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-222.el7.x86_64
---> Package libgcc.x86_64 0:4.8.5-28.el7 will be updated
---> Package libgcc.x86_64 0:4.8.5-28.el7_5.1 will be an update
---> Package libgomp.x86_64 0:4.8.5-28.el7 will be updated
---> Package libgomp.x86_64 0:4.8.5-28.el7_5.1 will be an update
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-222.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-222.el7.x86_64
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-862.6.3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch         Version                  Repository     Size
================================================================================
Installing:
 gcc                  x86_64       4.8.5-28.el7_5.1         updates        16 M
Installing for dependencies:
 cpp                  x86_64       4.8.5-28.el7_5.1         updates       5.9 M
 glibc-devel          x86_64       2.17-222.el7             base          1.1 M
 glibc-headers        x86_64       2.17-222.el7             base          678 k
 kernel-headers       x86_64       3.10.0-862.6.3.el7       updates       7.1 M
 libmpc               x86_64       1.0.1-3.el7              base           51 k
 mpfr                 x86_64       3.1.1-4.el7              base          203 k
Updating for dependencies:
 libgcc               x86_64       4.8.5-28.el7_5.1         updates       101 k
 libgomp              x86_64       4.8.5-28.el7_5.1         updates       156 k

Transaction Summary
================================================================================
Install  1 Package  (+6 Dependent packages)
Upgrade             ( 2 Dependent packages)

Total download size: 31 M
Is this ok [y/d/N]: y
Downloading packages:
Not downloading deltainfo for updates, MD is 370 k and rpms are 257 k
warning: /var/cache/yum/x86_64/7/base/packages/glibc-headers-2.17-222.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for glibc-headers-2.17-222.el7.x86_64.rpm is not installed
(1/9): glibc-headers-2.17-222.el7.x86_64.rpm               | 678 kB   00:01     
(2/9): glibc-devel-2.17-222.el7.x86_64.rpm                 | 1.1 MB   00:01     
Public key for libgcc-4.8.5-28.el7_5.1.x86_64.rpm is not installed
(3/9): libgcc-4.8.5-28.el7_5.1.x86_64.rpm                  | 101 kB   00:00     
(4/9): libgomp-4.8.5-28.el7_5.1.x86_64.rpm                 | 156 kB   00:00     
(5/9): libmpc-1.0.1-3.el7.x86_64.rpm                       |  51 kB   00:00     
(6/9): mpfr-3.1.1-4.el7.x86_64.rpm                         | 203 kB   00:00     
(7/9): cpp-4.8.5-28.el7_5.1.x86_64.rpm                     | 5.9 MB   00:08     
(8/9): kernel-headers-3.10.0-862.6.3.el7.x86_64.rpm        | 7.1 MB   00:09     
(9/9): gcc-4.8.5-28.el7_5.1.x86_64.rpm                     |  16 MB   00:16     
--------------------------------------------------------------------------------
Total                                              1.9 MB/s |  31 MB  00:16     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-5.1804.el7.centos.x86_64 (@anaconda)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : mpfr-3.1.1-4.el7.x86_64                                     1/11 
  Installing : libmpc-1.0.1-3.el7.x86_64                                   2/11 
  Installing : cpp-4.8.5-28.el7_5.1.x86_64                                 3/11 
  Installing : kernel-headers-3.10.0-862.6.3.el7.x86_64                    4/11 
  Installing : glibc-headers-2.17-222.el7.x86_64                           5/11 
  Installing : glibc-devel-2.17-222.el7.x86_64                             6/11 
  Updating   : libgcc-4.8.5-28.el7_5.1.x86_64                              7/11 
  Updating   : libgomp-4.8.5-28.el7_5.1.x86_64                             8/11 
  Installing : gcc-4.8.5-28.el7_5.1.x86_64                                 9/11 
  Cleanup    : libgcc-4.8.5-28.el7.x86_64                                 10/11 
  Cleanup    : libgomp-4.8.5-28.el7.x86_64                                11/11 
  Verifying  : libgomp-4.8.5-28.el7_5.1.x86_64                             1/11 
  Verifying  : libgcc-4.8.5-28.el7_5.1.x86_64                              2/11 
  Verifying  : gcc-4.8.5-28.el7_5.1.x86_64                                 3/11 
  Verifying  : glibc-devel-2.17-222.el7.x86_64                             4/11 
  Verifying  : mpfr-3.1.1-4.el7.x86_64                                     5/11 
  Verifying  : cpp-4.8.5-28.el7_5.1.x86_64                                 6/11 
  Verifying  : glibc-headers-2.17-222.el7.x86_64                           7/11 
  Verifying  : libmpc-1.0.1-3.el7.x86_64                                   8/11 
  Verifying  : kernel-headers-3.10.0-862.6.3.el7.x86_64                    9/11 
  Verifying  : libgomp-4.8.5-28.el7.x86_64                                10/11 
  Verifying  : libgcc-4.8.5-28.el7.x86_64                                 11/11 

Installed:
  gcc.x86_64 0:4.8.5-28.el7_5.1                                                 

Dependency Installed:
  cpp.x86_64 0:4.8.5-28.el7_5.1                                                 
  glibc-devel.x86_64 0:2.17-222.el7                                             
  glibc-headers.x86_64 0:2.17-222.el7                                           
  kernel-headers.x86_64 0:3.10.0-862.6.3.el7                                    
  libmpc.x86_64 0:1.0.1-3.el7                                                   
  mpfr.x86_64 0:3.1.1-4.el7                                                     

Dependency Updated:
  libgcc.x86_64 0:4.8.5-28.el7_5.1       libgomp.x86_64 0:4.8.5-28.el7_5.1      

Complete!
[root@h105 ~]# 

安装 rvm

代码语言:javascript
复制
[root@h105 ~]# rvm -v 
-bash: rvm: command not found
[root@h105 ~]# curl -L get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   194  100   194    0     0    170      0  0:00:01  0:00:01 --:--:--   170
100 24361  100 24361    0     0  14485      0  0:00:01  0:00:01 --:--:-- 14485
Downloading https://github.com/rvm/rvm/archive/1.29.4.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.4/1.29.4.tar.gz.asc
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: Signature made Sun 01 Jul 2018 07:41:26 PM UTC using RSA key ID BF04FF17
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).

GPG signature verification failed for '/usr/local/rvm/archives/rvm-1.29.4.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.4/1.29.4.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:

    gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

or if it fails:

    command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -

the key can be compared with:

    https://rvm.io/mpapis.asc
    https://keybase.io/mpapis

NOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.

[root@h105 ~]# gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
[root@h105 ~]# echo $?
0
[root@h105 ~]# curl -L get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   194  100   194    0     0    372      0 --:--:-- --:--:-- --:--:--   373
100 24361  100 24361    0     0  35805      0 --:--:-- --:--:-- --:--:-- 35805
Downloading https://github.com/rvm/rvm/archive/1.29.4.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.4/1.29.4.tar.gz.asc
gpg: Signature made Sun 01 Jul 2018 07:41:26 PM UTC using RSA key ID BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>"
gpg:                 aka "Michal Papis <michal.papis@toptal.com>"
gpg:                 aka "[jpeg image of size 5015]"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17  0311 3804 BB82 D39D C0E3
     Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36  166B E206 C29F BF04 FF17
GPG verified '/usr/local/rvm/archives/rvm-1.29.4.tgz'
Creating group 'rvm'
Installing RVM to /usr/local/rvm/
Installation of RVM in /usr/local/rvm/ is almost complete:

  * First you need to add all users that will be using rvm to 'rvm' group,
    and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.

  * To start using RVM you need to run `source /etc/profile.d/rvm.sh`
    in all your open shell windows, in rare cases you need to reopen all shell windows.
  * Please do NOT forget to add your users to the rvm group.
     The installer no longer auto-adds root or users to the rvm group. Admins must do this.
     Also, please note that group memberships are ONLY evaluated at login time.
     This means that users must log out then back in before group membership takes effect!
[root@h105 ~]# echo $?
0
[root@h105 ~]# su - root 
Last login: Wed Jul  4 23:54:35 UTC 2018 on pts/0
[root@h105 ~]# rmv -v 
-bash: rmv: command not found
[root@h105 ~]# rvm -v 
rvm 1.29.4 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
[root@h105 ~]# 

安装 ruby

代码语言:javascript
复制
[root@h105 ~]# rvm install ruby
Searching for binary rubies, this might take some time.
No binary rubies available for: centos/7/x86_64/ruby-2.5.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for centos.
Installing requirements for centos.
Installing required packages: patch, autoconf, automake, bison, gcc-c++, libffi-devel, libtool, patch, readline-devel, sqlite-devel, zlib-devel, openssl-devel.-
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.5.1, this may take a while depending on your cpu(s)...
ruby-2.5.1 - #downloading ruby-2.5.1, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13.3M  100 13.3M    0     0  2696k      0  0:00:05  0:00:05 --:--:-- 3048k
ruby-2.5.1 - #extracting ruby-2.5.1 to /usr/local/rvm/src/ruby-2.5.1.....
ruby-2.5.1 - #configuring......................................................|
ruby-2.5.1 - #post-configuration..
ruby-2.5.1 - #compiling........................................................-
ruby-2.5.1 - #installing..............................
ruby-2.5.1 - #making binaries executable..
ruby-2.5.1 - #downloading rubygems-2.7.7
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  894k  100  894k    0     0   984k      0 --:--:-- --:--:-- --:--:--  983k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.5.1 - #extracting rubygems-2.7.7........................................-
ruby-2.5.1 - #removing old rubygems........
ruby-2.5.1 - #installing rubygems-2.7.7................................
ruby-2.5.1 - #gemset created /usr/local/rvm/gems/ruby-2.5.1@global
ruby-2.5.1 - #importing gemset /usr/local/rvm/gemsets/global.gems..............|
ruby-2.5.1 - #generating global wrappers.......
ruby-2.5.1 - #gemset created /usr/local/rvm/gems/ruby-2.5.1
ruby-2.5.1 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.5.1 - #generating default wrappers.......
ruby-2.5.1 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.5.1 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri
[root@h105 ~]# echo $?
0
[root@h105 ~]# 

安装 jekyll

代码语言:javascript
复制
[root@h105 ~]# gem install jekyll
Fetching: public_suffix-3.0.2.gem (100%)gem
Successfully installed public_suffix-3.0.2
Fetching: addressable-2.5.2.gem (100%)
Successfully installed addressable-2.5.2
Fetching: colorator-1.1.0.gem (100%)
Successfully installed colorator-1.1.0
Fetching: http_parser.rb-0.6.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed http_parser.rb-0.6.0
Fetching: eventmachine-1.2.7.gem (100%)
Building native extensions. This could take a while...
Successfully installed eventmachine-1.2.7
Fetching: em-websocket-0.5.1.gem (100%)
Successfully installed em-websocket-0.5.1
Fetching: concurrent-ruby-1.0.5.gem (100%)
Successfully installed concurrent-ruby-1.0.5
Fetching: i18n-0.9.5.gem (100%)
Successfully installed i18n-0.9.5
Fetching: rb-fsevent-0.10.3.gem (100%)
Successfully installed rb-fsevent-0.10.3
Fetching: ffi-1.9.25.gem (100%)
Building native extensions. This could take a while...
Successfully installed ffi-1.9.25
Fetching: rb-inotify-0.9.10.gem (100%)
Successfully installed rb-inotify-0.9.10
Fetching: sass-listen-4.0.0.gem (100%)
Successfully installed sass-listen-4.0.0
Fetching: sass-3.5.6.gem (100%)
Successfully installed sass-3.5.6
Fetching: jekyll-sass-converter-1.5.2.gem (100%)
Successfully installed jekyll-sass-converter-1.5.2
Fetching: ruby_dep-1.5.0.gem (100%)
Successfully installed ruby_dep-1.5.0
Fetching: listen-3.1.5.gem (100%)
Successfully installed listen-3.1.5
Fetching: jekyll-watch-2.0.0.gem (100%)
Successfully installed jekyll-watch-2.0.0
Fetching: kramdown-1.17.0.gem (100%)
Successfully installed kramdown-1.17.0
Fetching: liquid-4.0.0.gem (100%)
Successfully installed liquid-4.0.0
Fetching: mercenary-0.3.6.gem (100%)
Successfully installed mercenary-0.3.6
Fetching: forwardable-extended-2.6.0.gem (100%)
Successfully installed forwardable-extended-2.6.0
Fetching: pathutil-0.16.1.gem (100%)
Successfully installed pathutil-0.16.1
Fetching: rouge-3.1.1.gem (100%)
Successfully installed rouge-3.1.1
Fetching: safe_yaml-1.0.4.gem (100%)
Successfully installed safe_yaml-1.0.4
Fetching: jekyll-3.8.3.gem (100%)
Successfully installed jekyll-3.8.3
Parsing documentation for public_suffix-3.0.2
Installing ri documentation for public_suffix-3.0.2
Parsing documentation for addressable-2.5.2
Installing ri documentation for addressable-2.5.2
Parsing documentation for colorator-1.1.0
Installing ri documentation for colorator-1.1.0
Parsing documentation for http_parser.rb-0.6.0
Installing ri documentation for http_parser.rb-0.6.0
Parsing documentation for eventmachine-1.2.7
Installing ri documentation for eventmachine-1.2.7
Parsing documentation for em-websocket-0.5.1
Installing ri documentation for em-websocket-0.5.1
Parsing documentation for concurrent-ruby-1.0.5
Installing ri documentation for concurrent-ruby-1.0.5
Parsing documentation for i18n-0.9.5
Installing ri documentation for i18n-0.9.5
Parsing documentation for rb-fsevent-0.10.3
Installing ri documentation for rb-fsevent-0.10.3
Parsing documentation for ffi-1.9.25
Installing ri documentation for ffi-1.9.25
Parsing documentation for rb-inotify-0.9.10
Installing ri documentation for rb-inotify-0.9.10
Parsing documentation for sass-listen-4.0.0
Installing ri documentation for sass-listen-4.0.0
Parsing documentation for sass-3.5.6
Installing ri documentation for sass-3.5.6
Parsing documentation for jekyll-sass-converter-1.5.2
Installing ri documentation for jekyll-sass-converter-1.5.2
Parsing documentation for ruby_dep-1.5.0
Installing ri documentation for ruby_dep-1.5.0
Parsing documentation for listen-3.1.5
Installing ri documentation for listen-3.1.5
Parsing documentation for jekyll-watch-2.0.0
Installing ri documentation for jekyll-watch-2.0.0
Parsing documentation for kramdown-1.17.0
Installing ri documentation for kramdown-1.17.0
Parsing documentation for liquid-4.0.0
Installing ri documentation for liquid-4.0.0
Parsing documentation for mercenary-0.3.6
Installing ri documentation for mercenary-0.3.6
Parsing documentation for forwardable-extended-2.6.0
Installing ri documentation for forwardable-extended-2.6.0
Parsing documentation for pathutil-0.16.1
Installing ri documentation for pathutil-0.16.1
Parsing documentation for rouge-3.1.1
Installing ri documentation for rouge-3.1.1
Parsing documentation for safe_yaml-1.0.4
Installing ri documentation for safe_yaml-1.0.4
Parsing documentation for jekyll-3.8.3
Installing ri documentation for jekyll-3.8.3
Done installing documentation for public_suffix, addressable, colorator, http_parser.rb, eventmachine, em-websocket, concurrent-ruby, i18n, rb-fsevent, ffi, rb-inotify, sass-listen, sass, jekyll-sass-converter, ruby_dep, listen, jekyll-watch, kramdown, liquid, mercenary, forwardable-extended, pathutil, rouge, safe_yaml, jekyll after 29 seconds
25 gems installed
[root@h105 ~]# echo $?
0
[root@h105 ~]# 

查看帮助文档

代码语言:javascript
复制
[root@h105 ~]# jekyll  --help 
jekyll 3.8.3 -- Jekyll is a blog-aware, static site generator in Ruby

Usage:

  jekyll <subcommand> [options]

Options:
        -s, --source [DIR]  Source directory (defaults to ./)
        -d, --destination [DIR]  Destination directory (defaults to ./_site)
            --safe         Safe mode (defaults to false)
        -p, --plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]  Plugins directory (defaults to ./_plugins)
            --layouts DIR  Layouts directory (defaults to ./_layouts)
            --profile      Generate a Liquid rendering profile
        -h, --help         Show this message
        -v, --version      Print the name and version
        -t, --trace        Show the full backtrace when an error occurs

Subcommands:
  docs                  
  import                
  build, b              Build your site
  clean                 Clean the site (removes site output and metadata file) without building.
  doctor, hyde          Search site and print specific deprecation warnings
  help                  Show the help message, optionally for a given subcommand.
  new                   Creates a new Jekyll site scaffold in PATH
  new-theme             Creates a new Jekyll theme scaffold
  serve, server, s      Serve your site locally
[root@h105 ~]# 

安装 nodejs

代码语言:javascript
复制
[root@h105 ~]# yum install epel-release -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.pregi.net
 * extras: mirror.pregi.net
 * updates: mirror.pregi.net
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch             Version         Repository        Size
================================================================================
Installing:
 epel-release           noarch           7-11            extras            15 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 15 k
Installed size: 24 k
Downloading packages:
epel-release-7-11.noarch.rpm                               |  15 kB   00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                     1/1 
  Verifying  : epel-release-7-11.noarch                                     1/1 

Installed:
  epel-release.noarch 0:7-11                                                    

Complete!
[root@h105 ~]# yum -y install nodejs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     | 5.1 kB     00:00     
 * base: mirror.pregi.net
 * epel: mirror.pregi.net
 * extras: mirror.pregi.net
 * updates: mirror.pregi.net
epel                                                     | 3.2 kB     00:00     
(1/3): epel/x86_64/group_gz                                |  88 kB   00:00     
(2/3): epel/x86_64/updateinfo                              | 929 kB   00:00     
(3/3): epel/x86_64/primary                                 | 3.5 MB   00:04     
epel                                                                12604/12604
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 1:6.14.3-1.el7 will be installed
--> Processing Dependency: npm = 1:3.10.10-1.6.14.3.1.el7 for package: 1:nodejs-6.14.3-1.el7.x86_64
--> Processing Dependency: libuv >= 1:1.9.1 for package: 1:nodejs-6.14.3-1.el7.x86_64
--> Processing Dependency: http-parser >= 2.7.0 for package: 1:nodejs-6.14.3-1.el7.x86_64
--> Processing Dependency: libuv.so.1()(64bit) for package: 1:nodejs-6.14.3-1.el7.x86_64
--> Processing Dependency: libicuuc.so.50()(64bit) for package: 1:nodejs-6.14.3-1.el7.x86_64
--> Processing Dependency: libicui18n.so.50()(64bit) for package: 1:nodejs-6.14.3-1.el7.x86_64
--> Processing Dependency: libicudata.so.50()(64bit) for package: 1:nodejs-6.14.3-1.el7.x86_64
--> Processing Dependency: libhttp_parser.so.2()(64bit) for package: 1:nodejs-6.14.3-1.el7.x86_64
--> Running transaction check
---> Package http-parser.x86_64 0:2.7.1-5.el7_4 will be installed
---> Package libicu.x86_64 0:50.1.2-15.el7 will be installed
---> Package libuv.x86_64 1:1.19.2-1.el7 will be installed
---> Package npm.x86_64 1:3.10.10-1.6.14.3.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package           Arch         Version                        Repository  Size
================================================================================
Installing:
 nodejs            x86_64       1:6.14.3-1.el7                 epel       4.7 M
Installing for dependencies:
 http-parser       x86_64       2.7.1-5.el7_4                  base        28 k
 libicu            x86_64       50.1.2-15.el7                  base       6.9 M
 libuv             x86_64       1:1.19.2-1.el7                 epel       121 k
 npm               x86_64       1:3.10.10-1.6.14.3.1.el7       epel       2.5 M

Transaction Summary
================================================================================
Install  1 Package (+4 Dependent packages)

Total download size: 14 M
Installed size: 51 M
Downloading packages:
(1/5): http-parser-2.7.1-5.el7_4.x86_64.rpm                |  28 kB   00:00     
warning: /var/cache/yum/x86_64/7/epel/packages/libuv-1.19.2-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for libuv-1.19.2-1.el7.x86_64.rpm is not installed
(2/5): libuv-1.19.2-1.el7.x86_64.rpm                       | 121 kB   00:00     
(3/5): npm-3.10.10-1.6.14.3.1.el7.x86_64.rpm               | 2.5 MB   00:02     
(4/5): nodejs-6.14.3-1.el7.x86_64.rpm                      | 4.7 MB   00:03     
(5/5): libicu-50.1.2-15.el7.x86_64.rpm                     | 6.9 MB   00:06     
--------------------------------------------------------------------------------
Total                                              2.1 MB/s |  14 MB  00:06     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) <epel@fedoraproject.org>"
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-11.noarch (@extras)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libicu-50.1.2-15.el7.x86_64                                  1/5 
  Installing : http-parser-2.7.1-5.el7_4.x86_64                             2/5 
  Installing : 1:libuv-1.19.2-1.el7.x86_64                                  3/5 
  Installing : 1:npm-3.10.10-1.6.14.3.1.el7.x86_64                          4/5 
  Installing : 1:nodejs-6.14.3-1.el7.x86_64                                 5/5 
  Verifying  : 1:libuv-1.19.2-1.el7.x86_64                                  1/5 
  Verifying  : http-parser-2.7.1-5.el7_4.x86_64                             2/5 
  Verifying  : 1:nodejs-6.14.3-1.el7.x86_64                                 3/5 
  Verifying  : 1:npm-3.10.10-1.6.14.3.1.el7.x86_64                          4/5 
  Verifying  : libicu-50.1.2-15.el7.x86_64                                  5/5 

Installed:
  nodejs.x86_64 1:6.14.3-1.el7                                                  

Dependency Installed:
  http-parser.x86_64 0:2.7.1-5.el7_4     libicu.x86_64 0:50.1.2-15.el7          
  libuv.x86_64 1:1.19.2-1.el7            npm.x86_64 1:3.10.10-1.6.14.3.1.el7    

Complete!
[root@h105 ~]# 

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 前言
  • 操作
    • 环境
      • 安装 gcc
        • 安装 rvm
          • 安装 ruby
            • 安装 jekyll
              • 安装 nodejs
              相关产品与服务
              网站建设
              网站建设(Website Design Service,WDS),是帮助您快速搭建企业网站的服务。通过自助模板建站工具及专业设计服务,无需了解代码技术,即可自由拖拽模块,可视化完成网站管理。全功能管理后台操作方便,一次更新,数据多端同步,省时省心。使用网站建设服务,您无需维持技术和设计师团队,即可快速实现网站上线,达到企业数字化转型的目的。
              领券
              问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档