This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorials:dokuwiki [2011/09/12 23:13] razvan [User Requirements] |
tutorials:dokuwiki [2013/06/30 22:06] 5.39.219.26 ktbxrcyd |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | = DokuWiki Installation and Configuration = | + | qbisctxbsn/dt/qvc/sp, <a href=" |
- | + | ||
- | [[http://www.dokuwiki.org/dokuwiki|DokuWiki]] is one of the [[http:// | + | |
- | * it is file-based (no database required); | + | |
- | * installation and configuration is a breeze, especially for a manual installation (grabbing the source code, unzip and configure); | + | |
- | * it uses a namespace-based structure, allowing for easy organization of information; | + | |
- | * its community develops a lot of useful [[http:// | + | |
- | * it is, in my opinion, very usable: the interface, the editing features, information organization, | + | |
- | + | ||
- | That being said, let's move on to the requirements and installation steps. | + | |
- | == User Requirements == | + | |
- | + | ||
- | DokuWiki is highly configurable and customizable and I'm going to define the features that are to be used by a wiki installation. These are the features I'm usually going for when doing a DokuWiki installation, | + | |
- | * The wiki is to be installed by a non-priviliged users using their own "user directory" | + | |
- | * The wiki is public: everyone can read its contents and only certain users may edit it, after logging in (through the use of ACLs). | + | |
- | * Create index pages for easy access to information. This is achieved with the help of the [[http://www.dokuwiki.org/plugin: | + | |
- | * The wiki will use "pretty" | + | |
- | * The wiki will enable [[http:// | + | |
- | * The wiki will define a {{{contrib}}} namespace that is world-writable. | + | |
- | * The wiki will define an {{{internal}}} namespace that is readable/ | + | |
- | * The wiki enables HTTPS-access to login/ | + | |
- | * The wiki enables LDAP authentication (optional - one must have access to a LDAP service). | + | |
- | + | ||
- | = Install and Upgrade Scripts = | + | |
- | + | ||
- | * Mircea Bardac and me have created a set of scripts for installation, | + | |
- | * Issue the following command to get a copy of the repository< | + | |
- | git clone http:// | + | |
- | </code> | + | |
- | * Browse to the {{{dokuwiki/ | + | |
- | == Basic Installation and Configuration == | + | |
- | + | ||
- | + | ||
- | === Using the Install Scripts === | + | |
- | + | ||
- | These instructions are also present in the {{{README}}} file in the {{{dokuwiki/ | + | |
- | + | ||
- | # Find the desired DokuWiki version for download. Use this [[http:// | + | |
- | # Run the install {{{install_dokuwiki}}} script. It requires three arguments: | + | |
- | ## the installation folder for {{{dokuwiki}}}; | + | |
- | ## the DokuWiki tarball download URL; ({{{http:// | + | |
- | ## the future DokuWiki URL. ({{{http:// | + | |
- | #* Sample run:< | + | |
- | so@elf: | + | |
- | * Using download link http:// | + | |
- | * Downloading DokuWiki ... done. | + | |
- | * Preparing installation folder / | + | |
- | * Installing plugins | + | |
- | * Installing plugin: Creole ... done. | + | |
- | * Installing plugin: Google Analytics ... done. | + | |
- | * Installing plugin: Include ... done. | + | |
- | * Installing plugin: Index-Menu ... done. | + | |
- | * Installing plugin: Display-Wiki-Page ...done. | + | |
- | + | ||
- | + | ||
- | Installation complete. | + | |
- | 1. Open in web browser: http:// | + | |
- | 2. After the install procedure run: | + | |
- | | + | |
- | + | ||
- | Now you're done. | + | |
- | </ | + | |
- | # Open install URL (as mentioned in step 1 of the post-install message) and configure DokuWiki instance. | + | |
- | #* The web configuration interface is quite intuitive. | + | |
- | #* You will probably go for a public wiki (read access for everyone, and write access for registered users). | + | |
- | # Run the {{{post_install_dokuwiki}}} script (as mentioned in step 2 of the post-install message). | + | |
- | #* The script creates a {{{.htaccesss}}} file in DokuWiki' | + | |
- | #** The {{{.htaccess}}} file contains Apache2 | + | |
- | #* Sample run:< | + | |
- | so@elf: | + | |
- | Add to '/ | + | |
- | (use the web interface in case you don't have enough rights): | + | |
- | + | ||
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | + | ||
- | + | ||
- | Add to the beginning of '/ | + | |
- | the following lines (in case you want to enable HTTPS access to login and admin pages): | + | |
- | + | ||
- | # Switch to secure on login, profile and admin actions | + | |
- | RewriteCond %{HTTPS} !on | + | |
- | RewriteCond %{QUERY_STRING} do=(log|profile|admin) | + | |
- | RewriteRule ^(.*) https:// | + | |
- | + | ||
- | # Change back to non-secure on show action | + | |
- | RewriteCond %{HTTPS} on | + | |
- | RewriteCond %{QUERY_STRING} (do=show|^$) | + | |
- | RewriteCond %{REQUEST_METHOD} GET | + | |
- | RewriteRule ^(.*) http://%{HTTP_HOST}/ | + | |
- | </ | + | |
- | # Add {{{local.php}}} configurations as mentioned in previous output. | + | |
- | #* The reason they are not added automatically is the current user may not have access to the {{{local.php}}} file (as it is created by the web server through the {{{www-data}}} user). | + | |
- | #* In case of no rights (the {{{www-data}}} user creates the file) use DokuWiki' | + | |
- | # Congratulations! You've got a basic DokuWiki installation with pretty slash based URLs and Creole markup. | + | |
- | + | ||
- | === indexmenu Configuration === | + | |
- | + | ||
- | The indexmenu plugin is installed but the index pages are not yet created. As written in the {{{local.php}}} file, we will use {{{home: | + | |
- | $conf[' | + | |
- | </ | + | |
- | At the same time we will create and index menu on the start/home page. | + | |
- | + | ||
- | You'll need to go through the following steps (mentioned in the {{{README}}} file): | + | |
- | # Type {{{home: | + | |
- | {{indexmenu> | + | |
- | </ | + | |
- | #* Each time you will use the {{{Index}}} button in the bottom right corner the index menu in the {{{home: | + | |
- | # Add an index menu to the first page in the wiki (home). Just type {{{home}}} in DokuWiki' | + | |
- | = Wiki Name = | + | |
- | + | ||
- | {{indexmenu> | + | |
- | </ | + | |
- | #* {{{Wiki Name}}} is the name of the wiki. It gets displayed as a heading 1 title. | + | |
- | # You can add indexes to namespaces (edit the {{{$namespace/ | + | |
- | = Namespace Name == | + | |
- | + | ||
- | {{indexmenu> | + | |
- | </ | + | |
- | + | ||
- | == Advanced Configuration == | + | |
- | === HTTPS Access === | + | |
- | + | ||
- | * In case you want HTTPS access, add the configuration lines mentioned in the output message of the {{{post_install_dokuwiki}}} script to the {{{.htaccess}}} file in DokuWiki' | + | |
- | * Make sure you add them after the {{{RewriteEngine On}}} line and _before_ the other [[http:// | + | |
- | + | ||
- | === LDAP Authentication === | + | |
- | + | ||
- | * The [[http:// | + | |
- | * The [[http:// | + | |
- | $conf[' | + | |
- | + | ||
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | + | ||
- | # This is optional but may be required for your server: | + | |
- | $conf[' | + | |
- | + | ||
- | # Mapping can be used to specify where the internal data is coming from. | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | + | ||
- | # Optional debugging | + | |
- | $conf[' | + | |
- | </ | + | |
- | * The {{{$conf[' | + | |
- | * The {{{$conf[' | + | |
- | * **IMPORTANT**: | + | |
- | + | ||
- | ==== Disable Register Action ==== | + | |
- | + | ||
- | In case you choose to use LDAP authentication, | + | |
- | # use the {{{$conf[' | + | |
- | # use the DokuWiki' | + | |
- | === Split authentication === | + | |
- | + | ||
- | The LDAP service often offers little support for group authorization inside DokuWiki. A better approach would be authenticating through LDAP and using another engine for authentication. This can be accomplished through the use of [[http:// | + | |
- | + | ||
- | In order to provide split authentication, | + | |
- | # Download the [[http:// | + | |
- | # Update the {{{local.php}}} file with configuration lines such as these:< | + | |
- | $conf[' | + | |
- | + | ||
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | $conf[' | + | |
- | </ | + | |
- | #* I assumed the configuration lines for LDAP are already there. | + | |
- | #* In the above configuration, | + | |
- | # Authorization configuration is done by editing the {{{conf/ | + | |
- | # user: | + | |
- | + | ||
- | razvan: | + | |
- | oana:x:Oana Baron: | + | |
- | ddvlad: | + | |
- | dbaluta: | + | |
- | apitis: | + | |
- | bdrutu: | + | |
- | catalinme: | + | |
- | [...] | + | |
- | </ | + | |
- | #* The {{{MD5password}}} and {{{email}}} fields are provided by the LDAP authentication engine and aren't filled. This may also hold true for {{{Real Name}}} but I didn't check. | + | |
- | # You can now use the {{{Access Control List Management}}} link in the Administration menu for authorization: | + | |
- | == Upgrading == | + | |
- | + | ||
- | DokuWiki has a smart notification system that lets you know whether a new version of DokuWiki is available. A DokuWiki upgrade is fairly easy to accomplish. The upgrade steps are described on the [[http://www.dokuwiki.org/ | + | |
- | + | ||
- | The steps below have been undertaken during an actual upgrade. | + | |
- | # Backup the previous DokuWiki folder< | + | |
- | $ cp -a wiki/ 2009-12-30-wiki-bak | + | |
- | </ | + | |
- | # [[http:// | + | |
- | $ wget http:// | + | |
- | $ ls | + | |
- | 2009-12-30-wiki-bak | + | |
- | </ | + | |
- | # Unpack the DokuWiki archive.< | + | |
- | $ tar xzf dokuwiki-2009-12-25.tgz | + | |
- | $ ls | + | |
- | 2009-12-30-wiki-bak | + | |
- | </ | + | |
- | # Copy new files over the old wiki installation. Overwrite existing files.< | + | |
- | $ cp -rf dokuwiki-2009-12-25/ | + | |
- | </ | + | |
- | # Do a check for [[http:// | + | |
- | $ rm inc/ | + | |
- | [...] | + | |
- | </ | + | |
- | # Check permissions, | + | |
- | # Update plugins. I'm upgrading the [[http:// | + | |
- | $ cd lib/ | + | |
- | + | ||
- | $ wget http:// | + | |
- | $ tar xzf googleanalytics-stable.tar.gz | + | |
- | $ rm googleanalytics-stable.tar.gz | + | |
- | + | ||
- | $ wget http:// | + | |
- | $ tar xzf plugin-include.tgz | + | |
- | $ rm plugin-include.tgz | + | |
- | + | ||
- | $ wget http:// | + | |
- | $ tar xzf displaywikipage-stable.tar.gz | + | |
- | $ rm displaywikipage-stable.tar.gz | + | |
- | + | ||
- | $ wget http:// | + | |
- | $ tar xzf plugin-creole.tgz | + | |
- | $ rm plugin-creole.tgz | + | |
- | + | ||
- | $ wget http:// | + | |
- | $ unzip indexmenu.zip | + | |
- | $ rm indexmenu.zip | + | |
- | </ | + | |
- | # Clean the workplace.< | + | |
- | $ rm dokuwiki-2009-12-25.tgz | + | |
- | $ rm -fr dokuwiki-2009-12-25/ | + | |
- | </ | + | |
- | # < | + | |
- | === Upgrade script === | + | |
- | + | ||
- | Our [[http:// | + | |
- | elf: | + | |
- | + | ||
- | * Downloading Dokuwiki from http:// | + | |
- | * Unpacking Dokuwiki to / | + | |
- | * Backing up Dokuwiki instance to / | + | |
- | * Upgrading Dokuwiki installation in / | + | |
- | * Cleaning up temporary files ... done | + | |
- | </ | + | |
- | + | ||
- | Enjoy! | + |