]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/tips/ikiwiki_on_Mac_OS_X_Snow_Leopard.mdwn
(no commit message)
[git.ikiwiki.info.git] / doc / tips / ikiwiki_on_Mac_OS_X_Snow_Leopard.mdwn
1 These are some notes on installing ikiwiki on Mac OS X Snow Leopard. I have a three year old machine with a lot of stuff on it so it took quite a while, YMMV. 
3 The best part of installing ikiwiki was learning how to use git. I never used source control before but its pretty slick.
6 ## installing git:
8 cd /opt/ikiwiki/install
10 curl http://kernel.org/pub/software/scm/git/git-(latest version).tar.gz -O
12 tar xzvf git-(latest version).tar.gz
14 cd git-(latest version)
16 ./configure --prefix=/usr/local 
18 make prefix=/usr/local all
20 sudo make install
23 git config --global user.name "firstname lastname" 
25 git config --global user.email "email here"
27 git config --global color.ui "auto" 
30 curl http://www.kernel.org/pub/software/scm/git/git-manpages-1.7.3.1.tar.gz | sudo tar -xzC /usr/local/share/man/
33 ## installing ikiwiki:
34 I had terrible trouble installing ikiwiki. It turned out I had accidentally installed Perl through ports. Uninstalling that made everything install nicely.
35 I got an error on msgfmt. Turns out this is a program in gettext. I installed that and it fixed the error.
37 git clone git://git.ikiwiki.info/
39 perl Makefile.PL  LIB=/Library/Perl/5.10.0
41 make
43 sudo make install
45 when you make ikiwiki it gives you a .git folder with the ikiwiki files. Stay out of this folder. You want to learn how to create a clone and make all your changes in the clone. When you push the changes ikiwiki will update. I moved a file in this folder by accident because I named my working file the same and I couldn't get into the setup page. I had apparently messed up my ikiwiki git repository. I did a pull into my clone, deleted the repository and webserver/ cgi folders and ran a new setup. Then I did a git clone and dragged all my old files into the new clone. Did the git dance and did git push. Then the angels sang.
48 ## using git from inside a git folder:
50 start with git clone, then learn to do the git dance like this.
52 git pull
54 make your changes to your clone
56 git commit -a -m "message here"
58 git push
61 When you can't get into the setup page or you get strange behavior after a setup update the Utilities > Console app is your friend.
63 ## installing gitweb
65 cd gitweb
67 make GITWEB_PROJECTROOT="/opt/ikiwiki/" GITWEB_CSS="/gitweb/gitweb.css" GITWEB_LOGO="/gitweb/git-logo.png" GITWEB_FAVICON="/gitweb/git-favicon.png" 
69 cp gitweb.cgi /Library/WebServer/CGI-Executables/
71 sudo chmod 2755 /Library/WebServer/CGI-Executables/gitweb.cgi
73 ## installing xapian:
75 download xapian and omega
77 I needed pcre: sudo ports install pcre
79 ./configure
81 make
83 sudo make install
86 ## installing omega:
88 I had a build error do to libiconv undefined symbols. sudo port deactivate libiconv took care of it. After install I had trouble with ikiwiki so I did a sudo port install libiconv and ikiwiki came back.
90 ./configure
92 make
94 sudo make install
97 ## installing Search::Xapian from CPAN
99 for some reason this wouldn't install using CPAN console so I went to CPAN online and downloaded the source.
101 perl Makefile.PL
103 make
105 make test
107 sudo make install
109 it installed without issue so I'm baffled why it didn't install from command line.
112 ## setup file
114 #!/usr/bin/perl
115 # Ikiwiki setup automator.
117 # This setup file causes ikiwiki to create a wiki, check it into revision
118 # control, generate a setup file for the new wiki, and set everything up.
120 # Just run: ikiwiki -setup /etc/ikiwiki/auto.setup
122 # By default, it asks a few questions, and confines itself to the user's home
123 # directory. You can edit it to change what it asks questions about, or to
124 # modify the values to use site-specific settings.
126 require IkiWiki::Setup::Automator;
128 our $wikiname="your wiki";
129 our $wikiname_short="yourwiki";
130 our $rcs="git";
131 our $admin="your name";
132 use Net::Domain q{hostfqdn};
133 our $domain="your.domain";                    
135 IkiWiki::Setup::Automator->import(
136 wikiname => $wikiname,
137 adminuser => [$admin],
138 rcs => $rcs,
139 srcdir => "/opt/ikiwiki/$wikiname_short",
140 destdir => "/Library/WebServer/Documents/$wikiname_short",
141 repository => "/opt/ikiwiki/$wikiname_short.".($rcs eq "monotone" ? "mtn" : $rcs),
142 dumpsetup => "/opt/ikiwiki/$wikiname_short.setup",
143 url => "http://$domain/$wikiname_short",
144 cgiurl => "http://$domain/cgi-bin/$wikiname_short/ikiwiki.cgi",
145 cgi_wrapper => "/Library/WebServer/CGI-Executables/$wikiname_short/ikiwiki.cgi",
146 adminemail => "your\@email.com",
147 add_plugins => [qw{goodstuff websetup}],
148 disable_plugins => [qw{}],
149 libdir => "/opt/ikiwiki/.ikiwiki",
150 rss => 1,
151 atom => 1,
152 syslog => 1,
156 ## turning on search plugin:
158 I turned on the plugin from the setup page in ikiwiki but it gave an error when I went to search. Error "blah blah cgi-bin/omega/omega" does not exist or some such. I did a 
160 find / -name "omega" -print
162 and found the omega program in 
164 /usr/local/lib/xapian-omega/bin/omega. 
166 Then I went into the setup file and replaced the bad path, updated and badda-boom badda-bing.