mediaWiki installation

1: Download mediaWiki

wget http://download.wikimedia.org/mediawiki/1.21/mediawiki-1.21.1.tar.gz

 2: Install php, mysql

rpm -qa php

 

yum install php mysql mysql-server php-mysql

 

yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql

 

yum install php-xml

 

 

3: Modify the mysql root password

mysqladmin -uroot password '123456'

    If the following error occurs

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    Execute the following command

    

service mysqld stop
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
mysql -u root -p

If it appears:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)

Need to modify permissions

chown root:mysql mysqladmin
chown root:mysql mysql

   

 

When you need to enter a password, just press Enter

mysql> use mysql;
Database changed

mysql> update user set password=password("guNNhtqhjUnfky6ahyVh") where user='root' and host='localhost';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye

 

service mysqld restart

 

mysql -uroot -p123456

 Create wiki database and users

create database wikidb;
 grant index, create, select, insert, update, delete, alter, lock tables on wikidb.* to 'wikiuser'@'localhost' identified by '123456';

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326799965&siteId=291194637