I’m starting to set up a wiki on HCoop. I’ll use this page to remember stuff.
I asked for the campaignwiki.org domain, and pointed my records at Gandi to the ns1.hcoop.net and ns3.hcoop.net servers.
I want campaignwiki.org/wiki to be an Oddmuse wiki.
Create two directories:
mkdir ~/wiki mkdir ~/cgi-bin
HCoop uses AFS, so UNIX permissions have no effect. `alex.daemon` is my “bizarro-world twin” that Apache uses when serving my content.
Thus, add read permission:
fs setacl ~/cgi-bin/ alex.daemon read
Write permissions to the data directory:
fs setacl ~/wiki alex.daemon write
Check permissions using `fs listacl cgi-bin wiki`.
Create `~/.domtool/campaignwiki.org` as follows:
dom "campaignwiki.org" where WWW = begin scriptAlias "/wiki" (home "cgi-bin/wrapper.pl"); end with end;
I really should set up the `WikiDataDir` environment variable, here. Then I could get around using a wrapper script!
And we start with a very simple CGI script written in Perl by creating `cgi-bin/wrapper.pl`:
#!/usr/bin/perl print "Content-Type: text/plain\r\n\r\n"; print "Hello!\n";
It works! 😄
We’re half way through. Cool.
Point to the new script using `~/public_html/index.html`:
<body><a href="/wiki">Wiki</a>
Once I’m done setting up the wiki, I will either replace this with a better looking static landing page or rewrite it to run the wiki.
Get my key:
mkdir ~/.ssh chmod go-rx .ssh fs setacl -clear ~/.ssh alex all scp aschroeder@thinkmo.de:.ssh/*rsa* ~/.ssh
Check out Oddmuse:
export CVS_RSH=ssh cvs -z3 -d:ext:as@cvs.savannah.nongnu.org:/sources/oddmuse co oddmuse
(Also add the `CVS_RSH` setting to `.bashrc` and source it from `.bash_profile`.)
Before testing the setup we need a better wrapper script at `~/cgi-bin/wrapper.pl`:
#!/usr/bin/perl package OddMuse; $DataDir = '/afs/hcoop.net/user/a/al/alex/wiki'; do 'wiki.pl';
And we need a `~/wiki/config` eventually. A simple start:
#!/usr/bin/perl $SiteName = 'Campaign Wiki';
And install some modules!
mkdir -p ~/wiki/modules/source cd ~/oddmuse/modules cp creole.pl namespaces.pl gotobar.pl questionasker.pl \ calendar.pl image.pl localnames.pl markup.pl smiles.pl \ static-copy.pl ~/wiki/modules/source/
Some Makefiles!
`~/Makefile`:
all: cd oddmuse; cvs up install: cd cgi-bin; make cd wiki/modules; make
`~/cgi-bin/Makefile`:
wiki.pl: ~/oddmuse/wiki.pl cp {body}lt; $@
`~/wiki/modules/Makefile`:
concat.pl: source/*.pl cat $^ > $@ source/%.pl: ~/oddmuse/modules/%.pl cp {body}lt; $@
Now we’re ready to run `make install` on the top level! This should update our Oddmuse directory and update core script, modules, and regenerate the concatenated modules.
#HCoop