In this post we will learn how to setup a
MediaWiki
on CentOS. MediaWiki requires Apache web server, a database server
(we’ll use MySQL), and PHP version 5. I will explain step by step
process of installing these required components.
- Install MySql server and mysql-php module
1 | yum install mysql-server mysql php-mysql |
2 | /sbin/chkconfig --levels 235 mysqld on |
3 | /sbin/service mysqld start |
- Change 'root' user password for mysql; Create mysql wiki database and user
2 | mysql> UPDATE user SET Password = PASSWORD ( 'newpassword' ) WHERE user = 'root' ; |
3 | mysql> FLUSH PRIVILEGES ; |
4 | mysql> CREATE DATABASE wiki; |
5 | mysql> CREATE USER 'wikiuser' @ 'localhost' IDENTIFIED BY 'wikipassword' ; |
6 | mysql> GRANT ALL ON wiki.* TO 'wikiuser' @ 'localhost' ; |
- Download the mediawiki, http://download.wikimedia.org/mediawiki/1.20/mediawiki-1.20.2.tar.gz
- Untar the mediawiki to /var/www/html and give write permissions for
config folder (Assuming that /var/www/html is the DocumentRoot)
1 | tar -xzvf mediawiki-1.20.2. tar .gz |
2 | mv mediawiki-1.20.2 /var/www/html/wiki |
- Change the ownership of the wiki directory and grant write permissions to the config directory.
1 | chown -R apache:apache /var/www/html/wiki |
2 | chmod a+w /var/www/html/wiki/config |
- Restart the apache server.
1 | /sbin/service httpd restart |
- Go to http://localhost/wiki/config/index.php
- Configure Wiki Admin username/password
- Configure MySQL database/username/password
- Click Done
- Move the config/LocalSettings.php file to the parent directory
1 | mv /var/www/html/wiki/config/LocalSettings.php /var/www/html/wiki |
- Access wiki http://localhost/wiki
No hay comentarios:
Publicar un comentario