DokuWiki

It's better when it's simple

User Tools

Site Tools


install:fedora

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
install:fedora [2015-04-18 14:31] – [Solution 3] gomonsinstall:fedora [2024-04-26 17:03] (current) – [Solution 3] 2a02:8012:102b:0:120b:db7:2bbd:6bc
Line 3: Line 3:
 DokuWiki is available in the Fedora repositories. These instructions are written for Fedora 19, there may be differences for other versions. Do DokuWiki is available in the Fedora repositories. These instructions are written for Fedora 19, there may be differences for other versions. Do
  
-  yum install dokuwiki dokuwiki-selinux+  dnf install httpd php dokuwiki dokuwiki-selinux
  
 The package ''dokuwiki-selinux'' is necessary for the Configuration Manager of DokuWiki to work. It configures [[wp>Security-Enhanced Linux|SELinux]] to allow dokuwiki to write to its configuration. The package ''dokuwiki-selinux'' is necessary for the Configuration Manager of DokuWiki to work. It configures [[wp>Security-Enhanced Linux|SELinux]] to allow dokuwiki to write to its configuration.
  
-Package details are available at https://admin.fedoraproject.org/pkgdb/acls/name/dokuwiki+Package details are available at https://admin.fedoraproject.org/pkgdb/package/rpms/dokuwiki/
  
 ===== httpd ===== ===== httpd =====
Line 96: Line 96:
 ==== Solution 3 ==== ==== Solution 3 ====
  
-The Fedora ''dokuwiki-selinux-0-0.24.20140929c.fc21.noarch.rpm'' package's postinstall-script is running the following commands:+The Fedora ''dokuwiki-selinux-20230404a-4.fc40.noarch'' package's postinstall-script adds the following fcontext policy entries: 
 <code> <code>
 semanage fcontext -a -t httpd_sys_rw_content_t '/etc/dokuwiki(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/etc/dokuwiki(/.*)?'
Line 105: Line 106:
 </code> </code>
  
-You may want to consider adapting and running these commands.+In addition, The Fedora dokuwiki package places the ''data'' subdirectory in ''/var/lib/dokuwiki'', which has the following policy:
  
 +<code>
 +$ ls -laZ /var/lib/dokuwiki/
 +total 12
 +drwxr-xr-x.  3 root   root   system_u:object_r:httpd_sys_rw_content_t:s0 4096 Apr 26 15:28 .
 +drwxr-xr-x. 28 root   root   system_u:object_r:var_lib_t:s0              4096 Apr 26 15:28 ..
 +drwxr-xr-x. 13 apache apache system_u:object_r:httpd_sys_rw_content_t:s0 4096 Apr 26 15:28 data
 +</code>
 +
 +Based on the above, the following policies should be needed when installing dokuwiki from the original tarball under /srv/http/wiki.example.net/:
 +
 +<code>
 +semanage fcontext -a -t httpd_sys_content_t '/srv/http/wiki.example.net(/.*)?'
 +semanage fcontext -a -t httpd_sys_rw_content_t '/srv/http/wiki.example.net/conf(/.*)?'
 +semanage fcontext -a -t httpd_sys_rw_content_t '/srv/http/wiki.example.net/data(/.*)?'
 +semanage fcontext -a -t httpd_sys_rw_content_t '/srv/http/wiki.example.net/lib/plugins(/.*)?'
 +</code>
 ==== Solution 4 ==== ==== Solution 4 ====
 The ''chcon'' command changes the SELinux context for files temporary. These changes do not survive a file system relabel, or the ''restorecon'' command. The ''chcon'' command changes the SELinux context for files temporary. These changes do not survive a file system relabel, or the ''restorecon'' command.
  
-    chcon httpd_sys_rw_content_t -t /etc/dokuwiki/ -R +    chcon -t httpd_sys_rw_content_t /etc/dokuwiki/ -R 
-    chcon httpd_sys_content_t -t /usr/share/dokuwiki/ -R +    chcon -t httpd_sys_content_t /usr/share/dokuwiki/ -R 
-    chcon httpd_sys_rw_content_t -t /usr/share/dokuwiki/lib/plugins/ -R+    chcon -t httpd_sys_rw_content_t /usr/share/dokuwiki/lib/plugins/ -R
  
 You can restore default SELinux context for this files by running: You can restore default SELinux context for this files by running:
Line 118: Line 135:
     restorecon -R '/usr/share/dokuwiki/'     restorecon -R '/usr/share/dokuwiki/'
     restorecon -R '/usr/share/dokuwiki/lib/plugins/'     restorecon -R '/usr/share/dokuwiki/lib/plugins/'
 +
 +====== Install the package downloaded from the website ======
 +
 +See [[https://openhsc.org/wiki/install_nginx_and_dokuwiki_on_fedora_server_29|this wiki page on how to install DokuWiki with nginx on Fedora 29]]
install/fedora.1429360318.txt.gz · Last modified: 2015-04-18 14:31 by gomons

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