Quick notes for DokuWiki

Notes from tonight’s playing with DokuWiki. Initially saved it as a text file, then thought, what the hell, it might benefit somebody.

1. Got DokuWiki. Learned this from my buddy Baron, who I admire and whose recommendations I take seriously.

2. Fired up ami-23b6534a, an Amazon virtual instance with Apache pre-configured.
/var/www/html is the web root directory, fairly common.
use this code snippet to find out user and group that Apache httpd runs under:
[sourcecode language=”php”]
< ?php if(function_exists('posix_geteuid')){ // use posix to get current uid and gid $uid = posix_geteuid(); $usr = posix_getpwuid($uid); $user = $usr['name']; $gid = posix_getegid(); $grp = posix_getgrgid($gid); $group = $grp['name']; }else{ // try to create a file and read it's ids $tmp = tempnam ('/tmp', 'check'); $uid = fileowner($tmp); $gid = filegroup($tmp); // try to run ls on it $out = `ls -l $tmp`; $lst = explode(' ',$out); $user = $lst[2]; $group = $lst[3]; unlink($tmp); } echo "Your PHP process seems to run with the UID $uid ($user) and the GID $gid ($group)\n"; ?>
Or phpinfo, which is a bit too much data.

3. Downloaded DokuWiki and expanded it, and put it under the web root directory.

4. Permission stuff.

chmod 775 conf/
chgrp apache conf/
chgrp apache data/
chmod 775 data/
chmod 775 data/pages/
chgrp apache data/pages/
chmod 775 data/attic/
chgrp apache data/attic/
chgrp apache data/media/
chmod 775 data/media/
chmod 775 data/meta/
chgrp apache data/meta/
chgrp apache data/cache/
chmod 775 data/cache/
chmod 775 data/locks/
chgrp apache data/locks/
chgrp apache data/index/
chmod 775 data/index/
chmod 775 data/tmp/
chgrp apache data/tmp/
mv data /home/myname/
modify conf/local.php to include this line:
$conf[‘savedir’] = ‘/home/myname/data/’;
mv conf /home/myname/
add preload.php under /var/www/html/inc with this content:

, ,

One response to “Quick notes for DokuWiki”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.