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