mediaWiki 安装

1:下载mediaWiki

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

 2:安装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:修改mysql root密码

mysqladmin -uroot password '123456'

    如果出现下面错误

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

    执行下面的命令

    

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

如果出现:

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

需要修改权限

chown root:mysql mysqladmin
chown root:mysql mysql

   

 

需要输入密码时,回车即可

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

 创建wiki数据库和用户

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

 

你可能感兴趣的:(media)