Dokuwiki on the Pine64
I got Dokuwiki running on PHP7 and Nginx, and it rocks.  I have my main wiki running on a RasPi2 and page loads take a second or two and page saves take 2-3.  On the Pine64 2GB it is under a second.  What a difference!

If anyone is interested, I can post the instructions.
(05-04-2016, 08:31 PM)JCMPine64 Wrote: I got Dokuwiki running on PHP7 and Nginx, and it rocks.  I have my main wiki running on a RasPi2 and page loads take a second or two and page saves take 2-3.  On the Pine64 2GB it is under a second.  What a difference!

If anyone is interested, I can post the instructions.

Please post the instruction and I will pin the thread.
Installing Dokuwiki on the Pine64

I started with a 2GB Pine64 running longsleep's latest xenial ubuntu version. 
For these instructions:
Server address:
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
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
sudo nano /etc/php/7.0/fpm/php.ini

Ensure that PHP processor looks for connections using a socket instead of a port on our local interface.
sudo nano /etc/php/7.0/fpm/pool.d/www.conf  
   listen = /var/run/php5-fpm.sock

Restart PHP7
sudo service php7.0-fpm restart

===== Install and configure Nginx =====

Install Nginx
 sudo apt-get install nginx
sudo service nginx start

Create the www directory
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
sudo nano /etc/nginx/sites-available/default

Alter file to look like this:
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;


       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
       location ~ \.php$ {
               include snippets/fastcgi-php.conf;

               # With php7.0-cgi alone:
               # 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
sudo service nginx restart
===== Test PHP processing =====

Create test file
sudo sh -c 'echo "<?php phpinfo(); ?>" > /usr/share/nginx/www/info.php'  

In browser type

If everything is correctly configured, a PHP config screen will be displayed.

Remove the test file
sudo rm /usr/share/nginx/www/info.php

===== Install and configure Dokuwiki =====
Download the DokuWiki file into the home directory
cd ~

Extract the files and then delete the tarball
tar xzvf dokuwiki-stable.tgz
rm dokuwiki-stable.tgz
Change the name of the directory and move it to the web root
mv doku* wiki  
sudo mv wiki /usr/share/nginx/www/
Change the web root directory and change ownership
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
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:

If starting fresh, move the data directory to the desired location:
sudo cp -R data /mount/media/Media/Wiki

Change the data directory to point to the wiki data directory
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
$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

(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
====== Email Setup ======
The password for gmail will be readable by root, so the best thing to do is to turn on two-step verification in Gmail.

Install Mail (mpack is for mail attachments, which I didn't install):
sudo apt-get install ssmtp
sudo apt-get install mailutils
sudo apt-get install mpack

Configure Mail:
Edit and modify/add lines as necessary
sudo nano /etc/ssmtp/ssmtp.conf


No need to restart the mail server.

Test Email:
echo "sample text" | mail -s "Subject"

( is the destination address)

If you want to have Crontab email after each activity, set Crontab to use a specific email address:
sudo crontab -e

====== Source Information ======

Easy to understand and well documented process. Thanks! will give this a try in the near future
You can find me on IRC, Discord and Twitter

If anyone is interested, I can post the instructions.
php5 is available in the debian build. php7 is unable to be found. rather that fight whatever battles necessary to eventually get a php7 enviroment in place is using php5 o.k. and i guess it does not present any problems?

edit: i used synaptic to install php5 and debian goes ahead and installs apache at the same time. interestingly now when i enter ip of pine64 board i get an apache welcome page instead of nginx , which i had installed last night prior to anything else and at first got a nginx welcome screen. i wonder why apache now overrules nginx. both are running

Possibly Related Threads...
Thread Author Replies Views Last Post
  Pine64 OS dpcons 2 248 03-02-2020, 04:32 PM
Last Post: dpcons
  Jailhouse supports Pine64+ vj-kumar 0 190 02-17-2020, 11:39 PM
Last Post: vj-kumar
  PINE64 board not powering up loki21century 2 406 11-25-2019, 12:19 PM
Last Post: Partymack711
  Pine64 not powering up. skylab 5 723 05-03-2019, 02:48 PM
Last Post: Mendota
  Pine64 LTS vs Rock64 4 GB LTS gops 2 339 04-15-2019, 10:56 AM
Last Post: gops
Thumbs Down Pine64 was a Useless Project pushpendrak 14 4,149 03-07-2019, 08:48 AM
Last Post: dkryder
  Pine64+ 2GB board for sale with WiFi module and case ~clumsy~ 1 570 10-21-2018, 04:54 AM
Last Post: aeiltz
  Video Chat with Pine64 mathiraj 0 368 07-02-2018, 02:33 PM
Last Post: mathiraj
  Selling my PINE64 2GB Set Philippines / Asia only $115 racann 4 2,436 06-17-2018, 12:53 PM
Last Post: racann
  Supply DC power to Pine64 via Pi-2 Connector & Euler Bus? crapped 2 843 05-24-2018, 01:58 AM
Last Post: crapped

Forum Jump:

Users browsing this thread: 1 Guest(s)