fc2ブログ
 
I've just finished upgrading my new PC setup to Fedora 22, and it's looking and feeling great.

One of the programs that I've started using is Gitit which is a beautifully self-hosted wiki based on Git and written in Haskell. It's very easy to use, extremely easy to setup as well.

First install the haskell-platform
> dnf install haskell-platform

Update and generate a local cabal configuration
> cabal update

Install Gitit via Cabal
> cabal instal gitit

Add an alias to your bashrc for systemctl --user and activate it
> echo "alias userctl='systemctl --user'" >> ~/.bashrc
> source ~/.bashrc

Create a local systemd service entry - remember to replace kp with your username
> mkdir -p ~/.config/systemd/user
> echo "
[Unit]
Description=my wiki

[Service]
Type=simple
WorkingDirectory=%h/.gitit
ExecStart=/home/kp/.cabal/bin/gitit -f %h/.gitit/my.conf
Restart=no

[Install]
WantedBy=console.target
"
> ~/.config/systemd/user/gitit.service

Create Gitit configuration directory and generate a default configuration file
> mkdir ~/.gitit
> gitit --print-default-config > ~/.gitit/my.conf

Start Gitit
> userctl start gitit.service


And voilà, you're all set.
If the above all worked successfully you should have a new wiki running at http://localhost:5001.

Now the userctl part was completely optional, but I feel that the alias makes sense and saves on the keystrokes.

Happy editing.
スポンサーサイト