Installing Dokuwiki on the Pine64
I started with a 2GB Pine64 running longsleep's latest xenial ubuntu version.  
For these instructions:
Server address: 192.168.1.206
Wiki name: New Wiki
Wiki data file location: /mount/media/Media/Wiki
====== DokuWiki Setup ======
===== Install and configure PHP7 =====
(If installing on RaspberryPi using PHP5, see the [[DokuWiki Setup#Source Information|Source Information Section]])
Install PHP7
Code:
sudo apt-get install php7.0 
sudo apt-get install php7.0-xml
Tighten up some security in php.ini by uncommenting and altering cgi.fix entry
Code:
sudo nano /etc/php/7.0/fpm/php.ini
    cgi.fix_pathinfo=0
Ensure that PHP processor looks for connections using a socket instead of a port on our local interface.
Code:
sudo nano /etc/php/7.0/fpm/pool.d/www.conf  
    listen = /var/run/php5-fpm.sock
Restart PHP7
Code:
sudo service php7.0-fpm restart
===== Install and configure Nginx =====
Install Nginx
Code:
 sudo apt-get install nginx
sudo service nginx start
Create the www directory
Code:
cd /usr/share/nginx
sudo mkdir www
Visit the server address in browser to verify that nginx is running and displays a welcome screen
Configure nginx default server block
Code:
sudo nano /etc/nginx/sites-available/default
Alter file to look like this:
Code:
server {
        listen 80 default_server;
        listen [::]:80 default_server;
        #root /var/www/html;
        root /usr/share/nginx/www;
        # Add index.php to the list if you are using PHP
        index index.php index.html index.htm index.nginx-debian.html;
        server_name 192.168.1.206;
        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }
        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
            root /usr/share/nginx/www;
        }
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                # With php7.0-cgi alone:
                #fastcgi_pass 127.0.0.1:9000;
                # With php7.0-fpm:
                fastcgi_pass unix:/run/php/php7.0-fpm.sock;
        }
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
                deny all;
        }
    location ~ /(data|conf|bin|inc)/ {
        deny all;
    }
}
Restart Nginx
Code:
sudo service nginx restart
===== Test PHP processing =====
Create test file
Code:
sudo sh -c 'echo "<?php phpinfo(); ?>" > /usr/share/nginx/www/info.php'  
In browser type
Code:
192.168.1.206/info.php
If everything is correctly configured, a PHP config screen will be displayed.
Remove the test file
Code:
sudo rm /usr/share/nginx/www/info.php
===== Install and configure Dokuwiki =====
Download the DokuWiki file into the home directory
Code:
cd ~
wget http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
Extract the files and then delete the tarball
Code:
tar xzvf dokuwiki-stable.tgz
rm dokuwiki-stable.tgz
Change the name of the directory and move it to the web root
Code:
mv doku* wiki  
sudo mv wiki /usr/share/nginx/www/
Change the web root directory and change ownership
Code:
cd /usr/share/nginx/www/wiki  
sudo chown -R www-data data
sudo chown www-data lib/plugins/
sudo chown www-data conf
sudo chown www-data lib/ -R
Start Dokuwiki installer in browser
Code:
192.168.1.206/wiki/install.php  
Fill in the name of the wiki and other items.  Save.
(You may get a warning about the data directory.  Taken care of  next.)
===== Move wiki page file location =====
DokuWiki files are located by default at:
Code:
/usr/share/nginx/www/wiki
If starting fresh, move the data directory to the desired location:
Code:
sudo cp -R data /mount/media/Media/Wiki
Change the data directory to point to the wiki data directory
Code:
cd /usr/share/nginx/www/wiki/conf
sudo nano local.php
  $conf['savedir'] = '/mount/media/Media/Wiki/data';
Local.php will look something like this
Code:
$conf['title'] = 'New Wiki';
$conf['license'] = 'cc-by-sa';
$conf['savedir'] = '/mount/media/Media/Wiki/data';
$conf['useacl'] = 1;
$conf['superuser'] = '@admin';
$conf['disableactions'] = 'register';
===== Plugins =====
 - Arctic Template 
 - 
Avatar (sets avatar for discussion threads)
 - 
Add new page (creates input field for creating new pages)
 - 
Comment (allows edit comments in pages that don't display on page)
 - 
Discussion Plugin (adds discussion sections to all pages)
 - 
Color syntax (allows use of color text)
 - 
Searchindex manager (rebuild site index - useful after first install if using pre-existing data directory)
 - 
Wrap (text formatting)
 - 
Tag (page tagging)
 - 
Pagelist (required by tag plugin)
 - 
Sortablejs (table sorting)
 - 
Rater (page rating)
===== Configuration =====
 - Set "Maximum section edit level" = 0
 - Set "Minimum headers for TOC" = 10
 - Set the "From" email address to NewDokuWiki@gmail.com
(need to have email set up on Pine64.  See next post.)
===== Arctic Template Mods =====
 - Set sidebar to 'right'
====== Source Information ======
Install Dokuwiki on Ubuntu Using PHP5
Move Data Directory