1.安装前准备
系统:CentOS Linux release 7.4.1708 (Core)  3.10.0-693.el7.x86_64
主机:192.168.0.79
软件:mediawiki-1.26.3.tar.gz
下载地址:https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.3.tar.gz

2.安装mariadb数据库、创建wiki库和wiki用户
# yum install -y mariadb mariadb-server
# systemctl enable mariadb
# systemctl start mariadb
# mysqladmin -u root -p password 'bigdata'
# mysql -u root -p bigdata
MariaDB [(none)]> create database wiki character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on wiki.* to 'wiki'@'%' identified by 'wiki';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> quit;

3.安装依赖 php
# yum install -y php php-xml php-mysql

4.安装依赖 httpd
# yum install -y httpd
# systemctl enable httpd
# systemctl start httpd

5. 安装 Mediawiki
# tar -zxf mediawiki-1.26.3.tar.gz -C /var/www/html/
# cd /var/www/html/
# mv mediawiki-1.26.3 wiki
# chown -R apache:apache /var/www/html/wiki
# chmod -R 755 /var/www/html/wiki

6.configure in the browser
可能要先放开防火墙80端口
# firewall-cmd --zone=public --add-port=80/tcp --permanent
# firewall-cmd --reload
访问配置页:http://192.168.0.79/wiki

7.配置数据库  192.168.0.79   wiki/wiki

8.配置wiki管理员账户和wiki用户模式   admin/bigdata

9.放置 LocalSettings.php
# cd /var/www/html/mediawiki
# chown apache:apache LocalSettings.php 
# chmod 755 LocalSettings.php 
# ll LocalSettings.php 
-rwxr-xr-x 1 apache apache 4282 May 24 04:15 LocalSettings.php


10.基本配置
1)设置管理员账户;
2)编辑→设置双击编辑;
3)左侧导航栏设置,在右上角搜索栏中输入“mediawiki:sidebar”;


4)搜索页面关键词,关键词不存在时,可以点击关键词创建页面,并在页面内编辑内容;

Logo

更多推荐