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 [2010/01/22 17:36] razvan |
tutorials:dokuwiki [2011/09/12 23:36] razvan [Upgrading] |
||
---|---|---|---|
Line 1: | Line 1: | ||
= DokuWiki Installation and Configuration = | = DokuWiki Installation and Configuration = | ||
- | [[http:// | + | [[http:// |
* it is file-based (no database required); | * 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); | * installation and configuration is a breeze, especially for a manual installation (grabbing the source code, unzip and configure); | ||
Line 13: | Line 13: | ||
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, | 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 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 (through the use of ACLs) can edit it, after logging in). | + | * 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 informatio. This is achieved with the help of the [[http:// | + | * Create index pages for easy access to information. This is achieved with the help of the [[http:// |
* The wiki will use " | * The wiki will use " | ||
* The wiki will enable [[http:// | * The wiki will enable [[http:// | ||
* The wiki will define a {{{contrib}}} namespace that is world-writable. | * The wiki will define a {{{contrib}}} namespace that is world-writable. | ||
* The wiki will define an {{{internal}}} namespace that is readable/ | * 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). | * The wiki enables LDAP authentication (optional - one must have access to a LDAP service). | ||
- | * The wiki enables HTTPS-access to login/ | ||
- | == Basic Installation | + | == Install |
- | === Install Scripts === | + | * Mircea Bardac and me have created a set of scripts for installation, configuration |
- | + | ||
- | * Mircea Bardac and me have created a set of scripts for a basic installation and configuration | + | |
* Issue the following command to get a copy of the repository< | * Issue the following command to get a copy of the repository< | ||
- | git clone http:// | + | git clone http:// |
</ | </ | ||
- | * Browse to the {{{dokuwiki/ | + | * Browse to the {{{dokuwiki/ |
- | === Using the Install Scripts === | + | * Instructions below are also present in the {{{README}}} |
+ | == Basic Installation and Configuration | ||
- | These instructions are also present in the {{{README}}} file in the {{{dokuwiki/ | + | |
+ | === Using the Install Scripts === | ||
# Find the desired DokuWiki version for download. Use this [[http:// | # Find the desired DokuWiki version for download. Use this [[http:// | ||
- | # Run the install {{{install_dokuwiki}}} script. It requires three arguments: | + | # Run the install {{{dw-install}}} script. It requires three arguments: |
## the installation folder for {{{dokuwiki}}}; | ## the installation folder for {{{dokuwiki}}}; | ||
## the DokuWiki tarball download URL; ({{{http:// | ## the DokuWiki tarball download URL; ({{{http:// | ||
## the future DokuWiki URL. ({{{http:// | ## the future DokuWiki URL. ({{{http:// | ||
#* Sample run:< | #* Sample run:< | ||
- | so@elf:~/dokuwiki$ ./install_dokuwiki | + | razvan@swarm:~/scripts/dw$ ./dw-install |
- | * Using download link http:// | + | |
- | * Downloading DokuWiki ... done. | + | * Logging information to /tmp/ |
- | * Preparing installation folder /home/so/ | + | * Using download link http:// |
+ | * Downloading DokuWiki ... done. | ||
+ | * Preparing installation folder /home/razvan/ | ||
* Installing plugins | * Installing plugins | ||
* Installing plugin: Creole ... done. | * Installing plugin: Creole ... done. | ||
Line 51: | Line 53: | ||
* Installing plugin: Index-Menu ... done. | * Installing plugin: Index-Menu ... done. | ||
* Installing plugin: Display-Wiki-Page ...done. | * Installing plugin: Display-Wiki-Page ...done. | ||
+ | * Installing ggauth backend ...done. | ||
Installation complete. | Installation complete. | ||
- | 1. Open in web browser: http://elf.cs.pub.ro/so/wiki2/ | + | 1. Open in web browser: http://swarm.cs.pub.ro/~razvan/dw-test/ |
- | 2. After the install | + | 2. Fill required information to complete |
- | ./post_install_dokuwiki | + | 3. Remove / |
- | + | 4. Run: | |
- | Now you're done. | + | ./dw-post-install |
</ | </ | ||
# Open install URL (as mentioned in step 1 of the post-install message) and configure DokuWiki instance. | # Open install URL (as mentioned in step 1 of the post-install message) and configure DokuWiki instance. | ||
#* The web configuration interface is quite intuitive. | #* 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). | #* You will probably go for a public wiki (read access for everyone, and write access for registered users). | ||
- | # Run the {{{post_install_dokuwiki}}} script | + | # Run the {{{dw-post-install}}} script, as mentioned in step 4 of the end message. |
- | #* The script | + | #* The `dw-post-install' |
- | #** The {{{.htaccess}}} file contains Apache2 [[http:// | + | #*# Updating the {{{$DW_ROOT/ |
+ | #*# Creating the {{{$DW_ROOT/.htaccess}}} file. This file is responsible with the configuration of pretty | ||
#* Sample run:< | #* Sample run:< | ||
- | so@elf:~/dokuwiki$ ./post_install_dokuwiki | + | razvan@swarm:~/scripts/dw$ ./dw-post-install |
- | Add to '/ | + | * Updating |
- | (use the web interface in case you don't have enough rights): | + | * Updating |
- | + | ||
- | $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:// | + | |
</ | </ | ||
- | # Add {{{local.php}}} configurations as mentioned in previous output. | + | # **Congratulations!** You've got a basic DokuWiki installation with pretty slash based URLs, HTTPS support login and Creole markup. |
- | #* 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 === | === indexmenu Configuration === | ||
Line 128: | Line 100: | ||
== Advanced Configuration == | == 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 {{{RewriteEngin On}}} line and _before_ the other [[http:// | ||
=== LDAP Authentication === | === LDAP Authentication === | ||
Line 157: | Line 126: | ||
* The {{{$conf[' | * The {{{$conf[' | ||
* The {{{$conf[' | * The {{{$conf[' | ||
- | * **IMPORTANT**: | + | * **IMPORTANT**: |
+ | *# Make a copy of the {{{local.php}}} file (be it {{{local.php.bak}}}). | ||
+ | *# Delete the file {{{rm local.php}}}; | ||
+ | *# Copy the backup file ({{{local.php.bak}}}) | ||
+ | *# Provide | ||
- | ==== Disable | + | ==== Disable |
- | In case you choose to use LDAP authentication, | + | In case you choose to use LDAP authentication, |
- | # use the {{{$conf[' | + | # use the {{{$conf[' |
# use the DokuWiki' | # use the DokuWiki' | ||
- | === Split authentication | + | === 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:// | 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, | + | The [[http:// |
- | # Download the [[http:// | + | |
+ | In order to configure split authentication, | ||
# Update the {{{local.php}}} file with configuration lines such as these:< | # Update the {{{local.php}}} file with configuration lines such as these:< | ||
$conf[' | $conf[' | ||
Line 185: | Line 159: | ||
# user: | # user: | ||
- | razvan:x:Razvan Deaconescu: | + | razvan:x:x: |
- | oana:x:Oana Baron:x:so | + | oana:x:x:x:so |
- | ddvlad:x:Vlad Dogaru:x:so | + | ddvlad:x:x:x:so |
- | dbaluta:x:Daniel Baluta:x:so | + | dbaluta:x:x:x:so |
- | apitis:x:Andrei Pitis:x:so | + | apitis:x:x:x:so |
- | bdrutu:x:Bogdan Drutu:x:so | + | bdrutu:x:x:x:so |
- | catalinme: | + | 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. | + | #* The {{{MD5password}}}, {{{Real Name}}} and {{{email}}} fields are provided by the LDAP authentication engine and aren't filled. |
- | # You can now use the {{{Access Control List Management}}} link in the Administration menu for authorization: | + | # You can now use the {{{Access Control List Management}}} link in the "Administration" |
== Upgrading == | == 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:// | 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:// | ||
- | The steps below have been undertaken during an actual upgrade. | + | The are two scripts you may use. One is to be run by root (the {{{dw-upgrade}}} script), while the other (the {{{dw-upgrade-no-root}}} script) may be run by a non-priviliged user. Each script creates |
- | # Backup | + | |
- | $ 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' | + | |
- | $ cd lib/ | + | |
- | $ wget http:// | + | The {{{dw-upgrade}}} script (run by {{{root}}}) is to be used when your backup needs to be web accessible. The backup uses the precises ownership information and access rights (may be owned by {{{www-data}}}) such that it would be an exact copy of the original DokuWiki installation. In order for the backup copy to be completely accesible, its {{{.htaccess}}} filesh ould probably be updated. |
- | $ tar xzf googleanalytics-stable.tar.gz | + | |
- | $ rm googleanalytics-stable.tar.gz | + | |
- | $ wget http:// | + | The backup directory passed to the scripts should exist. This is where the actual backup is created using a name starting with {{{dokuwiki-bak}}} (such as {{{dokuwiki-bak-2011-09-12}}}). |
- | $ tar xzf plugin-include.tgz | + | |
- | $ rm plugin-include.tgz | + | |
- | $ wget http://cloud.github.com/downloads/tatewake/dokuwiki-plugin-displaywikipage/displaywikipage-stable.tar.gz | + | A sample run is shown below:< |
- | $ tar xzf displaywikipage-stable.tar.gz | + | razvan@swarm: |
- | $ rm displaywikipage-stable.tar.gz | + | |
- | $ wget http://www.chimeric.de/ | + | * Logging information to /tmp/tmp.xQuZwTyfgu. |
- | $ tar xzf plugin-creole.tgz | + | * Downloading DokuWiki ... done. |
- | $ rm plugin-creole.tgz | + | * Backing up Dokuwiki instance to /home/razvan/public_html/backup//dokuwiki-bak-2011-09-12 ... done |
- | + | * Upgrading Dokuwiki installation in /home/razvan/public_html/dw-test/ ... done | |
- | $ wget http://samuele.netsons.org/dokuwiki/media/indexmenu.zip | + | * Installing plugins |
- | $ unzip indexmenu.zip | + | * Installing plugin: Creole |
- | $ rm indexmenu.zip | + | * Installing plugin: Google Analytics |
- | </code> | + | * Installing plugin: Include |
- | # Clean the workplace.< | + | * Installing plugin: Index-Menu ... done. |
- | $ rm dokuwiki-2009-12-25.tgz | + | * Installing plugin: Display-Wiki-Page |
- | $ rm -fr dokuwiki-2009-12-25/ | + | * Installing ggauth backend |
- | </ | + | |
- | # < | + | |
- | === Upgrade script === | + | |
- | + | ||
- | Our [[http://koala.cs.pub.ro/git/? | + | |
- | elf:~/ | + | |
- | + | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
</ | </ | ||
Enjoy! | Enjoy! |