Tiki Wiki réunit un moteur de wiki et un CMS Open Source sous licence LGPL, il né en 2002 et est développé en PHP par Luis Argerich, Eduardo Polidor et Garland Foster. Il utilise Zend Framework, JQuery et Smarty. Ses versions actuelles sont la 16.2 Tabbys et la 15.4 LTS Situla.
Alternatives Open Source à Tiki Wiki:
Objectif
L’objectif de cet article est l’installation et la configuration d’un serveur LAMP5 (Linux Apache MariaDB PHP5) auto-hébergé Tiki Wiki en version 15.4 LTS Situla sur une distribution Linux Debian Jessie 8.7 32bits.
Schéma logique

Pré-requis
1. Pré-requis avant réalisation
- Un serveur Debian Jessie 8.7 32 bits fonctionnel (installation basique avec utilitaires usuels du système et service SSH)
- Packages de base supplémentaires : sudo, resolvconf, tree
- Domaine utilisé : opensharing.priv
2. Configuration réseau initiale
Serveur TikiWiki | |
FQDN | tikiwiki-test.opensharing.priv |
Adresse IP | 192.168.1.30 |
Réseau | 192.168.1.0/24 |
Passerelle | 192.168.1.1 |
dns-nameservers | 192.168.1.11 192.168.1.12 |
dns-search | opensharing.priv |
Contenu initial du fichier /etc/network/interfaces :
auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet static address 192.168.1.30 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 dns-search opensharing.priv dns-nameservers 192.168.1.11 192.168.1.12
Contenu initial du fichier /etc/hosts :
127.0.0.1 localhost.localdomain localhost 192.168.1.30 tikiwiki-test.opensharing.priv tikiwiki-test 192.168.1.30 tikiwiki.opensharing.priv tikiwiki
Rmq : L’adresse 127.0.1.1 doit être retirée sur un serveur à IP fixe et remplacée par cette dernière, tel que l’exemple ci-dessus.
Contenu initial du fichier /etc/host.conf :
order hosts, bind multi on
Contenu initial du fichier /etc/resolv.conf :
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 192.168.1.11 nameserver 192.168.1.12 search opensharing.priv
Rmq :
Le fichier /etc/resolv.conf ne doit pas être édité dès lors que le paquet resolvconf a été installé.
Pour prendre en compte les modifications des fichiers de configuration relatifs au réseau, redémarrage du service réseau :
# /etc/init.d/networking restart # /etc/init.d/networking reload
Réalisation
1. Installation de Apache
# apt install apache2 apache2-doc
Installe les paquets suivants par dépendances :
apache2 | apache2-data | apache2-doc | apache2-utils |
2. Installation de MariaDB
# apt install mariadb-server mariadb-client
Installe les paquets suivants par dépendances :
libaio1 | libdbd-mysql-perl | libdbi-perl | libhtml-template-perl |
libmysqlclient18 | libreadline5 | libterm-readkey-perl | mariadb-client |
mariadb-client-10.0 | mariadb-client-core-10.0 | mariadb-common | mariadb-server |
mariadb-server-10.0 | mariadb-server-core-10.0 | mysql-common |
Choisir le mot de passe pour le compte d’administration de MariaDB (« root« ) et le confirmer.
3. Installation de PHP5
# apt install php5 libapache2-mod-php5 php5-gd php5-json php5-mysql php5-curl php5-ldap php5-intl php5-mcrypt php5-imagick php5-gmp php5-imap php5-apcu php5-xmlrpc php-xml-parser php-calendar
Installe les paquets suivants par dépendances :
libapache2-mod-php5 | libc-client2007e | libmcrypt4 | libonig2 |
libqdbm14 | mlock | php-calendar | php-pear |
php-xml-parser | php5 | php5-apcu | php5-cli |
php5-common | php5-curl | php5-gd | php5-gmp |
php5-imap | php5-imagick | php5-intl | php5-json |
php5-ldap | php5-mcrypt | php5-mysql | php5-readline |
php5-xmlrpc | ttf-dejavu-core |
Rmq : Tous les modules installés ici ne seront pas forcément nécessaires.
4. Installation de Tiki Wiki
# wget https://sourceforge.net/projects/tikiwiki/files/Tiki_15.x_Situla/15.4/tiki-15.4.tar.gz # tar zxvf tiki-15.4.tar.gz -C /var/www/ # mv /var/www/tiki-15.4 /var/www/tikiwiki # chown www-data:www-data -R /var/www/tikiwiki/ # cd /var/www/tikiwiki/
Affectation automatique des permissions :
# sh setup.sh Tiki setup.sh - your options ============================ Composer: If you are installing via a released Tiki package (zip, tar.gz, tar.bz2, 7z), you can and should skip using Composer. If you are installing and upgrading via SVN, you need to run Composer after 'svn checkout' and 'svn upgrade'. More info at https://dev.tiki.org/Composer c run composer (log output on screen, not all warnings) and exit (recommended to be done first) L run composer (log output to logfile) and exit (recommended to be done first) V run composer (verbose log output on screen) and exit (recommended to be done first) For all Tiki instances (via SVN or via a released package): f fix file & directory permissions (classic default) o open file and directory permissions (classic option) S clear screen predefined Tiki Permission Check models: ---------------------------------------- 1 paranoia 2 paranoia-suphp w suphp workaround 3 sbox W sbox workaround 4 mixed 5 worry 6 moreworry 7 pain 8 morepain 9 risky a insane q quit x exit There are some other commands recommended for advanced users only. More documentation about this: https://doc.tiki.org/Permission+Check Your choice [f]? f User [www-data]: > Group [www-data]: > Multi []: Checking dirs : db ... ok. dump ... ok. img/wiki ... ok. img/wiki_up ... ok. img/trackers ... ok. modules/cache ... ok. temp ... ok. temp/cache ... ok. temp/public ... ok. templates_c ... ok. templates ... ok. themes ... ok. whelp ... ok. mods ... Creating directory ok. files ... ok. tiki_tests/tests ... ok. temp/unified-index ... Creating directory ok. Fix global perms ... Change user to www-data and group to www-data... done. Fix normal dirs ... done. Fix special dirs ... done. Tiki setup.sh - your options ============================ Composer: If you are installing via a released Tiki package (zip, tar.gz, tar.bz2, 7z), you can and should skip using Composer. If you are installing and upgrading via SVN, you need to run Composer after 'svn checkout' and 'svn upgrade'. More info at https://dev.tiki.org/Composer c run composer (log output on screen, not all warnings) and exit (recommended to be done first) L run composer (log output to logfile) and exit (recommended to be done first) V run composer (verbose log output on screen) and exit (recommended to be done first) For all Tiki instances (via SVN or via a released package): f fix file & directory permissions (classic default) o open file and directory permissions (classic option) S clear screen predefined Tiki Permission Check models: ---------------------------------------- 1 paranoia 2 paranoia-suphp w suphp workaround 3 sbox W sbox workaround 4 mixed 5 worry 6 moreworry 7 pain 8 morepain 9 risky a insane q quit x exit There are some other commands recommended for advanced users only. More documentation about this: https://doc.tiki.org/Permission+Check Your choice [x]? x
5. Configuration de MariaDB
# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. You already have a root password set, so you can safely answer 'n'. Change the root password? [Y/n] n ... skipping. By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] Y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] Y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] Y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] Y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 48 Server version: 10.0.30-MariaDB-0+deb8u1 (Debian) Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS tikiwikidb; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> CREATE USER tikiwikiadmin@localhost IDENTIFIED BY "tikiwikiadminpw"; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON tikiwikidb.* TO tikiwikiadmin@localhost; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | tikiwikidb | +--------------------+ 4 rows in set (0.00 sec) MariaDB [(none)]> quit; Bye
6. Configuration de Apache
# nano /etc/apache2/sites-available/tikiwiki.conf
<VirtualHost *:80> DocumentRoot /var/www/tikiwiki/ ServerName tikiwiki.opensharing.priv Redirect permanent / https://tikiwiki.opensharing.priv/ </VirtualHost> <VirtualHost *:443> DocumentRoot /var/www/tikiwiki/ ServerName tikiwiki.opensharing.priv <Directory /var/www/tikiwiki/> Options +FollowSymlinks AllowOverride All </Directory> SetEnv HOME /var/www/tikiwiki SetEnv HTTP_HOME /var/www/tikiwiki ErrorLog /var/log/apache2/tikiwiki.error.log CustomLog /var/log/apache2/access.log combined SSLEngine On SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire SSLCertificateFile /etc/ssl/certs/tikiwikiperso.crt SSLCertificateKeyFile /etc/ssl/private/tikiwikiperso.key </VirtualHost>
Génération de la clef privée :
# openssl genrsa -out /etc/ssl/private/tikiwikiperso.key 1024
Generating RSA private key, 1024 bit long modulus
...............................++++++
...++++++
e is 65537 (0x10001)
Demande de certificat à partir de la clef :
# openssl req -new -key /etc/ssl/private/tikiwikiperso.key -out /etc/ssl/certs/tikiwikiperso.csr You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank. For some fields there will be a default value, if you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:FR State or Province Name (full name) [Some-State]:Ile-de-France Locality Name (eg, city) []:Paris Organization Name (eg, company) [Internet Widgits Pty Ltd]:OpenSharing Organizational Unit Name (eg, section) []:Service Informatique Common Name (e.g. server FQDN or YOUR name) []:tikiwiki.opensharing.priv Email Address []:admin@opensharing.priv Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []:tikiwikicertificate An optional company name []:OpenSharing
Construction du certificat :
# openssl x509 -req -days 365 -in /etc/ssl/certs/tikiwikiperso.csr -signkey /etc/ssl/private/tikiwikiperso.key -out /etc/ssl/certs/tikiwikiperso.crt Signature ok subject=/C=FR/ST=Ile-de-France/L=Paris/O=OpenSharing/OU=Service Informatique/CN=tikiwiki.opensharing.priv/emailAddress=admin@opensharing.priv Getting Private key
Activation du site et des modules et vérification de la syntaxe du VirtuaHost :
# a2ensite tikiwiki # a2enmod rewrite # a2enmod ssl # apachectl configtest Syntax OK
7. Configuration de PHP
max_execution_time (ligne 372) :
max_execution_time = 60
post_max_size (ligne 660) :
post_max_size = 30M
upload_max_filesize (ligne 820) :
upload_max_filesize = 30M
mbstring.func_overload (ligne 1769) :
mbstring.func_overload = 0
8. Redémarrage des services
# service apache2 restart # service mysql restart
9. Configuration de Tiki Wikipar le navigateur Web
Saisir, dans la barre d’adresses, l’adresse suivante :
http://tikiwiki.opensharing.priv/tiki-install.php
redirigeant automatiquement vers :
https://tikiwiki.opensharing.priv/tiki-install.php
Le répondeur OCSP nous signifie que le certificat n’émane pas d’une autorité de certification reconnue, un message d’avertissement est donc émis.
Cliquer sur Avancé puis Ajouter une exception…
Il suffit ensuite de Confirmer l’exception de sécurité.
La page d’accueil d’accueil de l’installateur nous propose tout d’abord de choisir la langue. Puis Continuer.
Vient ensuite la licence LGPL. Puis Continuer.
On poursuit avec la vérification des pré-requis. Puis Continuer.
Ensuite la configuration de la connexion à la base de données tikiwikidb créée précédemment. Puis Continuer.
On choisit ensuite le moteur de la base de données, ici arbitrairement innoDB. Cette phase va remplir la base de données, créer et peupler ses tables. L’ensemble est assez long. Puis Installer.
On vérifie ensuite que tout s’est bien passé. Puis Continuer.
On renseigne ensuite le nom du wiki ainsi que les informations de contact mais aussi le protocole de connexion. Puis Continue.
L’installation est terminée. On peut désactiver l’installateur et accéder au wiki.
On définit ensuite un mot de passe pour l’administrateur (son nom est imposé : admin). Puis Appliquer.
Plusieurs choix de configurations s’offrent à nous.
La première option Start Configuration Profiles Wizard nous propose différents profils communément utilisés ainsi que des démonstrations. Il y a moins de paramétrages, elle est donc plus rapide à suivre et plus didactique.
La deuxième option Start Configuration Wizard est plus complète puisqu’elle consiste à paramétrer davantage d’options.
Nous choisirons ici, arbitrairement l’option 1 avec le profil Company Intranet.
On accède directement au menu d’administration.
Menu que l’on retrouve également sur la barre de navigation de gauche : Configurations.
La sous-section Control Panels du menu de Configurations donne accès aux options principales. Ci-dessous la version basique.
Et maintenant la version avancée. Certaines options nécessitent d’être activées.
Pour une configuration rapide, un menu se trouve en haut de l’écran.
On peut enfin créer notre première page.
Pour aller plus loin
1. Effectuer une sauvegarde manuelle complète
# mkdir -p /home/adminsys/backup/15.4LTS/ # cd /home/adminsys/backup/15.4LTS/ # tar -czvf backup-tikiwiki-20170426.tar.gz -C /var/www/ tikiwiki/ # mysqldump --user=tikiwikiadmin --password=tikiwikiadminpw --databases tikiwikidb > tikiwiki-20170426.sql
2. Effectuer une restauration manuelle complète
# cd /home/adminsys/backup/15.4LTS/ # tar -xzvf backup-tikiwiki-20170426.tar.gz -C /var/www/ # mysql --user=tikiwikiadmin --password=tikiwikiadminpw tikiwikidb < tikiwiki-20170426.sql
Références