Difference between revisions of "Mediawiki Install FC6"

From Aktivix
Jump to: navigation, search
Line 55: Line 55:
Create this script:
Create this script:
Line 101: Line 102:

Revision as of 01:59, 20 January 2007

See also MediaWiki_Install

Fedora Core six has packaged mediawiki, so:

 yum install mediawiki mysql-server php-eaccelerator
 chkconfig mysqld on
 chkconfig httpd on
 service mysqld start
 service httpd start
 mysqladmin -u root password 'new-password'

Then, following the wiki farm notes

 elinks http://localhost/mediawiki/config/index.php

The fill in the following values (the rest can be the defaults):

Wiki name:             TestWiki1
Contact e-mail:	mediawiki@aktivix.org
Admin username:        WikiSysop
Password:              *****
Password cobfirm:      *****
Shared memory caching: 
  * (X) eAccelerator
Database name:         testwiki1
DB username:           testwiki1user
DB password:           *****
DB password confirm:   *****
Superuser account:     root
Superuser password:    *****

Create a MySQL account for AdminSettings.php:

 mysql -uroot -p mysql
 mysql> GRANT ALL PRIVILEGES ON *.* TO 'wikiadmin'@'localhost'
 Query OK, 0 rows affected (0.00 sec)

And move the sample file and then add the password to it:

  cd /var/www/mediawiki
  mv AdminSettings.sample AdminSettings.php


cd /var/www/mediawiki
mv config/LocalSettings.php LocalSettings.php
chown root.root LocalSettings.php 
chmod 644 LocalSettings.php 

Then restart apache and the wiki should be working at http://localhost/mediawiki/

Next add a new wiki site.

Create this script:

#!/bin/bash if [[ -z $1 ]]; then echo "The first argument should be the new wiki name" fi BASE_DIR="/var/www" WIKI_NAME="$1" if [[ -d $BASE_DIR/$WIKI_NAME ]]; then echo "$WIKI_NAME appears to be in use" exit fi # make the directory for the site mkdir $BASE_DIR/$WIKI_NAME # change to the sites directory cd $BASE_DIR/$WIKI_NAME #make some dirs mkdir {images,config} # fix the ownership chown -R apache.apache {images,config} # create the sym link tree for name in `ls ../mediawiki` do if [[ -e $name ]]; then echo "$name exists already, skipping" else ln -s ../mediawiki/$name fi done # remove the LocalSettings.php sym link if [[ -L LocalSettings.php ]]; then rm LocalSettings.php else if [[ -f LocalSettings.php ]]; then echo "LocalSettings.php already exists" else echo "LocalSettings.php doesn't exist" fi fi