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