User Tools

Site Tools


linux:installing_wikidocu

Install required packages

sudo dnf install policycoreutils-python-utils php php-gd php-xml php-json httpd wget tar

Enable http

sudo systemctl enable --now httpd

Do the firewall work

sudo firewall-cmd --permanent --add-service=http

sudo firewall-cmd --permanent --add-service=https

sudo firewall-cmd --reload

Get the tar file

wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz

create the wiki directory

sudo mkdir /var/www/html/wiki

untar the file and get it to the right spot

sudo tar xzf dokuwiki-stable.tgz --strip-components=1 -C /var/www/html/wiki/

Set the permissions

chown -R apache.apache /var/www/html/

edit the conf file

sudo vi /etc/httpd/conf.d/dokuwiki.conf
<VirtualHost *>
	ServerName    web01.hohenfels.mylocal
	DocumentRoot  /var/www/html
	
        <Directory ~ "/var/www/html/wiki/(bin/|conf/|data/|inc/)">
	    <IfModule mod_authz_core.c>
		AllowOverride All
		Require all denied
	    </IfModule>
	    <IfModule !mod_authz_core.c>
		Order allow,deny
		Deny from all
	    </IfModule>
	</Directory>

	ErrorLog   /var/log/httpd/dokuwiki_error.log
	CustomLog  /var/log/httpd/dokuwiki_access.log combined
</VirtualHost>

do the SELinux work

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/wiki/conf(/.*)?"

sudo restorecon -Rv /var/www/html/wiki/conf

sudo restorecon -Rv /var/www/html/wiki/data

sudo setsebool -P httpd_can_network_connect on

sudo setsebool -P httpd_can_sendmail on

sudo setsebool -P httpd_unified 1

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/wiki/lib/plugins(/.*)?"

sudo restorecon -Rv /var/www/html/wiki/lib/plugins

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/wiki/lib/tpl(/.*)?"

sudo restorecon -Rv /var/www/html/wiki/lib/tpl

sudo httpd -t

sudo systemctl restart httpd

Then go to URL to finish install

http://web01/wiki/install.php

TROUBLE SHOOTING
sudo tail -f /var/log/audit/audit.log | grep -i denied

Plugins
Prosemirror
Ad-Hominem Template

File Location:
/var/www/html/wiki/data/pages/

linux/installing_wikidocu.txt · Last modified: 2024/10/01 13:58 by 127.0.0.1