Build and Release

A continuous learner for experience and life.

Install Gollum

gollum snapshot

Gollum is a simple wiki system built on top of Git.

Gollum wikis are simply Git repositories that adhere to a specific format. Gollum pages may be written in a variety of formats and can be edited in a number of ways depending on your needs. You can edit your wiki locally:

  • With your favorite text editor or IDE (changes will be visible after committing).
  • With the built-in web interface.
  • With the Gollum Ruby API.

Here are steps to install gollum.

Install some dependencies:

1
sudo apt-get install libicu-dev

Install Gollum with RubyGems:

1
gem install gollum

Install some text format

1
2
gem install redcarpet
gem install github-markdown

Create a local git repo on host

1
2
3
mkdir repos/gollum
cd repos/gollum
git init .

Run the gollum

1
gollum

This will start up a web server running the Gollum frontend and you can view and edit your wiki at http://<host>:4567.

BUILDING THE GEM FROM MASTER

1
2
3
4
5
$ gem uninstall -aIx gollum
$ git clone https://github.com/gollum/gollum.git
$ cd gollum
gollum$ rake build
gollum$ gem install --no-ri --no-rdoc pkg/gollum*.gem

RUN THE TESTS

1
2
$ bundle install
$ bundle exec rake test

RUNNING WITH UPSTART

Create a wrapper to include environment information:

1
2
3
$ rvm alias create mygollum ruby-2.1.2@mygollum
$ rvm alias list
# $HOME/.rvm/wrappers/mygollum/gollum

Create a config file under /etc/init, name it gollum.cong, as: https://gist.github.com/lifuzu/31af0dc859bf9bfb6da5 Start/Stop the service:

1
2
# sudo start gollum
$ sudo stop gollum

You can get the log file at /var/log/upstart/gollum.log to analyze:

1
$ sudo vi /var/log/upstart/gollum.log 

RUNNING WITH NGINX

Create a subdomain like ‘gollum.weimed.com’ point to your server IP; Create a nginx configuration file, as /etc/nginx/sites-available/stackedit.weimed.com: https://gist.github.com/lifuzu/2f2ce9095ba4a6969b2c Create a symbolic link to enable it

1
$ sudo ln -s /etc/nginx/sites-available/gollum.weimed.com /etc/nginx/sites-enabled/gollum.weimed.com

Check the configuration:

1
2
3
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Reload the configuration:

1
$ sudo service nginx reload

You should see: http://gollum.weimed.com/

AUTH

TODO, please refer to [5], [6]

References:

  1. https://github.com/gollum/gollum
  2. https://gist.github.com/leon/2643936
  3. http://rvm.io/integration/init-d
  4. https://github.com/rvm/rvm-site-setup/blob/master/conf/smfbot.conf
  5. http://www.mfoot.com/blog/2013/05/19/setting-up-a-personal-wiki-with-aws-and-gollum/
  6. https://github.com/roman/rack-auth

Written with StackEdit.

Comments