Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[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 curl http://kernel.org/pub/software/scm/git/git-(latest version).tar.gz -O
9
10 tar xzvf git-(latest version).tar.gz
11
12 cd git-(latest version)
13
14 ./configure --prefix=/usr/local
15
16 NO_MSGFMT=yes make prefix=/usr/local all
17
18 sudo make install
19
20
21 git config --global user.name "firstname lastname" 
22
23 git config --global user.email "email here"
24
25 git config --global color.ui "auto" 
26
27
28 curl http://www.kernel.org/pub/software/scm/git/git-manpages-1.7.3.1.tar.gz | sudo tar -xzC /opt/local/share/man/
29
30
31 ## installing ikiwiki:
32 I had terrible trouble installing ikiwiki. It turned out I had accidentally installed Perl through ports. Uninstalling that made everything install nicely.
33
34 I like to install test software in /opt. No particular reason. You could install to defaults.
35
36
37 perl Makefile.PL PREFIX=/Library/Perl/5.10.0 LIB=/Library/Perl/5.10.0
38
39 perl Makefile.PL  LIB=/Library/Perl/5.10.0
40
41 make
42
43 make install
44
45 sudo install -d /opt/ikiwiki
46
47 sudo install -m 0644 wikilist /opt/ikiwiki
48
49 sudo install -m 0644 auto.setup /opt/ikiwiki
50
51 sudo install -m 0644 auto-blog.setup /opt/ikiwiki
52
53
54 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.
55
56
57 ## using git from inside a git folder:
58
59 start with git clone, then learn to do the git dance like this.
60
61 git pull
62
63 make your changes to your clone
64
65 git commit -a -m "message here"
66
67 git push
68
69
70 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.
71
72 ## installing gitweb
73
74 make GITWEB_PROJECTROOT="/opt/ikiwiki/" GITWEB_CSS="/gitweb/gitweb.css" GITWEB_LOGO="/gitweb/git-logo.png" GITWEB_FAVICON="/gitweb/git-favicon.png" bindir=/opt/local/bin
75
76 cp gitweb.cgi /Library/WebServer/CGI-Executables/gitweb/
77
78 sudo chmod 2755 gitweb.cgi
79
80
81 ## installing xapian:
82
83 download xapian and omega
84
85 I needed pcre: sudo ports install pcre
86
87 ./configure
88
89 make
90
91 sudo make install
92
93
94 ## installing omega:
95
96 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.
97
98 ./configure
99
100 make
101
102 sudo make install
103
104
105 ## installing Search::Xapian from CPAN
106
107 for some reason this wouldn't install using CPAN console so I went to CPAN online and downloaded the source.
108
109 perl Makefile.PL
110
111 make
112
113 make test
114
115 sudo make install
116
117 it installed without issue so I'm baffled why it didn't install from command line.
118
119
120
121 ## turning on search plugin:
122
123 I turned on the plugin from the setup page in ikiwiki but it gave an error when I went to search. Error "blah blah cgi-bin/omega/omega" does not exist or some such. I did a 
124
125 find / -name "omega" -print
126
127 and found the omega program in 
128
129 /usr/local/lib/xapian-omega/bin/omega. 
130
131 Then I went into the setup file and replaced the bad path, updated and badda-boom badda-bing.
132
133
134 Then I fell asleep.