This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorials:dokuwiki [2011/09/12 23:12] razvan [Install Scripts] |
tutorials:dokuwiki [2020/07/20 09:16] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | = DokuWiki Installation and Configuration = | + | ====== DokuWiki Installation and Configuration |
[[http:// | [[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); | + | * 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; | + | * it uses a namespace-based structure, allowing for easy organization of information; |
- | * its community develops a lot of useful [[http:// | + | * its community develops a lot of useful [[http:// |
- | * it is, in my opinion, very usable: the interface, the editing features, information organization, | + | * 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. | That being said, let's move on to the requirements and installation steps. | ||
- | == User Requirements == | + | ===== 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, | 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). | + | * 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:// | + | * 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 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). |
- | == Basic Installation | + | ===== Install |
- | === Install Scripts === | + | |
- | + | * Issue the following command to get a copy of the repository< | |
- | * 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< | + | |
git clone http:// | git clone http:// | ||
</ | </ | ||
- | * Browse to the {{{dokuwiki/ | + | |
- | === Using the Install Scripts === | + | * Instructions below are also present in the {{{README}}} file in 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 | ||
+ | - the installation folder for {{{dokuwiki}}}; | ||
+ | - the DokuWiki tarball download URL; ({{{http:// | ||
+ | - the future DokuWiki URL. ({{{http:// | ||
+ | - * Sample run:< | ||
+ | razvan@swarm: | ||
- | # Find the desired DokuWiki version for download. Use this [[http:// | + | |
- | # Run the install {{{install_dokuwiki}}} script. It requires three arguments: | + | * Using download link http:// |
- | ## the installation folder for {{{dokuwiki}}}; | + | * Downloading DokuWiki ... done. |
- | ## the DokuWiki tarball download URL; ({{{http:// | + | * Preparing installation folder /home/razvan/ |
- | ## the future DokuWiki URL. ({{{http:// | + | * Installing plugins |
- | #* Sample run:< | + | |
- | so@elf: | + | |
- | * Using download link http:// | + | |
- | * Downloading DokuWiki ... done. | + | |
- | * Preparing installation folder /home/so/ | + | |
- | * Installing plugins | + | |
* Installing plugin: Creole ... done. | * Installing plugin: Creole ... done. | ||
* Installing plugin: Google Analytics ... done. | * Installing plugin: Google Analytics ... 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. | + | - |
- | #* 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 | + | |
- | #* The script | + | |
- | #** The {{{.htaccess}}} file contains Apache2 [[http:// | + | - *# Updating the {{{$DW_ROOT/ |
- | #* Sample run:< | + | - *# Creating the {{{$DW_ROOT/.htaccess}}} file. This file is responsible with the configuration of pretty |
- | so@elf:~/dokuwiki$ ./post_install_dokuwiki | + | |
- | Add to '/ | + | razvan@swarm:~/scripts/dw$ ./dw-post-install |
- | (use the web interface in case you don't have enough rights): | + | * Updating |
- | + | * 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. | + | |
- | #* 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). | + | ==== indexmenu Configuration |
- | #* 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: | The indexmenu plugin is installed but the index pages are not yet created. As written in the {{{local.php}}} file, we will use {{{home: | ||
Line 111: | Line 83: | ||
You'll need to go through the following steps (mentioned in the {{{README}}} file): | You'll need to go through the following steps (mentioned in the {{{README}}} file): | ||
- | # Type {{{home: | + | - |
{{indexmenu> | {{indexmenu> | ||
</ | </ | ||
- | #* Each time you will use the {{{Index}}} button in the bottom right corner the index menu in the {{{home: | + | - * 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 = | + | ====== Wiki Name ====== |
{{indexmenu> | {{indexmenu> | ||
</ | </ | ||
- | #* {{{Wiki Name}}} is the name of the wiki. It gets displayed as a heading 1 title. | + | - * {{{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 == | = Namespace Name == | ||
Line 127: | Line 99: | ||
</ | </ | ||
- | == 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' | + | ==== LDAP Authentication ==== |
- | * Make sure you add them after the {{{RewriteEngine On}}} line and _before_ the other [[http:// | + | |
- | === LDAP Authentication === | + | * The [[http:// |
+ | * The [[http:// | ||
+ | $conf[' | ||
- | * The [[http:// | ||
- | * The [[http:// | ||
$conf[' | $conf[' | ||
- | + | ||
$conf[' | $conf[' | ||
$conf[' | $conf[' | ||
Line 146: | Line 116: | ||
$conf[' | $conf[' | ||
- | # This is optional but may be required for your server: | + | - |
$conf[' | $conf[' | ||
- | # Mapping can be used to specify where the internal data is coming from. | + | - |
$conf[' | $conf[' | ||
$conf[' | $conf[' | ||
- | # Optional debugging | + | - |
$conf[' | $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 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:// | + | |
- | # Update the {{{local.php}}} file with configuration lines such as these:< | + | In order to configure split authentication, |
+ | - | ||
$conf[' | $conf[' | ||
Line 181: | Line 156: | ||
$conf[' | $conf[' | ||
</ | </ | ||
- | #* I assumed the configuration lines for LDAP are already there. | + | - * I assumed the configuration lines for LDAP are already there. |
- | #* In the above configuration, | + | |
- | # Authorization configuration is done by editing the {{{conf/ | + | |
- | # 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: | + | |
- | == 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/_src/plugin-creole.tgz | + | * 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/ |
- | + | * Upgrading Dokuwiki installation in / | |
- | $ wget http://samuele.netsons.org/ | + | |
- | $ unzip indexmenu.zip | + | * Installing |
- | $ rm indexmenu.zip | + | * Installing plugin: Google Analytics ... done. |
+ | * Installing plugin: Include | ||
+ | * Installing plugin: Index-Menu ... done. | ||
+ | * Installing plugin: Display-Wiki-Page ...done. | ||
+ | * Installing ggauth backend ...done. | ||
</ | </ | ||
- | # Clean the workplace.< | ||
- | $ rm dokuwiki-2009-12-25.tgz | ||
- | $ rm -fr dokuwiki-2009-12-25/ | ||
- | </ | ||
- | # < | ||
- | === Upgrade script === | ||
- | Our [[http:// | + | Enjoy! |
- | elf: | + | |
- | | + | ===== Useful Plugins ===== |
- | | + | |
- | | + | |
- | | + | * https://www.dokuwiki.org/plugin: |
- | | + | * https:// |
- | </code> | + | * https://www.dokuwiki.org/ |
+ | * | ||
+ | * https:// | ||
+ | * https://www.dokuwiki.org/ | ||
+ | * | ||
+ | * https://www.dokuwiki.org/plugin: | ||
+ | * https:// | ||
+ | * https://www.dokuwiki.org/ | ||
+ | * | ||
+ | * https://www.dokuwiki.org/plugin: | ||
+ | * https://www.dokuwiki.org/ | ||
+ | * https://www.dokuwiki.org/ | ||
+ | * | ||
+ | * https://www.dokuwiki.org/ | ||
+ | | ||
- | Enjoy! |