« December 2009
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today
XML

Neat blogs

Navigation

Editing

Powered by Roller Weblogger.

statcounter.com

clustrmaps.com

Locations of visitors to this page

technorati.com

20071217 Monday December 17, 2007
Installing a wiki on my Mac Mini and Leopard

I wanted a wiki on my Mac Mini - why? I forget. I found that Installing Wikka Wiki on Mac OS X seemed to be popular. And it doesn't take into account Leopard.

The docs mainly work. The first thing you need to do when installing php is make the change to uncomment this:

stealth:apache2 tdh$ pwd
/private/etc/apache2
stealth:apache2 tdh$ grep php httpd.conf 
LoadModule php5_module        libexec/apache2/libphp5.so

I'm using a Terminal shell.

And before you can start viewing private web pages, you need to not only turn on 'System Preferences' -> 'Sharing' -> 'Web Sharing', you need to add the following:

stealth:users tdh$ pwd
/private/etc/apache2/users
stealth:users tdh$ more local.conf 
#
# Allow access to all users' Sites directory for web clients.
#
<Directory "/Users/*/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Okay, you need to restart apache!

stealth:sbin tdh$ sudo apachectl restart
stealth:sbin tdh$ 

And when you install MySQL, you need to create a db and some permissions:

stealth:sbin tdh$ sudo mysql -u root -p 
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45 MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> 

Note that you can do a 'sudo w' before this to make sure you have a cached password for 'sudo'. The password you want to give here is the one for the 'root' account in the database.

Create a database and an admin:

mysql> create database wakki;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON wakki.* to 'wakki'@'localhost'
    -> IDENTIFIED BY 'change_me' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON wakki.* to 'wakki'@'%'
    -> IDENTIFIED BY 'change_me' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> exit;
Bye
stealth:sbin tdh$ 

Note, I am not a MySQL expert or even a database expert. I just adapted what I found at 5.5.2. Adding New User Accounts to MySQL.

Okay, now try to load the webpage for the configuration. It will ask you questions and eventually when you tell it to Connect, it will tell you it was not able to verify the connection. The issue is that the stock php from Apple does not communicate in the same place as the MySQL. You can configure this as:

stealth:etc tdh$ diff php.ini.default php.ini
760c760
< mysql.default_socket =
---
> mysql.default_socket = /tmp/mysql.sock

And then restart apache.

Note, I had to reboot. I don't know what wasn't reloading, it may have been the difference between '/private/tmp' and '/private':

stealth:etc tdh$ ls -la /tmp/mysql.sock 
srwxrwxrwx  1 _mysql  wheel  0 Dec 17 22:51 /tmp/mysql.sock
stealth:etc tdh$ ls -la /private/tmp/mysql.sock 
srwxrwxrwx  1 _mysql  wheel  0 Dec 17 22:51 /private/tmp/mysql.sock

I guess that change should really be to '/private/tmp/mysql.sock'.

Oh, and the form loaded correctly now.


Originally posted on Kool Aid Served Daily
Copyright (C) 2007, Kool Aid Served Daily

Trackback URL: http://blogs.sun.com/tdh/entry/installing_a_wiki_on_my
Comments:

Not sure what your goals are, but have you checked out VoodooPad ?

Posted by John on December 18, 2007 at 04:16 AM CST #

Goals are not to pay anything for it and to learn more about OS X.

I use a wiki at work and I want a local scratchpad to try things out.

Posted by Tom Haynes on December 18, 2007 at 08:48 AM CST #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed