]> sipb.mit.edu Git - ikiwiki.git/blob - doc/tips/ikiwiki_on_mac_os_x.mdwn
prep release
[ikiwiki.git] / doc / tips / ikiwiki_on_mac_os_x.mdwn
1 [[!toc]]
2
3 # pkgsrc
4
5 The easiest way of installing an up-to-date ikiwiki on any version of Mac OS X is via
6 [pkgsrc](http://www.pkgsrc.org/).
7
8 ## From source:
9
10 7. [Bootstrap pkgsrc](http://www.netbsd.org/docs/pkgsrc/platforms.html#bootstrapping-pkgsrc)
11 7. Run `cd .../pkgsrc/www/ikiwiki && make install clean`
12
13 ## From binary packages:
14
15 7. [install binary packages (OSX)](http://www.pkgsrc.org/#index1h1)
16
17 {OK} As of 2014/03/19, the [version of ikiwiki in pkgsrc](http://pkgsrc.se/www/ikiwiki) is 3.20140227.
18
19 -----
20
21 # MacPorts
22
23 Another way to install ikiwiki on Mac OS X [Snow] Leopard and Tiger is via MacPorts: <http://www.macports.org/>
24
25 This project ports Open Source software into Mac OS X platform.
26 It's very easy to install ikiwiki via MacPorts:
27
28 1.- Donwnload and install MacPorts port manager from:  <http://www.macports.org/install.php> . 
29     Port manager installs via Mac OS X installer. Prerequisite: XCode.
30     Se above URL for details
31
32 2.- Run 
33
34     $ sudo port install ikiwiki
35
36 This installs ikiwiki and all of its dependencies
37
38 enjoy
39
40 Enrique Castilla
41
42 [!] As of 2014/03/19, the [version of ikiwiki in MacPorts](http://www.macports.org/ports.php?by=name&substr=Ikiwiki) is 3.20110608.
43
44 -----
45
46 # Manual install
47
48 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. 
49
50 The best part of installing ikiwiki was learning how to use git. I never used source control before but its pretty slick.
51
52
53 ## installing git:
54
55 cd /opt/ikiwiki/install
56
57 curl http://kernel.org/pub/software/scm/git/git-(latest version).tar.gz -O
58
59 tar xzvf git-(latest version).tar.gz
60
61 cd git-(latest version)
62
63 ./configure --prefix=/usr/local 
64
65 make prefix=/usr/local all
66
67 sudo make install
68
69
70 git config --global user.name "firstname lastname" 
71
72 git config --global user.email "email here"
73
74 git config --global color.ui "auto" 
75
76
77 curl http://www.kernel.org/pub/software/scm/git/git-manpages-1.7.3.1.tar.gz | sudo tar -xzC /usr/local/share/man/
78
79
80 ## installing ikiwiki:
81 I had terrible trouble installing ikiwiki. It turned out I had accidentally installed Perl through ports. Uninstalling that made everything install nicely.
82 I got an error on msgfmt. Turns out this is a program in gettext. I installed that and it fixed the error.
83
84 cd ..
85
86 git clone git://git.ikiwiki.info/
87
88 cd git.ikiwiki.info/
89
90 perl Makefile.PL  LIB=/Library/Perl/5.10.0
91
92 make
93
94 sudo make install
95
96 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.
97
98
99 ## using git from inside a git folder:
100
101 start with git clone, then learn to do the git dance like this.
102
103 git pull
104
105 make your changes to your clone
106
107 git commit -a -m "message here"
108
109 git push
110
111
112 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.
113
114 ## installing gitweb
115
116 cd ../git-1.7.3.1/gitweb
117
118 make GITWEB_PROJECTROOT="/opt/ikiwiki/" GITWEB_CSS="/gitweb.css" GITWEB_LOGO="/git-logo.png" GITWEB_FAVICON="/git-favicon.png" GITWEB_JS="/gitweb.js"
119
120 cp gitweb.cgi /Library/WebServer/CGI-Executables/
121
122 cp /usr/local/share/gitweb/static/git-favicon.png /Library/WebServer/Documents/
123
124 cp /usr/local/share/gitweb/static/git-logo.png /Library/WebServer/Documents/
125
126 cp /usr/local/share/gitweb/static/gitweb.css /Library/WebServer/Documents/
127
128 cp /usr/local/share/gitweb/static/gitweb.js /Library/WebServer/Documents/
129
130
131 sudo chmod 2755 /Library/WebServer/CGI-Executables/gitweb.cgi
132
133 sudo chmod 2755 /Library/WebServer/Documents/git-favicon.png
134
135 sudo chmod 2755 /Library/WebServer/Documents/git-logo.png
136
137 sudo chmod 2755 /Library/WebServer/Documents/gitweb.css
138
139 sudo chmod 2755 /Library/WebServer/Documents/gitweb.js
140
141
142 ## installing xapian:
143
144 download xapian and omega
145
146 I needed pcre: sudo ports install pcre
147
148 ./configure
149
150 make
151
152 sudo make install
153
154
155 ## installing omega:
156
157 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.
158
159 ./configure
160
161 make
162
163 sudo make install
164
165
166 ## installing Search::Xapian from CPAN
167
168 for some reason this wouldn't install using CPAN console so I went to CPAN online and downloaded the source.
169
170 perl Makefile.PL
171
172 make
173
174 make test
175
176 sudo make install
177
178 it installed without issue so I'm baffled why it didn't install from command line.
179
180  
181  ## setup file
182     _!/usr/bin/perl
183     _ Ikiwiki setup automator.
184     
185     _ This setup file causes ikiwiki to create a wiki, check it into revision
186     _ control, generate a setup file for the new wiki, and set everything up.
187     
188     _ Just run: ikiwiki -setup /etc/ikiwiki/auto.setup
189     
190     _By default, it asks a few questions, and confines itself to the user's home
191     _directory. You can edit it to change what it asks questions about, or to
192     _modify the values to use site-specific settings.
193     require IkiWiki::Setup::Automator;
194     
195     our $wikiname="your wiki";
196     our $wikiname_short="yourwiki";
197     our $rcs="git";
198     our $admin="your name";
199     use Net::Domain q{hostfqdn};
200     our $domain="your.domain";                    
201     
202     IkiWiki::Setup::Automator->import(
203     wikiname => $wikiname,
204     adminuser => [$admin],
205     rcs => $rcs,
206     srcdir => "/opt/ikiwiki/$wikiname_short",
207     destdir => "/Library/WebServer/Documents/$wikiname_short",
208     repository => "/opt/ikiwiki/$wikiname_short.".($rcs eq "monotone" ? "mtn" : $rcs),
209     dumpsetup => "/opt/ikiwiki/$wikiname_short.setup",
210     url => "http://$domain/$wikiname_short",
211     cgiurl => "http://$domain/cgi-bin/$wikiname_short/ikiwiki.cgi",
212     cgi_wrapper => "/Library/WebServer/CGI-Executables/$wikiname_short/ikiwiki.cgi",
213     adminemail => "your\@email.com",
214     add_plugins => [qw{goodstuff websetup}],
215     disable_plugins => [qw{}],
216     libdir => "/opt/ikiwiki/.ikiwiki",
217     rss => 1,
218     atom => 1,
219     syslog => 1,
220     )
221  
222
223 ## turning on search plugin:
224
225 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".
226 I did a  "find / -name "omega" -print" and found the omega program in "/usr/local/lib/xapian-omega/bin/omega".
227
228 Then I went into the 2wiki.setup file and replaced the bad path, updated and badda-boom badda-bing.