install:fedora
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
install:fedora [2013-08-09 14:54] – SELinux 37.209.1.176 | install:fedora [2022-08-05 10:02] (current) – old revision restored (2022-07-31 23:28) schplurtz | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Fedora Package ====== | ====== Fedora Package ====== | ||
- | These instructions are written for Fedora, there may be differences for other versions. | + | DokuWiki is available in the Fedora repositories. |
- | DokuWiki is available in the Fedora repositories. So | + | dnf install httpd php dokuwiki dokuwiki-selinux |
- | yum install dokuwiki | + | The package '' |
- | The package dokuwiki-selinux does configure SELinux to allow dokuwiki to write to its configuration. Its necessary for the Configuration Manager of DokuWiki to work. | + | Package details are available at https:// |
- | + | ||
- | Package details are available at https:// | + | |
===== httpd ===== | ===== httpd ===== | ||
- | + | Apache | |
- | Apache, named httpd in Fedora, is not enabled by default. | + | |
- | + | ||
- | You may start it with | + | |
systemctl start httpd.service | systemctl start httpd.service | ||
Line 28: | Line 23: | ||
===== Configuration ===== | ===== Configuration ===== | ||
+ | The basic configuration just lets you create and edit pages, but doesn' | ||
- | The basic configuration | + | The configuration |
- | The configuration resides in / | + | To enable login, edit ''/ |
- | + | ||
- | To enable login, edit local.php and set | + | |
$conf[' | $conf[' | ||
Line 40: | Line 34: | ||
This enables ACL (Access Control) and gives all members of the group " | This enables ACL (Access Control) and gives all members of the group " | ||
- | Now add a new user to users.auth.php | + | Now add a new user to '' |
admin: | admin: | ||
Line 48: | Line 42: | ||
You can now login as user " | You can now login as user " | ||
- | ===== Paths ===== | + | ==== Paths ==== |
- | + | | DokuWiki | |
- | | DokuWiki | / | + | | Configuration |
- | | Configuration | / | + | | Data directory |
- | | Data directory | / | + | |
===== Allowing access ===== | ===== Allowing access ===== | ||
- | Once this is installed, you should be able to access this on your local machine. A problem may arise when you try to access it through a network. This has to do with the config settings of Dokuwiki, to change them, Navigate to / | + | Once this is installed, you should be able to access this on your local machine. A problem may arise when you try to access it through a network. This has to do with the config settings of Dokuwiki, to change them, Navigate to '' |
* For Fedora versions earlier than 18 (Apache 2.2): Edit the file and find the line that says "Allow 127.0.0.1 only" and change it to say "Allow from All" | * For Fedora versions earlier than 18 (Apache 2.2): Edit the file and find the line that says "Allow 127.0.0.1 only" and change it to say "Allow from All" | ||
* For Fedora 18 and later (Apache 2.4): Edit the file and find the line that says " | * For Fedora 18 and later (Apache 2.4): Edit the file and find the line that says " | ||
- | Save the file and restart the Apache | + | Save the file and restart the Apache |
systemctl restart httpd.service | systemctl restart httpd.service | ||
- | It should now allow remote requests to the site. Depending on your setup, you may have to allow incomming | + | It should now allow remote requests to the site. Depending on your setup, you may have to allow incoming |
===== SELinux ===== | ===== SELinux ===== | ||
- | [[wp> | + | [[wp> |
< | < | ||
Line 71: | Line 64: | ||
</ | </ | ||
+ | If you want to allow httpd to have write access on the file ''/ | ||
+ | - As root do:< | ||
+ | semanage fcontext -a -t FILE_TYPE '/ | ||
+ | - Then execute< | ||
+ | restorecon -v '/ | ||
+ | </ | ||
+ | |||
+ | ==== Solution ==== | ||
+ | (at least for 2013-08-09 Fedora 19 " | ||
+ | As root do: | ||
+ | <code bash> | ||
+ | semanage fcontext -a -t httpd_mediawiki_rw_content_t '/ | ||
+ | restorecon -v '/ | ||
+ | semanage fcontext -a -t httpd_mediawiki_rw_content_t '/ | ||
+ | restorecon -v '/ | ||
+ | semanage fcontext -a -t httpd_mediawiki_rw_content_t '/ | ||
+ | restorecon -v '/ | ||
+ | </ | ||
+ | |||
+ | ==== Solution 2 ==== | ||
+ | |||
+ | I'm not a SELinux or Fedora expert, but thanks to people from the #selinux Freenode IRC channel I managed to fix the problem in the following way: | ||
+ | < | ||
+ | # semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | # restorecon -v '/ | ||
+ | </ | ||
+ | |||
+ | Tried with Fedora 20 on 2014-02-17. | ||
+ | |||
+ | |||
+ | ==== Solution 3 ==== | ||
+ | |||
+ | The Fedora '' | ||
+ | < | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | semanage fcontext -a -t httpd_sys_content_t '/ | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | restorecon -R '/ | ||
+ | restorecon -R '/ | ||
+ | </ | ||
+ | |||
+ | You may want to consider adapting and running these commands. | ||
+ | |||
+ | ==== Solution 4 ==== | ||
+ | The '' | ||
+ | |||
+ | chcon -t httpd_sys_rw_content_t / | ||
+ | chcon -t httpd_sys_content_t / | ||
+ | chcon -t httpd_sys_rw_content_t / | ||
+ | |||
+ | You can restore default SELinux context for this files by running: | ||
+ | restorecon -R '/ | ||
+ | restorecon -R '/ | ||
+ | restorecon -R '/ | ||
+ | |||
+ | ====== Install the package downloaded from the website ====== | ||
+ | |||
+ | See [[https:// |
install/fedora.1376052886.txt.gz · Last modified: 2013-08-09 14:54 by 37.209.1.176