作者:【吴业亮】云计算开发工程师
博客:http://blog.csdn.net/wylfengyujiancheng

MediaWiki是一套基于网络的Wiki引擎,维基媒体基金会的所有项目乃至众多wiki网站皆采用了这一软件。MediaWiki软件最初是为自由内容百科全书维基百科所开发的,今日已被一些公司机构部署为内部的知识管理和内容管理系统。Novell甚而还在多个高流量的网站中使用了该软件。MediaWiki采用PHP编程语言写成,并可使用MySQL、MariaDB、PostgreSQL或SQLite之一作为其关系数据库管理系统。MediaWiki在GNU通用公共许可证第2版及其后续版本的条款下分发,其文档则按知识共享-署名-相同方式共享3.0版协议释出,部分文档还被释入了公有领域,这使其成为了自由软件。出于服务维基百科的需求,软件的第一个版本于2002年被部署,后来,维基百科和其他维基项目继续定义了MediaWiki的大部分功能。为了有效地处理大型项目,MediaWiki得到了很好的优化,使其可以承载万亿字节的内容和每秒数十万次的访问请求。因为维基百科是全球最大的网站之一,需要MediaWiki能为开发者实现通过多层次的实现可伸缩性缓存和数据库响应,对开发者来说,这一直是一个让他们很头疼的大问题,而MediaWiki很好的解决了这一问题。MediaWiki有700多个配置设置和超过1800个扩展,可以使各种特性被添加或更改。在维基百科上,超过1000个自动化和半自动化的机器人和其他工具用于协助编辑。它也被一些公司部署为一个内部知识管理系统,一些教育机构也让学生使用MediaWiki来进行小组项目的管理和维护。

一、安装http
1、安装软件包

# yum -y install httpd

2、删除欢迎词

# rm -f /etc/httpd/conf.d/welcome.conf

3、修改配置文件/etc/httpd/conf/httpd.conf

第86行定义管理员邮箱
ServerAdmin root@srv.world
第95行定义服务器名称
ServerName www.srv.world:80
# line 151: change
151行定义权限
AllowOverride All
164行添加只能使用目录名称访问的文件名
DirectoryIndex index.html index.cgi index.php
# 在后面新增
# server's response header
ServerTokens Prod
# keepalive is ON
KeepAlive On

4、启动服务并设置开机启动

# systemctl start httpd
# systemctl enable httpd

5、设置防火墙

# firewall-cmd --add-service=http --permanent
success
# firewall-cmd --reload
Success

6、写入测试文件

 # vi /var/www/html/index.html<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Test Page
</div>
</body>
</html>

7、测试

二、安装PHP
1、安装软件包

# yum -y install php php-mbstring php-pear

修改配置文件

# vi /etc/php.ini
# line 878: 修改时区
date.timezone = "Asia/Shanghai"

2、重启http服务

# systemctl restart httpd

3、创建测试文件

# vi /var/www/html/index.php<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
<?phpprint Date("Y/m/d");
?>
</div>
</body>
</html>

4、测试

三、安装数据库
1、安装软件包

# yum -y install mariadb-server

2、修改配置文件/etc/my.cnf

# add follows within [mysqld] section
[mysqld]
character-set-server=utf8

3、启动服务并设置开机启动

# systemctl start mariadb
# systemctl enable mariadb

4、初始化数据库

# mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.Enter current password for root (enter for none):
OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.# set root password
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..... Success!By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
# remove anonymous users
Remove anonymous users? [Y/n] y... Success!Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.# disallow root login remotely
Disallow root login remotely? [Y/n] y... Success!By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.# remove test database
Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.# reload privilege tables
Reload privilege tables now? [Y/n] y... Success!Cleaning up...All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.Thanks for using MariaDB!

5、连接数据库

# mysql -u root -p
Enter password:     # MariaDB root password you set
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.37-MariaDB MariaDB ServerCopyright (c) 2000, 2014, Oracle, Monty Program Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

6、查看用户

MariaDB [(none)]> select user,host,password from mysql.user;
+------+-----------+-------------------------------------------+
| user | host      | password                                  |
+------+-----------+-------------------------------------------+
| root | localhost | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| root | 127.0.0.1 | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| root | ::1       | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
+------+-----------+-------------------------------------------+
3 rows in set (0.00 sec)

7、显示数据库

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)MariaDB [(none)]> exit
Bye

8、配置防火墙

[root@dlp ~]# firewall-cmd --add-service=mysql --permanent
success
[root@dlp ~]# firewall-cmd --reload
Success

四、创建mediawiki数据库

# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.44-MariaDB MariaDB Server
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
# create "mediawiki" databse (set any password for "password" section)
MariaDB [(none)]> create database mediawiki;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on mediawiki.* to mediawiki@'localhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye

五、安装mediawiki
1、下载软件包

# wget https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.4.tar.gz 

2、解压软件包

# tar zxvf mediawiki-1.26.4.tar.gz  

3、拷贝到/var/www/html/mediawiki

# mv mediawiki-1.26.4 /var/www/html/mediawiki 

4、设置权限

# chown -R apache. /var/www/html/mediawiki 

5、重启httpd服务

# systemctl restart httpd

6、配置seLinux

# chcon -R -t httpd_sys_rw_content_t /var/www/html/mediawiki
# semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/mediawiki

六、通过界面配置mediawiki
http://(server’s hostname or IP address)/mediawiki/mw-config/
1、设置语言

点击继续

2、配置数据库

3、创建管理员用户


4、下载配置文件,并将LocalSettings.php通过ftp工具上传到后台/var/www/html/mediawiki下,注意目录权限

5、开始使用

参考:
https://zh.wikipedia.org/wiki/MediaWiki

Wiki引擎mediawiki相关推荐

  1. wiki程序php,开源WIKI引擎程序Dokuwiki

    DokuWiki是一个开源WIKI引擎程序,需要在PHP环境下运行,帮助用户管理知识.软件体积小巧.功能强大,适合中小团队和个人网站知识库的管理.您还可以对软件界面模板进行定制. 软件特色 优点 支持 ...

  2. DokuWiki 开源wiki引擎程序

    DokuWiki是一个开源wiki引擎程序,运行于PHP环境下.DokuWiki程序小巧而功能强大.灵活,适合中小团队和个人网站知识库的管理. 官网:https://www.dokuwiki.org/ ...

  3. 作为维基百科全书的系统、全球最著名的wiki程序——MediaWiki

    现在越来越多的公司在日常工作中使用wiki系统,由于其多人协同协作的特性,方便员工分享工作进度以及心得,提高工作效率.今天要给大家介绍一款全球最著名的wiki程序,同时它在2002年被作为维基百科全书 ...

  4. XWiki 4.4.1 发布,Java 的 Wiki 引擎

    XWiki 4.4.1 是一个维护版本,修复了少数发现的 bug. XWiki是一个由Java编写的基于LGPL协议发布的开源wiki和应用平台.它的开发平台特性允许创建协作式Web应用,同时也提供了 ...

  5. Tiki 19.1 发布,开源 Wiki 引擎

    开发四年只会写业务代码,分布式高并发都不会还做程序员? >>>   Tiki 19.1 发布了.新版本更新包括了许多 Bug 的修复(有个好消息是 H5P 和 Bootstrap T ...

  6. Docker部署企业级WIKI平台mediawiki

    创建数据目录 mkdir -pv /data/mysql/{data,conf,logs} chown 999.999 /data/mysql -Rmkdir -pv /data/mediawiki ...

  7. mediawiki java api_维基百科 MediaWiki API 解析

    使用开放的 API 做一个自己的小项目,是一个很好的学习方法.但好像开放的 API 选择并不多.这里给大家多一个选择,简单介绍一下维基百科使用的 MediaWiki API. 简介 先简单介绍几个容易 ...

  8. MediaWiki使用指南

    MediaWiki使用指南 MediaWiki是著名的开源wiki引擎,全球最大的wiki项目维基百科(百科词条协作系统)是使用MediaWiki的成功范例,MediaWiki的最大作用在于对知识的归 ...

  9. MediaWiki初探:安装及使用入门

    来源:http://blog.csdn.net/wangnan537/article/details/37743497 MediaWiki是著名的开源wiki引擎,全球最大的wiki项目维基百科(百科 ...

  10. apache mediawiki 安装_MediaWiki初探:安装及使用入门

    MediaWiki是著名的开源wiki引擎,全球最大的wiki项目维基百科(百科词条协作系统)是使用MediaWiki的成功范例,MediaWiki的最大作用在于对知识的归档,可用于构建企业/个人知识 ...

最新文章

  1. java b2b2c开源商城系统源码
  2. mongodb在32位机的连接
  3. cropper基本用法
  4. math.sqrt_Math.SQRT1_2属性与JavaScript中的示例
  5. Java商品信息查询
  6. 正则表达式 6. 存在(或)
  7. (转)C#开发微信门户及应用(3)--文本消息和图文消息的应答
  8. linux 重建文件系统命令,fsck命令 – 检查并修复Linux文件系统
  9. C++之函数模板探究
  10. linux系统安装自主分区,Linux系统的安装(自动引导安装、网络安装、分区选择)...
  11. H5中CSS3动画的性能优化
  12. 贺利坚老师汇编课程24笔记:内存单元[...]和(...)内容
  13. console.log(12.toString())为啥会报错呢?
  14. (TVS)简介(瞬态抑制二极管)参数
  15. 好佳居软装十大品牌 软装市场发展状况如何
  16. VS2008鼠标右键不灵敏,TFS的Local Path无法打开对应文件夹
  17. android 动态权限aop,Android — AOP 动态权限申请
  18. 【三十五】Python全栈之路--MySQL
  19. python按哪个键运行代码_python运行快捷键是哪个
  20. css 定位连线_前端css实现两点连线

热门文章

  1. python构造自定义数据包_Python发送网络封包,自定义封包结构与内容并发出去
  2. 「笔耕不辍」mysql的索引分类B+和hash详解
  3. 关于如何去实现百度的自动发帖功能猜想
  4. JAVA常用加密解密算法Encryption and decryption
  5. H3C新华三笔记本FN键锁定
  6. 物流基础知识(十五)
  7. Java2实用教程第五版+第七章习题答案
  8. 社科院与杜兰大学金融管理硕士项目——苦练基本功是通向成功的必经之路
  9. 安卓键 adb shell input keyevent code
  10. python椭圆拟合_椭圆拟合(python)