How To Setup your own Wikipedia like website using MediaWiki On CentOS 6.5
MediaWiki
is a free, open source wiki software developed by Wikimedia Fountation.
It is the same software used by Wikipedia. You can build a Wikipedia
like website using MediaWiki in minutes or you can add this website
along with your existing websites.
Here i use CentOS 6.5 to setup my Wikipedia website. My server hostname and IP address are server.geniusansh.com and 192.168.0.155/24. Changer these values as per your own scenario.
Prerequisites:
Install Apache, MySQL, PHP and PHP modules:
Make Sure Apache default port 80 on your your firewall/router:
Disable SELinux and reboot your system:
you can download it using the following command.
Here i use CentOS 6.5 to setup my Wikipedia website. My server hostname and IP address are server.geniusansh.com and 192.168.0.155/24. Changer these values as per your own scenario.
Prerequisites:
Install Apache, MySQL, PHP and PHP modules:
[root@server ~]# yum install mysql mysql-server httpd php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-pecl-apc php*intl wget unzip -yStart/restart MySQL and Apache services now:
[root@server ~]# /etc/init.d/mysqld start [root@server ~]# /etc/init.d/httpd start [root@server ~]# chkconfig mysqld on [root@server ~]# chkconfig httpd on
Create MySQL database and user for MediaWiki:
For instance, here i create database called mediawikidb and user called mediawikiuser with password admin@123.
[root@server ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.69 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Make Sure Apache default port 80 on your your firewall/router:
Disable SELinux and reboot your system:
[root@server ~]# vi /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Getting and Preparing to install MediaWikiyou can download it using the following command.
[root@server ~]# wget http://download.wikimedia.org/mediawiki/1.21/mediawiki-1.21.1.tar.gzExtract and move the file to your website root folder. If you want to setup MediaWiki along with your Website, then move it to a sub directory.
[root@server ~]# tar zxvf mediawiki-1.21.1.tar.gz [root@server ~]# mv mediawiki-1.21.1/ /var/www/html/mediawiki
Begin Installation
Navigate to http://ip-address or domain/mediawiki/ from your browser and follow the onscreen instructions.
Click On setup the wiki first link. Select your language and click Continue.
Now the installer will perform the environment checks. If everything seems Ok, Click Continue.
Enter MySQL Settings such as Database name, user and password etc.
Select MySQL storage engine and click Continue.
Enter your Wikipedia website name and create a new administrative account with username, password and mail id.
Click Continue.
Now th installer will begin to setup database, create administrative accounts and other things. Click Continue.
Now the Wikipedia website has been installed successfully. The installer will download a file calledLocalSettings.php which contains all your configuration details. It is recommended to download and keep it safe, you will need it.
Copy the downloaded LocalSettings.php file to the mediawiki directory. And set write permissions of theLocalSettings.php and WebStart.php files.
[root@server ~]# cp LocalSettings.php /var/www/html/mediawiki/ [root@server ~]# chmod 755 /var/www/html/mediawiki/LocalSettings.php [root@server ~]# chmod 755 /var/www/html/mediawiki/includes/WebStart.php
Now click on enter to wiki link or navigate to http://ip-address or domain/mediawiki/ from your browser. Now you will be redirected to your wikipedia home page.
Thats it. Start uploading contents and spread the word of your new wiki website. For more information about installation and configuration and user manuals.
Enjoy UR Self Friends!!!
Comments
Post a Comment