grimoire

personal wiki
git clone git://git.pyratebeard.net/grimoire.git
Log | Files | Refs

gollum.md (2603B)


      1 # gollum
      2 
      3 ## install and enable
      4 ```
      5 gem install gollum
      6 gem install github-markdown #required for tables
      7 ```
      8 
      9 navigate to wiki dir and run gollum
     10 ```
     11 gollum --css --h1-title
     12 ```
     13 - using custom css file and setting first h1 header as page title
     14 - see [gollum config][] docs for options
     15 - look at [omnigollum][] for user auth
     16 - [gollum reverse proxy][]
     17 
     18 ## running as a service
     19 enter the following in `/etc/systemd/system/gollum-personal.service`
     20 ```
     21 [Unit]
     22 Description=Personal Gollum wiki server
     23 After=network.target
     24 
     25 [Service]
     26 Type=simple
     27 ExecStart=/home/pyratebeard/.gem/ruby/2.5.0/bin/gollum --show-all --live-preview --h1-title --port 4666 --css "/path/to/your/repo"
     28 Restart=on-abort
     29 
     30 [Install]
     31 WantedBy=multi-user.target
     32 ```
     33 
     34 ## installing gollum on jump-test
     35 https://github.com/gollum/gollum # use --bare
     36 
     37 - configure omnigollum https://github.com/arr2036/omnigollum
     38 - using azuread https://github.com/AzureAD/omniauth-azure-activedirectory
     39 
     40 ### steps
     41 - to enable [git server][]
     42     - install git (duh!)
     43     - create 'git' user
     44         ```
     45         adduser git
     46         mkdir ~git/.ssh
     47         chmod 700 ~git/.ssh
     48         touch ~git/.ssh/authorized_keys
     49         chmod 600 ~git/.ssh/authorized_keys
     50         ```
     51 - mkdir 'wiki' dir
     52     ```
     53     mkdir /wiki
     54     chown git. /wiki
     55     ```
     56 - create git repo - [getting git on server][]
     57     ```
     58     su - git
     59     cd /wiki
     60     git init --bare --shared
     61     ```
     62 - clone repo and initial commit (on local machine)
     63     ```
     64     git clone git@gitserver:/wiki wiki
     65     cd wiki/
     66     echo "# wiki" > README.md
     67     git add README.md
     68     git commit -m "Initial commit"
     69     git push -u origin master
     70     ```
     71 - install gollum
     72     ```
     73     apt install ruby ruby-dev build-essential zlib1g-dev libicu-dev
     74     gem install gollum
     75     ```
     76 
     77     ```
     78     yum group install "Development Tools"
     79     yum install ruby ruby-devel libicu libicu-devel zlib zlib-devel
     80     gem install gollum
     81     ```
     82 - enable gollum as a service
     83     ```
     84     vi /etc/systemd/system/gollum.service
     85 
     86     [Service]
     87     ExecStart=/usr/local/bin/gollum --show-all "/wiki"
     88     ```
     89 - allow traffic
     90     ```
     91     iptables -I INPUT -p tcp --dport 4567 -j ACCEPT -m comment --comment "Allow access to wiki"
     92     ```
     93 
     94 [gollum config]: https://github.com/gollum/gollum#configuration
     95 [omnigollum]: https://github.com/arr2036/omnigollum/blob/master/config.rb.example
     96 [gollum reverse proxy]: https://gist.github.com/spinpx/c46ea0b24157ca5f731f
     97 [git server]: https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server
     98 [getting git on server]: https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server