mediawiki数据库的下载地址及导入方法
mediawiki导入数据库
数据库下载:http://zh.wikipedia.org/wiki/Wikipedia:%E6%95%B0%E6%8D%AE%E5%BA%93%E4%B8%8B%E8%BD%BD
MediaWiki数据导入方法
- 使用MediaWiki的特殊页面:你的网站域名/Special:Import。
- 使用MediaWiki自带的php命令:importDump.php。
- 使用SSH登录服务器。比如常用的SSH软件:PuTTY。
- 进入maintenance目录。
- 上传你的xml文件到maintenance目录中。
- 使用命令:php importDump.php 文件名.xml。
- 使用命令:php rebuildrecentchanges.php,刷新特殊页面 Special:RecentChanges,可以看到最新导入的文章情况。(更多php命令请参见:MediaWiki Maintenance)
- 使用MediaWiki自带的php命令:mwdumper。
Manual:Importing XML dumps
This page describes methods to import XML dumps.
The Special:Export page of any mediawiki site, including any Wikimedia site and wikipedia, creates an XML file (content dump). See meta:Data dumps and Manual:DumpBackup.php. XML files are explained more on meta:Help:Export.
There are several methods for importing these XML dumps:
How to import?[edit]
Using Special:Import[edit]
Special:Import can be used by wiki users with import permission (by default this is users in the sysop group) to import a small number of pages (about 100 should be safe). Trying to import large dumps this way may result in timeouts or connection failures. See meta:Help:Importfor a detailed description.
See Manual:XML Import file manipulation in CSharp for a C# code sample that manipulates an XML import file.
Changing permissions[edit]
To allow all registered editors to import (not recommended) the line added to localsettings.php would be:
- $wgGroupPermissions['user']['import'] = true;
- $wgGroupPermissions['user']['importupload'] = true;
Possible Problems[edit]
For using Transwiki-Import PHP safe_mode must be off and open_basedir must be empty. Otherwise the import fails.
Using importDump.php, if you have shell access[edit]
- Recommended method for general use, but slow for very big data sets. For very large amounts of data, such as a dump of a big Wikipedia, use mwdumper, and import the links tables as separate SQL dumps.
importDump.php is a command line script located in the maintenance folder of your MediaWiki installation. If you have shell access, you can call importdump.php like this (add paths as necesary):
php importDump.php --conf LocalSettings.php dumpfile.xml.gz wikidb
or this:
php importDump.php < dumpfile.xml
where dumpfile.xml is the name of the XML dump file. If the file is compressed and that has a .gz or .bz2 file extension, it is decompressed automatically.
Afterwards use ImportImages.php to import the images:
php importImages.php ../path_to/images
Note: If you are using WAMP installation, you can have troubles with the importing, due to innoDB settings (by default is this engine disabled in my.ini, so if you don't need troubles, use MyIsam engine)
Note: For Mediawikis older than version 1.16, to run importDump.php (or any other tool from the maintenance directory), you need to set up your AdminSettings.php file.
Note: running importDump.php can take quite a long time. For a large Wikipedia dump with millions of pages, it may take days, even on a fast server. Also note that the information in meta:Help:Import about merging histories, etc. also applies.
After running importDump.php, you may want to run rebuildrecentchanges.php in order to update the content of your Special:Recentchanges page.
mediawiki数据库的下载地址及导入方法的更多相关文章
- Eclipse 官方简体中文语言包下载地址及安装方法
Eclipse 官方简体中文语言包下载地址及安装方法 打开Eclipse Babel Project 主页: http://www.eclipse.org/babel/downloads.php 根据 ...
- iOS开发之常用第三方框架(下载地址,使用方法,总结)
iOS开发之常用第三方框架(下载地址,使用方法,总结) 说句实话,自学了这么久iOS,如果说我不知道的但是又基本上都摸遍了iOS相关知识,但是每次做项目的时候,遇到难一点的地方或者没试过的东西就闷了. ...
- Photosohp 2017 已经发布!(下载地址及破解方法在文章底部)
Adobe Creative Cloud 软件于2016.11.2 全面更新,Adobe Creative Cloud 2017 震撼登场 全新的 2017版本,包含 Photoshop.Illust ...
- Win7 SP1语言包微软官方下载地址及使用方法 2
情形一:如果您的系统版本是企业版.旗舰版,可以在Windows update中检测语言包按照提示下载安装即可.如果觉得Windows update不方便的话,可以在本文第二部分中下载所需的语言包,下载 ...
- MyEclipse 2013官网下载地址以及破解方法
刚刚发布了MyEclipse 2013,我现在用的还是6.5的版本,6.5的版本是我觉得最好用的一个版本. 我装上了,还没感受到有哪些好用,就是感觉体积庞大,和IBM 的WID一样,是个多面手,啥事都 ...
- MyEclipse 10官网下载地址以及破解方法
刚刚公布了MyEclipse 10,我如今用的还是6.5的版本号,6.5的版本号是我认为最好用的一个版本号. 我装上了,还没感受到有哪些好用,就是感觉体积庞大,和IBM 的WID一样,是个多面手,啥事 ...
- ANDROID 开发,安装离线安装包的下载地址及安装方法。
前言: 建议采用离线安装的方法安装SDK包,在线的方式实在是.....多了不解释. 下面说一下离线安装的方法: 1.下载地址:http://pan.baidu.com/s/1sjuJwYD#path= ...
- Android map转json格式,附上Jackson包下载地址,导入过程
android中的map转json,需要下载jackson包,下载地址: http://www.java2s.com/Code/Jar/j/Downloadjacksonall199jar.htm 下 ...
- RVDS 3.1 下载地址及破解方法
RealView Development Suite 3.1 RVDS 3.1下载地址:https://silver.arm.com/download/Development_Tools/RVDS/ ...
随机推荐
- [JCWC2005]Draw
Einstein学起了画画,此人比较懒--,他希望用最少的笔画画出一张画...给定一个无向图,包含 n 个顶点(编号1~n),m 条边,求最少用多少笔可以画出图中所有的边 Input (draw.in ...
- Java笔记(二十五)……其他常用API
System类 工具类全部都是静态方法 常用方法 获取系统属性信息 static PropertiesgetProperties() static StringgetProperty(String k ...
- 伪分布配置完成启动jobtracker和tasktracker没有启动
检查logs目录下的hadoop-root-jobtracker日志文件 2014-02-26 19:56:06,782 FATAL org.apache.hadoop.mapred.JobTrack ...
- HW5.15
public class Solution { public static void main(String[] args) { System.out.printf("%10s\t%10s\ ...
- Error message “Assembly must be registered in isolation” when registering Plugins in Microsoft Dynamics CRM 2011 2013 解决办法
Error message “Assembly must be registered in isolation” when registering Plugins in Microsoft Dynam ...
- MapKit框架使用
MapKit框架使用 一.地图的基本使用 1.简介 MapKit:用于地图展示,例如大头针/路线/覆盖层展示等(着重界面展示) 使用步骤: 导入主头文件 MapKit/MapKit.h MapKit有 ...
- Open Dynamics Engine for Linux 安装笔记
下载 在Bitbucket上可以下载到最新的版本(截止目前为0.14版) 或者直接用wget下载 wget "https://bitbucket.org/odedevs/ode/downlo ...
- ASP.NET- Repeater 嵌套
我们有时候需要查找出父菜单下面全部的子菜单,然后根据子菜单的ID查找出该类别下面的全部新闻. 通常往往只知道父级菜单的ID,但不知道父级菜单下面有多少个子菜单,也不知道子菜单的ID 所以我们往往需要根 ...
- android游戏物理引擎开发——粒子系统(三)
生病了,医院躺了几天,动了个小手术,动手术之后的几天在医院看了几本<大众软件>,又想到自己必须得买台台式机了,这破笔记本实在用不下去了,然后开始喜欢看些硬件的东西,等我熟悉了以后,写几个硬 ...
- POJ 3616 DP
题意:给你N的时间,M的工作时间段,每个时间段有一个权重,还有一个R,每次完成一个工作需要休息R,问最后在时间N内,最大权重是多少. 思路:很简单的DP,首先对区间的右坐标进行排序,然后直接转移方程就 ...