Difference between revisions of "User:Paul/sandbox/Install Dokuwiki to OpenBSD"

From UNPM.org Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
Installing is as simple as it gets:
 
Installing is as simple as it gets:
  
  servername /home/username
+
  servername:/home/username
 
  $ doas pkg_add dokuwiki
 
  $ doas pkg_add dokuwiki
  
Line 12: Line 12:
 
Dokuwiki can use PHP to manage images, but a better solution is to install ImageMagick:
 
Dokuwiki can use PHP to manage images, but a better solution is to install ImageMagick:
  
  servername /home/username
+
  servername:/home/username
 
  $ doas pkg_add ImageMagick
 
  $ doas pkg_add ImageMagick
  
Line 19: Line 19:
 
== Configuration ==
 
== Configuration ==
  
The configuration is stored in the created file <code>/dokuwiki/conf/local.php</conf>. Since this file is not part of the Dokuwiki package files, it should not get overwritten when updating Dokuwiki.
+
The configuration is stored in the created file <code>/dokuwiki/conf/local.php</code>. Since this file is not part of the Dokuwiki package files, it should not get overwritten when updating Dokuwiki.
 +
 
 +
=== Add padding to inline code ===
 +
 
 +
To add [https://datacadamia.com/web/css/box/padding padding] to inline code, create the [https://www.dokuwiki.org/devel:css#user_styles <code>userstyle.css</code>] file and add the padding to the CSS:
 +
 
 +
servername /home/username
 +
$ doas nano /var/www/unpm.net/public/conf/userstyle.css
 +
 
 +
Add the following to the file:
 +
 
 +
<syntaxhighlight lang="CSS">
 +
code {
 +
    padding: 2px 5px;
 +
}
 +
</syntaxhighlight>
  
 
== Upgrading ==
 
== Upgrading ==
  
 
Since Dokuwiki is installed to the server
 
Since Dokuwiki is installed to the server
 +
 +
== Block access to login with relayd rule ==
 +
 +
The following <code>relayd.conf</code> rule should block access to the login:
 +
 +
pass quick request from <dwadmin>
 +
block request query "do" value "login"

Latest revision as of 18:58, 30 July 2022

The Dokuwiki project provides a very simple and highly functional wiki. Everything is stored in flat files so no database is required and it can be installed using the OpenBSD package manager.

Installation

Installing is as simple as it gets:

servername:/home/username
$ doas pkg_add dokuwiki

The installed will install dokuwiki to /var/www/dokuwiki and will also install the required version of PHP for the installed version of Dokuwiki plus any additional required PHP packages.

Dokuwiki can use PHP to manage images, but a better solution is to install ImageMagick:

servername:/home/username
$ doas pkg_add ImageMagick

Instead of running Dokuwiki from

Configuration

The configuration is stored in the created file /dokuwiki/conf/local.php. Since this file is not part of the Dokuwiki package files, it should not get overwritten when updating Dokuwiki.

Add padding to inline code

To add padding to inline code, create the userstyle.css file and add the padding to the CSS:

servername /home/username
$ doas nano /var/www/unpm.net/public/conf/userstyle.css

Add the following to the file:

code {
    padding: 2px 5px;
}

Upgrading

Since Dokuwiki is installed to the server

Block access to login with relayd rule

The following relayd.conf rule should block access to the login:

pass quick request from <dwadmin>
block request query "do" value "login"