]> sipb.mit.edu Git - ikiwiki.git/blob - doc/tips/ikiwiki_on_Mac_OS_X_Snow_Leopard.mdwn
aa89c4f55e2dfb0b6912083e92a2e75b9dd4e884
[ikiwiki.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. 
2
3 The best part of installing ikiwiki was learning how to use git. I never used source control before but its pretty slick.
4
5
6 ## installing git:
7
8 cd /opt/ikiwiki/install
9
10 curl http://kernel.org/pub/software/scm/git/git-(latest version).tar.gz -O
11
12 tar xzvf git-(latest version).tar.gz
13
14 cd git-(latest version)
15
16 ./configure --prefix=/usr/local 
17
18 make prefix=/usr/local all
19
20 sudo make install
21
22
23 git config --global user.name "firstname lastname" 
24
25 git config --global user.email "email here"
26
27 git config --global color.ui "auto" 
28
29
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/
31
32
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.
36
37 git clone git://git.ikiwiki.info/
38
39 perl Makefile.PL  LIB=/Library/Perl/5.10.0
40
41 make
42
43 sudo make install
44
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.
46
47
48 ## using git from inside a git folder:
49
50 start with git clone, then learn to do the git dance like this.
51
52 git pull
53
54 make your changes to your clone
55
56 git commit -a -m "message here"
57
58 git push
59
60
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.
62
63 ## installing gitweb
64
65 cd gitweb
66
67 make GITWEB_PROJECTROOT="/opt/ikiwiki/" GITWEB_CSS="/gitweb.css" GITWEB_LOGO="/git-logo.png" GITWEB_FAVICON="/git-favicon.png" 
68
69 cp gitweb.cgi /Library/WebServer/CGI-Executables/
70
71 cp /usr/local/share/gitweb/static/git-favicon.png /Library/WebServer/Documents/
72
73 cp /usr/local/share/gitweb/static/git-logo.png /Library/WebServer/Documents/
74
75 cp /usr/local/share/gitweb/static/gitweb.css /Library/WebServer/Documents/
76
77 cp /usr/local/share/gitweb/static/gitweb.js /Library/WebServer/Documents/
78
79
80 sudo chmod 2755 /Library/WebServer/CGI-Executables/gitweb.cgi
81
82 sudo chmod 2755 /Library/WebServer/Documents/git-favicon.png
83
84 sudo chmod 2755 /Library/WebServer/Documents/git-logo.png
85
86 sudo chmod 2755 /Library/WebServer/Documents/gitweb.css
87
88 sudo chmod 2755 /Library/WebServer/Documents/gitweb.js
89
90
91 ## installing xapian:
92
93 download xapian and omega
94
95 I needed pcre: sudo ports install pcre
96
97 ./configure
98
99 make
100
101 sudo make install
102
103
104 ## installing omega:
105
106 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.
107
108 ./configure
109
110 make
111
112 sudo make install
113
114
115 ## installing Search::Xapian from CPAN
116
117 for some reason this wouldn't install using CPAN console so I went to CPAN online and downloaded the source.
118
119 perl Makefile.PL
120
121 make
122
123 make test
124
125 sudo make install
126
127 it installed without issue so I'm baffled why it didn't install from command line.
128
129  
130  ## setup file
131     _!/usr/bin/perl
132     _ Ikiwiki setup automator.
133     
134     _ This setup file causes ikiwiki to create a wiki, check it into revision
135     _ control, generate a setup file for the new wiki, and set everything up.
136     
137     _ Just run: ikiwiki -setup /etc/ikiwiki/auto.setup
138     
139     _By default, it asks a few questions, and confines itself to the user's home
140     _directory. You can edit it to change what it asks questions about, or to
141     _modify the values to use site-specific settings.
142     require IkiWiki::Setup::Automator;
143     
144     our $wikiname="your wiki";
145     our $wikiname_short="yourwiki";
146     our $rcs="git";
147     our $admin="your name";
148     use Net::Domain q{hostfqdn};
149     our $domain="your.domain";                    
150     
151     IkiWiki::Setup::Automator->import(
152     wikiname => $wikiname,
153     adminuser => [$admin],
154     rcs => $rcs,
155     srcdir => "/opt/ikiwiki/$wikiname_short",
156     destdir => "/Library/WebServer/Documents/$wikiname_short",
157     repository => "/opt/ikiwiki/$wikiname_short.".($rcs eq "monotone" ? "mtn" : $rcs),
158     dumpsetup => "/opt/ikiwiki/$wikiname_short.setup",
159     url => "http://$domain/$wikiname_short",
160     cgiurl => "http://$domain/cgi-bin/$wikiname_short/ikiwiki.cgi",
161     cgi_wrapper => "/Library/WebServer/CGI-Executables/$wikiname_short/ikiwiki.cgi",
162     adminemail => "your\@email.com",
163     add_plugins => [qw{goodstuff websetup}],
164     disable_plugins => [qw{}],
165     libdir => "/opt/ikiwiki/.ikiwiki",
166     rss => 1,
167     atom => 1,
168     syslog => 1,
169     )
170  
171
172 ## turning on search plugin:
173
174 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 
175
176 find / -name "omega" -print
177
178 and found the omega program in 
179
180 /usr/local/lib/xapian-omega/bin/omega. 
181
182 Then I went into the setup file and replaced the bad path, updated and badda-boom badda-bing.
183
184
185