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