Saturday, April 30, 2011

Installing MediaWiki on Centos 5.6

  1. Download mediawiki from   http://www.mediawiki.org/wiki/Download
  2. mkdir /wiki
  3. cp mediawiki-1.16.4.tar.gz /wiki
  4. cd /wiki
  5. gtar -zxvf mediawiki-1.16.4.tar.gz
  6. cd mediawiki-1.16.4/
  7. mv * ..
  8. cd ..
  9. rmdir mediawiki-1.16.4/
  10. chmod 777 config
  11. cd /etc/httpd/conf
  12. vi httpd.conf (add the following)
    1. Alias /wiki "/wiki"
      <Directory "/wiki">
          AllowOverride None
          Options None
          Order allow,deny
          Allow from all
      </Directory>
  13. /sbin/service httpd  restart
Install mysql
# yum install mysql-server
# service mysqld start
---cut here---
Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h www.centosraka.org password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
                                                                      [  OK  ]
Starting MySQL:                                            [  OK  ]

--cut here---

# mysql_secure_installation

Install PHP

yum install php php-mysql



Login to mysql

# mysql --user=root -p
mysql> show databases;
mysql> create databases wikidb;
mysql> show databases;
mysql> create user 'wikiuser'@'localhost' identified by 'password';
mysql> grant all on *.* to 'wikiuser'@'localhost';

 
Setting up the Wiki Page


http://192.168.1.22/wiki/


Follow the messages and enter passwords


mv LocalSettings.php ..
cd ..
chmod 700 LocalSettings.php


Create an account on the wiki if required and you are all set.






      2 comments:

      Followers

      About Me

      Torrance, CA, United States