User Tools

Site Tools


build:wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
build:wiki [2009/03/04 17:45]
151.145.238.92 Major and minor fix-ups to upgrade process. (CMB)
build:wiki [2011/01/12 16:39] (current)
SLUUG Administration Upgrade to DokuWiki 2010-11-07. (CMB)
Line 1: Line 1:
 ====== DokuWiki ====== ====== DokuWiki ======
  
-These instructions detail how to install [[http://​wiki.splitbrain.org/​wiki:​dokuwiki | DokuWiki]] on our Debian GNU/Linux system. We're currently running the 2009-02-14 version of DokuWiki.+These instructions detail how to install [[http://​wiki.splitbrain.org/​wiki:​dokuwiki | DokuWiki]] on our Debian GNU/Linux system. We're currently running the 2010-11-07 version of DokuWiki.
  
 ===== Requirements ===== ===== Requirements =====
Line 121: Line 121:
 ===== Upgrading ===== ===== Upgrading =====
  
-Here are the steps taken to upgrade to version ​2009-02-14.+Here are the steps taken to upgrade to version ​2010-11-07.
  
 First, read the [[http://​www.dokuwiki.org/​changes | changes made in the new release]]. Make sure you follow any directions specific to the new release. First, read the [[http://​www.dokuwiki.org/​changes | changes made in the new release]]. Make sure you follow any directions specific to the new release.
Line 128: Line 128:
 <code bash> <code bash>
 cd /​home/​web/​wiki.sluug.org cd /​home/​web/​wiki.sluug.org
-export OLD_VERSION=2008-05-05 +export OLD_VERSION=2009-12-25 
-tar cfz /​var/​backups/​web/​wiki.sluug.org.BACKUP-`date +%Y%m%d`.tgz dokuwiki-$OLD_VERSION+sudo tar cfz /​var/​backups/​web/​wiki.sluug.org.BACKUP-`date +%Y%m%d`.tgz dokuwiki-$OLD_VERSION
 </​code>​ </​code>​
  
Line 135: Line 135:
 <code bash> <code bash>
 cd /​home/​web/​wiki.sluug.org cd /​home/​web/​wiki.sluug.org
-export VERSION=2009-02-14+export VERSION=2010-11-07
 wget http://​www.splitbrain.org/​_media/​projects/​dokuwiki/​dokuwiki-$VERSION.tgz wget http://​www.splitbrain.org/​_media/​projects/​dokuwiki/​dokuwiki-$VERSION.tgz
 tar xfz dokuwiki-$VERSION.tgz tar xfz dokuwiki-$VERSION.tgz
Line 158: Line 158:
 Delete the old cache and index, since they can be regenerated,​ and the formats may have changed between versions. We can also use the new help pages (in the wiki namespace), so we can delete them from the old site. Delete the old cache and index, since they can be regenerated,​ and the formats may have changed between versions. We can also use the new help pages (in the wiki namespace), so we can delete them from the old site.
 <code bash> <code bash>
-rm dokuwiki-$OLD_VERSION/​data/​cache/​* -rf +sudo rm dokuwiki-$OLD_VERSION/​data/​cache/​* -rf 
-rm dokuwiki-$OLD_VERSION/​data/​index/​* -rf +sudo rm dokuwiki-$OLD_VERSION/​data/​index/​* -rf 
-rm dokuwiki-$OLD_VERSION/​data/​pages/​wiki -rf+sudo rm dokuwiki-$OLD_VERSION/​data/​pages/​wiki -rf
 </​code>​ </​code>​
  
Line 170: Line 170:
 </​code>​ </​code>​
  
-It installed a new ''​entities.conf'',​ so get rid of it again.+Get rid of the files that we don't need.
 <code bash> <code bash>
-mv dokuwiki-$VERSION/​conf/​entities.conf dokuwiki-$VERSION/​conf/​entities.conf.out+mv dokuwiki-$VERSION/​conf/​entities.conf dokuwiki-$VERSION/​conf/​entities.conf.dist 
 +rm dokuwiki-$VERSION/​{install,​index}.php
 </​code>​ </​code>​
  
Line 203: Line 204:
 Once you're comfortable that the upgrade went OK, you can delete the directory for the previous version of DokuWiki. Once you're comfortable that the upgrade went OK, you can delete the directory for the previous version of DokuWiki.
  
-===== TODO: Enable ACLs and User Accounts =====+<code bash> 
 +rm -rf dokuwiki-$OLD_VERSION 
 +</​code>​
  
-Create the conf/users.auth file: +===== Enable ACLs and User Accounts ===== 
-<​code ​rootshell+==== This is a minimal implementation with a single account ==== 
-touch conf/users.auth +=== The sole purpose is to reduce defacement and overhead from recovery=== 
-chown www-data:​www-data conf/users.auth + 
-chmod 440 conf/users.auth+Go to the DokuWiki configuration directory 
 +<​code>​ 
 +cd /home/​web/​wiki.sluug.org/​public/conf
 </​code>​ </​code>​
  
-Add an admin account in the file (replace $WIKI_ADMIN_PWD with real password): +Install ​the skeleton authorization files 
-  # echo "​admin:​`echo ​-n '​$WIKI_ADMIN_PWD'​ | md5sum | awk '​{print $1;​}'​`:​Administrator:​webmaster@sluug.org:​admin,​users"​ >> conf/users.auth+<​code>​ 
 +cp -ip users.auth.php.dist ​users.auth.php 
 +cp -ip acl.auth.php.dist acl.auth.php 
 +</​code>​
  
-Create the conf/​acl.auth ​file: +Create ​a backup of the main config ​file 
-<​code ​rootshell+<​code>​ 
-cp conf/acl.auth.dist conf/​acl.auth +cp -ip local.php local.php.090219
-chown www-data:​www-data conf/​acl.auth +
-chmod 440 conf/acl.auth+
 </​code>​ </​code>​
  
-Edit the conf/acl.auth file to look something look this+Edit local.php using your favorite editor ​to uncomment the useacl line
-<​code ​configfile+<​code>​ 
-*               ​@admin ​ 255 +$conf['​useacl'​] ​      ​1;        // Enable Access Control List authorization
-*               ​@ALL ​   7 +
-private:​* ​      ​@admin ​ 255 +
-private:​* ​      ​@ALL ​   0 +
-readonly:​* ​     @admin ​ 255 +
-readonly:​* ​     @ALL    ​1+
 </​code>​ </​code>​
  
 +Create a new account using your web browser:
 +
 +  - Point the web browser at http://​wiki.sluug.org/​
 +  - Select the "​Login"​ button at the bottom of the page.
 +  - Select the "​Register"​ link.
 +  - Fill in
 +    - Username: ​ discuss
 +    - Real name: SLUUG Administration
 +    - E-mail: ​   (your e-mail address)
 +  - Select the "​Register"​ button. ​ You should end up at the login page again.
 +  - Read the mail sent to you and login using the generated password.
 +  - At the bottom of the page, select the "​Update Profile"​ button.
 +  - Change these fields:
 +    - E-mail: ​       root@mail.sluug.org
 +    - New passsword: (The password for the discuss mailing list archive)
 +  - Select the "​Save"​ button.
 +
 +Edit local.php using your favorite editor to add this line:
 +<​code>​
 +$conf['​disableactions'​] = '​register'; ​  // Users can't register themselves
 +</​code>​
 +
 +Test security using your web browser:
 +
 +  - Select the "​Logout"​ button.
 +  - Tried editing a page without being logged in, but it let me.
 +  - Tried editing a page after closing and restarting the browser, but it let me.
 +
 +Edit acl.auth.php using your favorite editor to:
 +
 +  - Change the authority of the "​ALL"​ group from "​8"​ to "​1"​.
 +  - Create a new line in the same format, giving user "​discuss"​ "​16"​ level authority.
 +<​code>​
 +*               ​discuss ​   16
 +</​code>​
 +
 +An attempt to edit the same page (still displayed from the earlier test)
 +still displays the source, but now says that update is not allowed.
 +Refreshing the page, it no longer has the "​Edit"​ buttons.
 +
 +Test for an authenticated user:
 +
 +  - Use the "​Login"​ button, enter the username and password from above.
 +  - The Edit buttons are now displayed and able to update this page.
 +
 +For more information,​ see the
 +[[http://​wiki.splitbrain.org/​wiki:​acl | ACL documentation]].
  
 ===== TODO ===== ===== TODO =====
  
 Copy the files in /​var/​backups off the server. Delete older versions, or at least create a subdirectory structure. Copy the files in /​var/​backups off the server. Delete older versions, or at least create a subdirectory structure.
- 
-Accounts/​ACLs. [[http://​wiki.splitbrain.org/​wiki:​acl | See documentation]]. Set admin'​s password. 
  
 Turn on wordblock to ban edits with certain words (to prevent spamming and profanity)? Turn on wordblock to ban edits with certain words (to prevent spamming and profanity)?
Line 255: Line 301:
 ===== Credits ===== ===== Credits =====
  
-Initially installed, configured, and documented by Craig Buchek, 2005-09-10. Updated to newer versions on 2005-11-26, 2007-05-09, 2008-06-11, ​and 2009-02-19.+Initially installed, configured, and documented by Craig Buchek, 2005-09-10. 
 + 
 +Updated to newer versions on 2005-11-26, 2007-05-09, 2008-06-11, 2009-02-19, 2010-01-08.
build/wiki.1236210320.txt.gz · Last modified: 2009/03/04 17:45 by 151.145.238.92