Difference between revisions of "Tung mediawiki conf"

From CDOT Wiki
Jump to: navigation, search
Line 8: Line 8:
 
#*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>
 +
#Click the link <b>“set up the wiki”</b> in <code>http://localhost/wiki</code>
 +
#Enter the setup information for MediaWiki:
 +
#*Give a name for your wiki page
 +
#*Enter your learn e-mail address as the contact information
 +
#*Disable all useless e-mail features
 +
#*Leave the database host as "localhost"
 +
#*Set up a database password
 +
#*Get MediaWiki to set up the superuser account by checking the appropriate box
 +
#*Entering the MySQL root password.
 +
#Push the <b>“Install MediaWiki”</b> button. After one minute, this message should display “Installation successful!”
 +
#Move the <b><code><font color=purple >config/LocalSettings.php</font></code></b> file to the parent directory.
 +
#Click the finished link. The main page display.

Revision as of 18:17, 27 July 2011

Instruction

  1. Install php: yum install php
  2. Install MediaWiki, downloaded size 72M, installed size 209 M: yum install mediawiki
  3. Edit MediaWiki's httpd configuration file: /etc/httpd/conf.d/mediawiki.conf. Uncomment the first two Alias lines
  4. Restart Apache server: service httpd restart
  5. Access http://localhost/wikifrom a brower. The welcome page should display.
  6. 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"
  7. Click the link “set up the wiki” in http://localhost/wiki
  8. Enter the setup information for MediaWiki:
    • Give a name for your wiki page
    • Enter your learn e-mail address as the contact information
    • Disable all useless e-mail features
    • Leave the database host as "localhost"
    • Set up a database password
    • Get MediaWiki to set up the superuser account by checking the appropriate box
    • Entering the MySQL root password.
  9. Push the “Install MediaWiki” button. After one minute, this message should display “Installation successful!”
  10. Move the config/LocalSettings.php file to the parent directory.
  11. Click the finished link. The main page display.