Tutorials Navigation

Tutorials :: New :: Popular :: Top Rated

Tutorials: 18,357 Categories: 12

Total Tutorial Views: 42,397,037

How to Install MediaWiki on Fedora

Tutorial Name: How to Install MediaWiki on Fedora  

Category: PC Tutorials

Submitted By: Ry-Nasty

Date Added:

Comments: 0

Views: 2,139

Related Forum: PC Building Forum

Share:

1
Install MediaWiki . 'Yum' (Yellowdog Update Modified) is a package manager that will install all the required dependencies of mediawiki . Navigate to Applications->System Tools-->Terminal and become root. Then install mediawiki. Yum would also install php-mysql, php-pgsql, php, httpd because they are dependencies.

su
yum install mediawiki

2
Install mailcap. Apache (httpd) requires mailcap, but yum doesn't detect apache's needs and therefore you have to install it manually.

yum install mailcap

3
Also install mysql-server . For running mediawiki you also require a database server. The database server is not defined as a dependency for mediawiki because the database server can be either MySQL or PostgreSQL, and it does not have to be on the same computer. For installing mysql use:

yum install mysql-server mysql



and if you prefer PostgreSQL, type the following command:

yum install postgresql-server postgresql

4
Start the servers. Start the web server (httpd) and database server (mysql or postgresql) for them to function.

service mysqld start/service postgresql start
service httpd start

5
To make sure that the servers automatically start at boot-up, type the following commands:

chkconfig mysqld on
chkconfig httpd on

6
MediaWiki is installed in /usr/share/mediawiki with files specific to a site installed in /var/www/wiki which contains the following directories and files:

config/
config/index.php
images/
index.php
7
Files in /var/www/wiki are used as a template and Apache can only access /var/www/html if not modified. So run

cp -a /var/www/wiki /var/www/html



to copy the template directory to /var/www/html. After running the command your wiki configuration files are being copied to /var/www/html/wiki and wiki pages are stored in database server.
8
You might have successfully installed the wiki but the skin (the design and the css and js and images of the wiki) are still in /usr/share/mediawiki/skins which is not accessible by web server. You can make them accessible by copying them to the wiki directory:

cp -a /usr/share/mediawiki/skins /var/www/html/wiki



or create a soft link to the skins directory.

ln -s /usr/share/mediawiki/skins /var/www/html/wiki/skins

9
Navigate to localhost/wiki with your favourite browser. If you are accessing that page for the first time, it would ask you to setup the wiki. Follow that link which should take you to the setup page.
10
Fill in everything and click install button. Going with the default options will not do any harm. Choose either MySQL or PostgreSQL as your database server. It is highly recommended to use the superuser account and enter the username of the database superuser account and password. The default superuser account for MySQL is root and that of PostgreSQL is postgres. Also provide a suitable database prefix.

(Note: under Fedora 13 this step will fail due to write permissions on the config directory. hint: for SELinux cd /var/www/html/wiki; chcon -t httpd_sys_content_rw_t config. Also initialize the wikidb as described in [ Register or Signin to view external links. ] .)
11
After clicking Install MediaWiki, if everything goes right, MediaWiki installation successful page is displayed.
12
LocalSettings.php, which is one of the most important configuration file for mediawiki, has to be moved from config/ directory to the parent directory.

mv /var/www/html/wiki/config/LocalSettings.php /var/www/html/wiki

13
Also delete the config directory for security reasons.

rm -fr /var/www/html/wiki/config

14
Go to your wiki and the main page should be displayed.

Hope this helps.
Enjoy! - Nasty

Ratings

Current rating: 9.00 by 2 users
Please take one second and rate this tutorial...

Not a Chance
1
2
3
4
5
6
7
8
9
10
Absolutely

Comments

"How to Install MediaWiki on Fedora" :: Login/Create an Account :: 0 comments

If you would like to post a comment please signin to your account or register for an account.