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
docpublic:systemes:wiki:installconfdokuwiki [2016/12/13 19:48]
procacci@tem-tsp.eu [Download & Désarchivage]
docpublic:systemes:wiki:installconfdokuwiki [2023/03/22 09:23] (current)
adminjp [sidebar]
Line 1: Line 1:
 ====== Dokuwiki ====== ====== Dokuwiki ======
  
 +===== New install 2022 =====
 +
 +==== references ====
 +
 +  * https://www.dokuwiki.org/fr:install
 +  * https://download.dokuwiki.org/
 +  * https://www.dokuwiki.org/fr:install:permissions
 +
 +
 +==== installation de base ====
 +
 +<code>
 +[root@mt wik]# wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
 +[root@mt wik]# mv dokuwiki-stable.tgz dokuwiki-stable_2020-07-29_Hogfather.tgz
 +
 +[root@mt wiki]# tar xvfz  dokuwiki-stable_2020-07-29_Hogfather.tgz
 +[root@mt wiki]# mv dokuwiki-2020-07-29 wik
 +[root@mt wiki]# cd wik
 +</code>
 +
 +=== permissions ===
 +
 +afin de pouvoir lancer l'installeur il faut ouvrir des permissions pour le proprietaire du process httpd (ici apache) 
 +
 +<code>
 +[root@mt wik]# cp .htaccess.dist .htaccess
 +[root@mt wik]# vim .htaccess
 +[root@mt wik]# chown apache data
 +[root@mt wik]# chown apache data/tmp
 +[root@mt wik]# chown apache data/pages/
 +[root@mt wik]# chown apache data/attic/
 +[root@mt wik]# chown apache data/media
 +[root@mt wik]# chown apache data/media_attic/
 +[root@mt wik]# chown apache data/meta/
 +[root@mt wik]# chown apache data/media_meta/
 +[root@mt wik]# chown apache data/cache/
 +[root@mt wik]# chown apache data/index/
 +[root@mt wik]# chown apache data/locks/
 +[root@mt wik]# chown apache data/index/
 +[root@mt wik]# chown apache lib/tpl/
 +[root@mt wik]# chown apache conf/
 +[root@mt wik]# chown apache conf/local.php.dist 
 +[root@mt wik]# chown apache lib/plugins/
 +
 +</code>
 +
 +==== auth shibboleth ====
 +
 +installation du plugin 
 +
 +  * https://www.dokuwiki.org/plugin:authshibboleth
 +
 +
 +<code>
 +
 +[root@mt wik]# mv lib/plugins/authshibboleth lib/plugins/authshibboleth-manager-installed
 +[root@mt wik]# cp -a lib/plugins/authshibboleth-manager-installed/plugin/authshibboleth ./lib/plugins/
 +
 +[root@mt wik]# less lib/plugins/authshibboleth-manager-installed/README.md 
 +
 +</code>
 +
 +petit correctif, en l'etat le plugin provoque cette erreur dans les logs 
 +
 +<code>
 +[Mon May 23 18:56:42.777627 2022] [php7:error] [pid 2295] [client 192.168.12.190:46606] PHP Fatal error:  Declaration of action_plugin_authshibboleth::register(Doku_Event_Handler &$controller) must be compatible with dokuwiki\\Extension\\ActionPlugin::register(Doku_Event_Handler $controller) in /var/www/dok/wik/lib/plugins/authshibboleth/action.php on line 0, referer: https://mt.dom.fr/wik/doku.php?id=start&do=admin&page=extension&tab=search&q=
 +</code>
 +
 +il faut alors appliquer le patch (simple retrait d'un "&" ligne 40) : 
 +  * https://github.com/ivan-novakov/dokuwiki-shibboleth-auth/pull/17/files
 +
 +<code>
 +[root@mt wik]# vim lib/plugins/authshibboleth/action.php
 +
 +    //public function register(Doku_Event_Handler &$controller) # ligne 40 
 +    public function register(Doku_Event_Handler $controller)
 +</code> 
 +
 +CE patch semble maintenant integré suite au PR .
 +
 +==== patch shib php8 ====
 +
 +un autre patch "maison" a été fait pour supporter php 8 afin de ressoudre cette erreur
 +
 +<code>
 +dokuwiki\Exception\FatalException: Declaration of auth_plugin_authshibboleth::trustExternal() must be compatible with dokuwiki\Extension\AuthPlugin::trustExternal($user, $pass, $sticky = false)
 +</code>
 +
 +il suffit d'ajouter/declarer les parametres attendus comme indiqués dans authshibboleth/auth.php
 +
 +<code>
 +  * @see DokuWiki_Auth_Plugin::trustExternal()
 +     */
 +    //public function trustExternal()
 +   public function trustExternal($user, $pass, $sticky = false)
 +</code>
 +
 +==== patch multi auth-chained ====
 +
 +autre besoin, gerer le multi-authentification => local (compte local docuwiki ) et federation ID shibboleth 
 +
 +<code>
 +[root@wiki authshibboleth]# diff action.php.bak action.php
 +50c50,51
 +<         if ('login' == $ACT && !array_key_exists('auth', $_SESSION[DOKU_COOKIE])) {
 +---
 +> if ('login' == $ACT && !isset($_SESSION[DOKU_COOKIE]['auth']['user'])) {
 +
 +</code>
 +==== patch Logout ====
 +
 +Dokuwiki redirige vers do=login, l'auth shibboleth se redéclenche immédiatement, pour contourner ce problème il faut patcher Logout.php pour retourner sur la page principal et pas sur la page de login
 +
 +<code>
 +Action]# diff Logout.php.bak Logout.php
 +47c47
 +<         send_redirect(wl($ID, array('do' => 'login'), true, '&'));
 +---
 +>         send_redirect(wl($ID, array(), true, '&'));
 +</code>
 +
 +==== custom Login page ====
 +
 +pour customiser le bouton login de la navbar en y faisant apparaitre l'auth Shib/fédé-ID, il faut editer le fichier lib/tpl/bootstrap3/tpl/navbar.php
 +
 +pour le formulaire de login, c'est dans inc/Ui/Login.php
 +
 +
 +
 +
 +
 +===== post-upgrade 2022-07-igor ====
 +
 +==== plugins ====
 +
 +==== indexmenu ====
 +
 +
 +https://www.dokuwiki.org/plugin:indexmenu
 +
 +==== authshib ====
 +
 +https://github.com/ivan-novakov/dokuwiki-shibboleth-auth/archive/refs/heads/master.zip
 +
 ++ astuce authshib dans action.php
 +
 +<code>
 +//public function register(Doku_Event_Handler &$controller)
 +    public function register(Doku_Event_Handler $controller)
 +</code>
 +
 +==== sidebar ====
 +
 +conf/local.php pour la sidebar
 +
 +<code>
 +// jehan upgrade igor 2023-01 sidebar
 +$conf['defer_js'] = 0;
 +</code>
 +
 +==== bootstrap 3 themes ====
 +
 +https://doc.ubuntu-fr.org/utilisateurs/fabux/emeht
 ==== reference 2013 ==== ==== reference 2013 ====
  
Line 58: Line 221:
  
 cf http://www.dokuwiki.org/config cf http://www.dokuwiki.org/config
 +
 +
 +2016 : https://www.dokuwiki.org/install:permissions
  
 === Permissions === === Permissions ===
docpublic/systemes/wiki/installconfdokuwiki.1481658511.txt.gz · Last modified: 2016/12/13 19:48 by procacci@tem-tsp.eu
[unknown link type]Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0