]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/tips/ikiwiki_on_mac_os_x.mdwn
a4c693e7519b438386890b9fe3dfbe41ec8c0487
[git.ikiwiki.info.git] / doc / tips / ikiwiki_on_mac_os_x.mdwn
1 [[!toc]]
3 # MacPorts
5 The easiest way of installing ikiwiki on Mac OS X [Snow] Leopard and Tiger is via MacPorts: <http://www.macports.org/>
7 This project ports Open Source software into Mac Os X platform.
8 It's very easy to intall ikiwiki via MacPorts:
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
14 2.- Run 
16     $ sudo port install ikiwiki
18 This installs ikiwiki and all of its dependencies
20 enjoy
22 Enrique Castilla
24 -----
26 # pkgsrc
28 The other easiest way of installing ikiwiki on Mac OS X is via
29 [pkgsrc](http://www.pkgsrc.org/).
31 7. Bootstrap pkgsrc.
32 7. Run
34     $ cd .../pkgsrc/www/ikiwiki && make install clean
36 -----
38 # Manual install
40 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. 
42 The best part of installing ikiwiki was learning how to use git. I never used source control before but its pretty slick.
45 ## installing git:
47 cd /opt/ikiwiki/install
49 curl http://kernel.org/pub/software/scm/git/git-(latest version).tar.gz -O
51 tar xzvf git-(latest version).tar.gz
53 cd git-(latest version)
55 ./configure --prefix=/usr/local 
57 make prefix=/usr/local all
59 sudo make install
62 git config --global user.name "firstname lastname" 
64 git config --global user.email "email here"
66 git config --global color.ui "auto" 
69 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 ## installing ikiwiki:
73 I had terrible trouble installing ikiwiki. It turned out I had accidentally installed Perl through ports. Uninstalling that made everything install nicely.
74 I got an error on msgfmt. Turns out this is a program in gettext. I installed that and it fixed the error.
76 cd ..
78 git clone git://git.ikiwiki.info/
80 cd git.ikiwiki.info/
82 perl Makefile.PL  LIB=/Library/Perl/5.10.0
84 make
86 sudo make install
88 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 ## using git from inside a git folder:
93 start with git clone, then learn to do the git dance like this.
95 git pull
97 make your changes to your clone
99 git commit -a -m "message here"
101 git push
104 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.
106 ## installing gitweb
108 cd ../git-1.7.3.1/gitweb
110 make GITWEB_PROJECTROOT="/opt/ikiwiki/" GITWEB_CSS="/gitweb.css" GITWEB_LOGO="/git-logo.png" GITWEB_FAVICON="/git-favicon.png" GITWEB_JS="/gitweb.js"
112 cp gitweb.cgi /Library/WebServer/CGI-Executables/
114 cp /usr/local/share/gitweb/static/git-favicon.png /Library/WebServer/Documents/
116 cp /usr/local/share/gitweb/static/git-logo.png /Library/WebServer/Documents/
118 cp /usr/local/share/gitweb/static/gitweb.css /Library/WebServer/Documents/
120 cp /usr/local/share/gitweb/static/gitweb.js /Library/WebServer/Documents/
123 sudo chmod 2755 /Library/WebServer/CGI-Executables/gitweb.cgi
125 sudo chmod 2755 /Library/WebServer/Documents/git-favicon.png
127 sudo chmod 2755 /Library/WebServer/Documents/git-logo.png
129 sudo chmod 2755 /Library/WebServer/Documents/gitweb.css
131 sudo chmod 2755 /Library/WebServer/Documents/gitweb.js
134 ## installing xapian:
136 download xapian and omega
138 I needed pcre: sudo ports install pcre
140 ./configure
142 make
144 sudo make install
147 ## installing omega:
149 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.
151 ./configure
153 make
155 sudo make install
158 ## installing Search::Xapian from CPAN
160 for some reason this wouldn't install using CPAN console so I went to CPAN online and downloaded the source.
162 perl Makefile.PL
164 make
166 make test
168 sudo make install
170 it installed without issue so I'm baffled why it didn't install from command line.
172  
173  ## setup file
174     _!/usr/bin/perl
175     _ Ikiwiki setup automator.
176     
177     _ This setup file causes ikiwiki to create a wiki, check it into revision
178     _ control, generate a setup file for the new wiki, and set everything up.
179     
180     _ Just run: ikiwiki -setup /etc/ikiwiki/auto.setup
181     
182     _By default, it asks a few questions, and confines itself to the user's home
183     _directory. You can edit it to change what it asks questions about, or to
184     _modify the values to use site-specific settings.
185     require IkiWiki::Setup::Automator;
186     
187     our $wikiname="your wiki";
188     our $wikiname_short="yourwiki";
189     our $rcs="git";
190     our $admin="your name";
191     use Net::Domain q{hostfqdn};
192     our $domain="your.domain";                    
193     
194     IkiWiki::Setup::Automator->import(
195     wikiname => $wikiname,
196     adminuser => [$admin],
197     rcs => $rcs,
198     srcdir => "/opt/ikiwiki/$wikiname_short",
199     destdir => "/Library/WebServer/Documents/$wikiname_short",
200     repository => "/opt/ikiwiki/$wikiname_short.".($rcs eq "monotone" ? "mtn" : $rcs),
201     dumpsetup => "/opt/ikiwiki/$wikiname_short.setup",
202     url => "http://$domain/$wikiname_short",
203     cgiurl => "http://$domain/cgi-bin/$wikiname_short/ikiwiki.cgi",
204     cgi_wrapper => "/Library/WebServer/CGI-Executables/$wikiname_short/ikiwiki.cgi",
205     adminemail => "your\@email.com",
206     add_plugins => [qw{goodstuff websetup}],
207     disable_plugins => [qw{}],
208     libdir => "/opt/ikiwiki/.ikiwiki",
209     rss => 1,
210     atom => 1,
211     syslog => 1,
212     )
213  
215 ## turning on search plugin:
217 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".
218 I did a  "find / -name "omega" -print" and found the omega program in "/usr/local/lib/xapian-omega/bin/omega".
220 Then I went into the 2wiki.setup file and replaced the bad path, updated and badda-boom badda-bing.