Deploy GitBook under CentOS7

GitBook is a command line tool based on Node.js, you can use Github/Git and Markdown to make beautiful e-books

GitBook supports multiple document formats:

  1. Static site: GitBook outputs this format by default, and the generated static site can be directly hosted on the Github Pages service;

  2. PDF: Need to install gitbook-pdf dependency;

  3. eBook: ebook-convert needs to be installed;

  4. Single HTML webpage: Supports outputting content as single page HTML, but it is generally used in the intermediate process of converting e-book format to PDF or eBook;

  5. JSON: Generally used for e-book debugging or metadata extraction.

To use GitBook to make e-books, two files are necessary: README.md and SUMMARY.md


The following describes how to deploy GitBook under CentOS7 system

1) Download the Linux64-bit binary package of Node.js from the official website

Download wget https://nodejs.org/dist/v12.16.1/node-v12.16.1-linux-x64.tar.xz

2) Unzip to the specified directory

tar -xJf node-v12.16.1-linux-x64.tar.xz -C /usr/local/lib/

cd /usr/local/lib

mv node-v12.16.1-linux-x64/ nodejs

3) Modify the environment variable vi /etc/profile

export PATH=/usr/local/lib/nodejs/bin:$PATH

source /etc/profile

And test whether there is an npm command, enter npm -v to view the version of npm

4) Install gitbook-cli using npm

npm install -g gitbook-cli

gitbook --version View version information, gitbook will be installed automatically when executed

5) gitbook init

gitbook initializes to create README.md and SUMMARY.md directory files

README.md is the documentation, and Summary.md is actually the chapter list of the book

6) Edit the Summary.md file example

Summary

Execute the gitbook init command again. GitBook will look for the directories and files described in the Summary.md file, if not, it will create them

Then execute gitbook serve

Web browser to access port 4000

Of course, you can also manually specify the port as 80

gitbook serve --port 80

The above is the deployment of gitbook. You can use the markdown editing tool to write the content of the md file and then publish the e-book.

Summary: gitbook is closely related to Markdown and Git, and they are generally used in combination

1、 Choose the right Markdown editing tool to get a better writing experience; use GitBook to manage documents, preview and make e-books;

2、 At the same time, manage the changes of book content through Git and host them in the cloud (such as GitHub, GitLab, Code Cloud, or a Git server built by yourself) to achieve multi-person collaboration

Recommended Posts

Deploy GitBook under CentOS7
Deploy JDK+Tomcat8 under CentOS
Deploy and optimize Tomcat under Centos
CentOS 7 deploy OpenLDAP+FreeRadius
Kickstart+PXE automatically deploy CentOS6.6
Compile Hadoop-2.7.6 under CentOS7.4
Install mysql5.7 under CentOS7
Install ActiveMQ under Centos7
Install PostgreSQL12 under CentOS7
Install CentOS under VMware
CentOS 6.8 deploy zookeeper cluster
CentOS 7 deploy saltstack service
Install mysql under Centos 7
Configure lamp under centos6.8
Install Jenkins under Centos 7
Deploy vuepress on centos7
Redis3 installation under Centos7
Centos6.8 deploy vnc service
Install MariaDB under MariaDB Centos7
Install mysql5.1 under CentOS6.5
Deploy Jenkin on centos7
Deploy Graylog open source log management system under CentOS7
Xen virtualization combat under CentOS 6.6
[CentOS environment deployment] Java7/Java8 deployment under CentOS
CentOS7 deploy vsftp (FTP) service
Deploy FTP server under ubuntu
Build docker environment under Centos6.5
Build OpenV** Server under CentOS7
Build OpenLDAP server under CentOS7
Redis cluster installation under CentOS
Centos7 set up GitBook environment
CentOS 7.2 deploy Node.js development environment
Configure static IP under CentOS 7
Deploy front-end projects using centOS 7
Install Oracle11gR2 database under CentOS6.9
CentOS 7.2 deploy mail server (Postfix)
3 partitioning tools under CentOS Linux
Install MySQL under Linux (CentOS 7)
Redis cluster installation under CentOS
Root password cracking under CentOS 7
SELinux security settings under CentOS
Install Java JDK8 under CentOS6
Centos6 set up GitBook environment
CentOS7.7 deploy k8s (1 master + 2 node)
Install MongoDB database under CentOS7
CentOS 6.8 under linux install mongodb
Set static IP under Centos
Install Mesos tutorial under CentOS7
Deploy the open source continuous integration tool Jenkins under CentOS7
Use Jexus 5.8.2 to deploy and run Asp.net core under Centos
CentOS7.7 deploy k8s (3 master + 3 node + 1 client)
Install and configure keepalived under CentOS 5.9
Compile and install LAMP under Centos 5.2
Use Nginx and u under CentOS
CentOS7.7 deploy k8s + Prometheus (1 master + 2 node)
CentOS 8 (2)
[Introduction to redis] Install redis under Centos
RabbitMQ cluster deployment record under Centos6.9
Installation under centos6.9 of jenkins learning
Deploy the mail system under Ubuntu 19.10
Build a PXC cluster under CentOS8