CentOS6.2にgollumをセットアップしたときのメモ
ドキュメントはMarkdownで書いてGitで管理しているのですが、Webインターフェースがあると便利だな、ということでgithub/gollum · GitHubをセットアップしてみました。
環境はCentOS6.2です。
まずはRubyのインストール。1.8.7以前でしか動かないので注意。
# yum install ruby # yum install ruby-devel # yum install rubygems
gollumの動作に必要なライブラリをインストール。
# yum -y install libxml2-devel # yum -y install libxslt-devel
gollum本体のインストール。GFMに必要なgemもインストールします。
# gem install gollum # gem install github-markdown
gollumはRedcarpetの1.Xでしか動かないらしい。
# gem uninstall redcarpet # gem install redcarpet --version=1.17.2
これでインストールは完了です。
引数にgitリポジトリを指定して起動。
# gollum /path/to/doc.git
組み込みWebサーバがポート4576で起動します。
そっけない画面ですがプレビューとか検索とか使えて素敵です。
ホストとかポートはオプションで指定する感じ。
# gollum --help Gollum is a multi-format Wiki Engine/API/Frontend. Basic Command Line Usage: gollum [OPTIONS] [PATH] PATH The path to the Gollum repository (default .). Options: --port [PORT] Bind port (default 4567). --host [HOST] Hostname or IP address to listen on (default 0.0.0.0). --version Display current version. --config [CONFIG] Path to additional configuration file --irb Start an irb process with gollum loaded for the current wiki. --page-file-dir [PATH] Specify the sub directory for all page files (default: repository root). --ref [REF] Specify the repository ref to use (default: master).
認証とかないのでローカル以外で使うときは注意が必要かな。