It's better when it's simple

User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
install:ubuntu [2022-07-08 18:54] – removed [2022-07-08 22:56] (current) – old revision restored (2021-10-19 16:46) Klap-in
Line 1: Line 1:
 +====== Installation DokuWiki under Ubuntu ======
 +**Please note**
 +The repository of Ubuntu has still the 2018-04-22 version of DokuWiki. This version is not recommended. Please install the newest version of DokuWiki. The instruction below uses a version downloaded directly from
 +  * [[:install:ubuntu: Ubuntu 18.04 + Nginx | Ubuntu 18.04 + Nginx]] 
 +=====Ubuntu 14.04, and 16.04?=====
 +These are instructions on how to install a single DokuWiki under Ubuntu 14.04. Other version installations are discussed below. If you want to install a DokuWiki Farm, follow these instructions and then visit the [[:farms|Farm Page]].
 +Please note that there is a dokuwiki package in the Ubuntu repositories. If you want to use it, please see the [[install:debian|Debian install page]] instead. This article describes the installation of DokuWiki from a tarball. (The Ubuntu and Debian packages follow the Debian directory conventions and that is why different steps are needed when using the Ubuntu/Debian package).
 +:!: **For Ubuntu 16.04** you will want to use libapache2-mod-php7.0 and make sure to install php7.0-xml, php7.0 with apt-get
 +Upgrading from Ubuntu 14.04 LTS to Ubuntu 16.04 LTS I had to add the following:
 +  * apt-get install php7.0
 +  * apt-get install php-mbstring
 +  * apt-get install php7.0-xml
 +This resolved all the issues restoring DokuWiki back to normal prior to the upgrades.
 +  - Install Ubuntu Server 14.04 [[|Step by step instructions with screenshots]]
 +  - Update & Upgrade Ubuntu.<code bash>sudo apt-get update && sudo apt-get upgrade</code>
 +  - Install Apache2 and PHP.<code bash>sudo apt-get install apache2 libapache2-mod-php php-xml</code>
 +  - Enable Apache Rewrite module.<code bash>sudo a2enmod rewrite</code>
 +  - Download and uncompress the latest stable release.<code bash>
 +cd /var/www
 +sudo wget
 +sudo tar xvf dokuwiki-stable.tgz
 +sudo mv dokuwiki-*/ dokuwiki
 +  - Change permissions.<code bash>sudo chown -R www-data:www-data /var/www/dokuwiki</code>
 +  - Change document root in Apache to point to /var/www/dokuwiki<code bash>sudo nano /etc/apache2/sites-enabled/000*.conf</code> Replace\\ ''DocumentRoot /var/www/html''\\ with\\ ''DocumentRoot /var/www/dokuwiki''
 +     - If you want to host a DokuWiki server on localhost for testing purposes do NOT change the content of ''/etc/apache2/sites-enabled/000*.conf'', instead create a new file in \\ ''/etc/apache2/sites-available''\\ with <code bash>sudo touch apache2-dokuwiki.conf</code>with the following content:<code bash><VirtualHost>
 +        DocumentRoot /var/www/dokuwiki
 +  ServerName localhost
 +     - enable the new project by placing it into /etc/apache2/sites-enabled with <code bash>sudo a2ensite apache2-dokuwiki</code>
 +     - and then reload apache2 service<code bash>sudo service apache2 reload</code>
 +  - Change AllowOverrides setting in Apache2 to use .htaccess files for security.<code bash>sudo nano /etc/apache2/apache2.conf</code>
 +     - For directory ''/var/www/'' replace\\ ''AllowOverride None''\\ with\\ ''AllowOverride All''
 +  - Restart Apache2 service.<code bash>sudo service apache2 restart</code>
 +  - Visit ''http://IP-address-of-your-server/install.php'' to initially configure your DokuWiki.
 +     - If you decided to host DokuWiki on localhost for testing purposes from point 7a-c, visit ''''
 +  - Delete the install.php file after finished installing.<code bash>sudo rm /var/www/dokuwiki/install.php</code>
 +  - Needed for sending email (e.g. user registration): install sendmail program, e.g. postfix <code bash>sudo apt-get install postfix
 +</code> and configure appropriately
 +  - Enjoy your own DokuWiki server.
 +===== Additional Installation Information =====
 +For more information on installing and configuring DokuWiki on Ubuntu, see [[debian_ubuntu_extras]].
 +===== Apache configuration for running DokuWiki in ~/public_html =====
 +This works with Ubuntu 11.04 natty:
 +  - Install //apache2// and the //php5// module:<code bash>sudo apt-get install apache2 libapache2-mod-php5</code>
 +  - Enable the //userdir// and //rewrite// modules:<code bash>
 +sudo a2enmod userdir
 +sudo a2enmod rewrite
 +  - To make your ''.htaccess'' work, edit ''/etc/apache2/mods-enabled/userdir.conf'' and change the ''AllowOverride'' directive to ''All''((FIXME: someone with more apache savvy than me can probably suggest a "safer" setting for ''AllowOverride''))
 +  - By default, php is disabled for user directories. To enable it, comment the lines as per instruction in ''/etc/apache2/mods-enabled/php5.conf''
 +  - Restart //apache// with<code bash>sudo service apache2 restart</code>
 +===== Ubuntu Server 14.04 and lighttpd =====
 +  - Install lighttpd and php. <code bash>
 +sudo apt-get install lighttpd 
 +sudo apt-get install php5-cgi 
 +  - Download dokuwiki, and place in www directory. Change file name appropriately as your downloaded file is placed and named. <code bash>
 +tar xvfz dokuwiki.tgz 
 +ls -l
 +sudo cp -r dokuwiki/ /var/www/
 +sudo chown -R www-data:www-data /var/www/dokuwiki
 +  - Configure lighttpd for php.<code bash>
 +sudo lighttpd-enable-mod fastcgi-php
 +sudo /etc/init.d/lighttpd force-reload
 +  - That's it. Enjoy your own DokuWiki server. (Test if it works on your %%http://localhost/dokuwiki%%)
 +===== Installation of DokuWiki using apt-get =====
 +<code>apt list dokuwiki</code>
 +Check the date, if the date is over a couple months then I would highly recommend stopping here and trying the above methods for installation.
 +<file>dokuwiki/eoan,now 0.0.20180422.a-2 all [residual-config]</file>
 +If you insist on using the above package then the steps below will assist getting your installation operational.
 +  - As of 2020-01-02 the package is dated **2018-04-22** which is quite out of date.
 +  - I am concerned that:
 +    - more items in /var/lib/dokuwiki/ might be required in /usr/share/dokuwiki
 +    - more items in /etc/dokuwiki/ might be required in /usr/share/dokuwiki
 +  - Initially there are a number of PHP warnings that appear to pop up occasionally when first exploring the wiki, however they seem to go away and not return (often). These issues are documented on the DokuWiki web site, and claim to be fixed, likely the issues will go away after the DokuWiki install package gets updated.
 +Assuming that you have already installed apache and PHP (see above) and they are operating correctly.
 +The following commands will require **sudo** prefix or require you to be **su** (naughty). 
 +<code>sudo apt install dokuwiki</code>
 +Folders of interest
 +  * /etc/dokuwiki/
 +  * /usr/share/dokuwiki/
 +  * /var/lib/dokuwiki/
 +The apt package has number of problems which you will need to address:
 +<code>chown www-data:www-data /usr/share/dokuwiki
 +chown www-data:www-data /usr/share/dokuwiki/* -R
 +chown www-data:www-data /var/lib/dokuwiki
 +chown www-data:www-data /var/lib/dokuwiki/* -R
 +ln -s /var/lib/dokuwiki/data /usr/share/dokuwiki/data
 +ln -s /etc/dokuwiki/license.php /usr/share/dokuwiki/conf/license.php</code>
 +Create virtual directory for apache
 +<code>nano /etc/apache2/sites-available/dokuwiki.conf</code>
 +<file>Alias /dokuwiki /usr/share/dokuwiki
 +<Directory /usr/share/dokuwiki>
 +        Options +FollowSymLinks
 +        AllowOverride All
 +        DirectoryIndex index.php
 +        Order allow,deny
 +        Allow from all
 +AliasMatch ^/dokuwiki/sites/[^/]+$      /usr/share/dokuwiki/
 +AliasMatch ^/dokuwiki/sites/[^/]+/(.*)$ /usr/share/dokuwiki/$1</file>
 +Tell apache to enable the virtual folder (Note: use a2dissite to disable). 
 +<code>a2ensite dokuwiki
 +systemctl reload apache2</code>
 +Open your web browser and configure DokuWiki (You will likely get warnings if you have PHP 7.x).
install/ubuntu.txt · Last modified: 2022-07-08 22:56 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki