7.10. Installing and Configuring a WikiA Wiki is a series of web pages that can be easily edited using only a web browsera simple and convenient way of producing a collaborative web site. Perhaps the most impressive examples of Wikis are those operated by the Wikimedia Foundation (http://wikimedia.org), including Wikipedia, the Wiktionary, and WikiBooks. Fedora Extras includes the Wiki software used by the Wikimedia Foundation, named MediaWiki. Once installed, it can be configured and ready for use in a few minutes. 7.10.1. How Do I Do That?MediaWiki requires a MySQL server. yum won't automatically install a MySQL server when you install MediaWiki because MySQL isn't truly a dependency: the database server doesn't have to be on the same computerbut for a small installation, that makes the most sense. To configure MediaWiki, start your web server (if it's not already running) and then, using a browser on the same computer as the MediaWiki software, go to http://localhost/mediawiki/. You will see an introduction page like that in Figure 7-27, informing you that the software must be configured before use. Figure 7-27. MediaWiki before initial configurationTo configure the software, click on the link provided. The page shown in Figure 7-28 will appear. Figure 7-28. MediaWiki configuration pageThis page presents the results of some initial configuration tests, followed by a form that you must fill in with configuration information. The fields on this form are:
Once you have entered this information, click the Install button at the bottom of the page. You will see a confirmation page. At this point, copy the configuration file from the config directory to the main mediawiki directory: # cp -v /var/www/mediawiki/config/LocalSettings.php /var/www/mediawiki \Q/var/www/mediawiki/config/LocalSettings.php' -> \Q/var/www/mediawiki/LocalSettings.php' You can now click the link at the bottom of the confirmation page or go to http://<hostname>/mediawiki/ to view the front page of the Wiki. The only other customization that is necessary is to install a new logo image. The image should be 155 pixels wide and 135 pixels tall and in .gif, .png, or .jpg format. Edit /var/www/mediawiki/LocalSettings.php and find the line that reads: $wgLogo = "$wgStylePath/common/images/wiki.png"; Change the path on the righthand side of the equal sign to the path of your image location, relative to the Apache Document Root. For example, if your image is in /var/www/mediawiki/images/draft-cover.png, edit this line to read: $wgLogo = "/mediawiki/images/draft-cover.png"; You can then edit the front page of your Wiki by clicking on the "edit" link at the top of the page; changes are made using the same Wikitext format used on Wikipedia. Figure 7-29 shows a fully configured MediaWiki installation. Figure 7-29. Configured MediaWiki front page7.10.2. How Does It Work?MediaWiki is written as a collection of PHP scripts, with some Perl scripts for maintenance functions. The Fedora Extras MediaWiki package installs these files in /var/www/mediawiki, which is within the default Apache Document Root. The file /etc/httpd/conf.d/mediawiki.conf limits access to the mediawiki subdirectories, ensuring that only a browser on the same machine as the server can access the configuration page and making several other directories inaccessible through the Web. All of the Wiki content is stored in the MySQL database for fast, index-based access. Users indicate how they want text to appear by using Wikitext markings; most of these are converted to HTML when the page is displayed, but some (such as --~~~, which is converted to the user's name) are translated when the page is saved. 7.10.3. What About...7.10.3.1. ...changing the appearance of the Wiki?You can alter the appearance of the Wiki by editing the value of $wgDefaultSkin in /var/www/mediawiki/LocalSettings.php. This variable must be set to the name of one of the skin files in /var/www/mediawiki/skins/; for example, to use the simple skin, place this line in the LocalSettings.php file: $wgDefaultSkin="simple"; Additional skins are available from the Wikimedia "Gallery of user styles" (http://meta.wikimedia.org/wiki/Gallery_of_user_styles). 7.10.3.2. ...using a logo that isn't rectangular?Use a graphics tool such as the GIMP to create an image with transparency, so that the page background shows through the portions of the 155x135 logo rectangle that are not occupied by your logo image. For example, if you had an oval image, the space between the outer edge of the logo and the edge of the logo rectangle would be transparent. Save your image in PNG format. 7.10.3.3. ...moving or deleting a page, or protecting a page against edits?All of these operations can be performed by the sysop user. Go to the main page of the Wiki and log in using the sysop username and password created during the initial configuration of the Wiki, and you will see additional tabs on the top of each page for protecting, deleting, and moving. 7.10.4. Where Can I Learn More?
|