Difference between revisions of "Tung mediawiki conf"
Line 5: | Line 5: | ||
#Restart Apache server: <b><code><font color=green >service httpd restart</font></code></b> | #Restart Apache server: <b><code><font color=green >service httpd restart</font></code></b> | ||
#Access <b><code>http://localhost/wiki</code></b>from a brower. The welcome page should display. | #Access <b><code>http://localhost/wiki</code></b>from a brower. The welcome page should display. | ||
− | #Before clicking the setup link, you need to add context <code>httpd_sys_script_rw_t </code>type to <code>/var/www/wiki/config</code> directory. It allows MediaWiki to read and write files inside config directory. Otherwise, crazy selinux will block the write process, and you will get error message <font color=red>“Can't write config file, aborting”.</font> | + | #Before clicking the setup link, you need to add context <font color=brown ><code>httpd_sys_script_rw_t </code></font>type to <font color=brown ><code>/var/www/wiki/config</code></font> directory. It allows MediaWiki to read and write files inside config directory. Otherwise, crazy selinux will block the write process, and you will get error message <font color=red>“Can't write config file, aborting”.</font> |
#*Add context:<b><code><font color=green > semanage fcontext -at httpd_sys_script_rw_t "/var/www/wiki/config(/.*)?" </font></code></b> | #*Add context:<b><code><font color=green > semanage fcontext -at httpd_sys_script_rw_t "/var/www/wiki/config(/.*)?" </font></code></b> | ||
#*Apply context: <b><code><font color=green >restorecon -vRF "/var/www/wiki/config" </font></code></b> | #*Apply context: <b><code><font color=green >restorecon -vRF "/var/www/wiki/config" </font></code></b> |
Revision as of 17:12, 27 July 2011
Instruction
- Install php:
yum install php
- Install MediaWiki, downloaded size 72M, installed size 209 M:
yum install mediawiki
- Edit MediaWiki's httpd configuration file:
/etc/httpd/conf.d/mediawiki.conf.
Uncomment the first two Alias lines - Restart Apache server:
service httpd restart
- Access
http://localhost/wiki
from a brower. The welcome page should display. - Before clicking the setup link, you need to add context
httpd_sys_script_rw_t
type to/var/www/wiki/config
directory. It allows MediaWiki to read and write files inside config directory. Otherwise, crazy selinux will block the write process, and you will get error message “Can't write config file, aborting”.- Add context:
semanage fcontext -at httpd_sys_script_rw_t "/var/www/wiki/config(/.*)?"
- Apply context:
restorecon -vRF "/var/www/wiki/config"
- Add context: