Introduction
Gollum is the Git-based wiki software used as the backend of the GitHub Wiki. Deploying Gollum will allow you to host a GitHub-like Wiki system on your server. In this tutorial we will install Gollum on a Debian 10 Rcs instance.
Prerequisites
- A fresh Debian 10 Rcs instance with the latest updates.
- Make a sudo user named gollumuser. Follow the Rcs best practices guide. Use the gollumuser user for the remainder of this guide.
1. Install Gollum
Install Gollum's dependencies.
$ sudo apt install ruby ruby-dev cmake libssl-dev pkg-config build-essential zlib1g-dev libicu-dev git -yInstall Gollum with the Ruby package manager, gem.
$ sudo gem install gollum2. Setup a Gollum Wiki
Switch to the gollumuser home directory.
$ cd ~Make a directory for the new wiki.
$ mkdir my-wikiChange to the wiki directory.
$ cd my-wikiCreate a git repository in the wiki directory.
$ git initStart Gollum.
$ gollumNote: You can exit Gollum with Ctrl + C.
3. Access Gollum from the Web
While Gollum is running, navigate with your web browser to your server's IP address at port 4567. For example:
http://192.0.2.123:4567Create a wiki page. Feel free to create multiple wiki pages. The pages you create are saved in Markdown format as .md files in the ~/my-wiki git repo directory.
4. Create Wiki Pages from the CLI
You can also create or edit pages from the CLI by creating Markdown files and then committing them to the git repo.
Exit Gollum with Ctrl + C, then switch to the wiki directory:
$ cd ~/my-wikiCreate a new file, page1.md
$ nano page1.mdEnter some content.
Testing A B C D E F GSave and exit the file, then configure git with your name and email.
$ git config --global user.email "admin@example.com"
$ git config --global user.name "admin"Commit your changes.
$ git add page1.md
$ git commit -m "create page1"Start Gollum.
$ gollumReview your changes in a web browser. For example:
http://192.0.2.123:4567/golllum/latest_changesConclusion
To learn more about Gollum, use gollum --help or visit the official Gollum website.