[root@localhost ~]# wget https://npm.taobao.org/mirrors/node/v10.16.3/node-v10.16.3-linux-x64.tar.gz
[root@localhost ~]# tar -zxvf node-v10.16.3-linux-x64.tar.gz
[root@localhost ~]# ls
anaconda-ks.cfg node-v17.9.0-linux-x64 node-v17.9.0-linux-x64.tar.gz
[root@localhost ~]# mv node-v17.9.0-linux-x64 node
[root@localhost ~]# mv node /usr/local/
## 设置环境变量
[root@localhost ~]# vim /etc/profile
# /etc/profile
export NODE_HOME=/usr/local/node
export PATH=$NODE_HOME/bin:$PATH
"/etc/profile" 80L, 1889C written
[root@localhost ~]# source /etc/profile
## 确认安装
[root@localhost ~]# node --version
v17.9.0
npm install gitbook-cli -g
root@localhost ~]# gitbook -V
CLI version: 2.3.2
Installing GitBook 3.2.3
[root@localhost ~]# cd /opt/
[root@localhost opt]# gitbook init
warn: no summary file in this book
info: create README.md
info: create SUMMARY.md
info: initialization is finished
[root@localhost opt]# gitbook init
warn: no summary file in this book
info: create README.md
info: create SUMMARY.md
info: initialization is finished
[root@localhost opt]#
[root@localhost opt]# ls
README.md SUMMARY.md
[root@localhost opt]# gitbook install
info: nothing to install!
[root@localhost opt]# gitbook serve
Live reload server started on port: 35729
Press CTRL+C to quit …
info: 7 plugins are installed
info: loading plugin “livereload”… OK
info: loading plugin “highlight”… OK
info: loading plugin “search”… OK
info: loading plugin “lunr”… OK
info: loading plugin “sharing”… OK
info: loading plugin “fontsettings”… OK
info: loading plugin “theme-default”… OK
info: found 1 pages
info: found 0 asset files
info: >> generation finished with success in 0.5s !
Starting server …
Serving book on http://localhost:4000