-
安裝相關的套件:
# yum install epel-release
# yum update
# yum install gcc openssl-devel gcc-c++ compat-gcc-44 compat-gcc-44-c++
# reboot
-
由網路上,安裝遣缺的套件:
# rpm -ivh https://kojipkgs.fedoraproject.org//packages/http-parser/2.7.1/3.el7/x86_64/http-parser-2.7.1-3.el7.x86_64.rpm
-
安裝 Node.js 套件:
# yum -y install nodejs
-
測試 Node.js 與 npm 套件是否正常運作:
# node -v
#npm -v
-
安裝 gitbook 套件:
# npm install -g gitbook-cli
-
安裝 Calibre 套件:
# wget -nv -O- https://download.calibre-ebook.com/linux-installer.py\
| python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
-
測試 gitbook 套件:
# gitbook -V
-
開始利用 gitbook 開啟新電子書編輯內容:
# mkdir /opt/test
# cd /opt/test
# gitbook init
# gitbook build
# gitbook pdf
# gitbook serve