一叶老大放出Ubuntu Wiki的数据包真是造福大家了,再次感谢!但我们菜鸟们做起来还是有很多问题,现在就来处理一下菜鸟们的问题。
下班后急急忙忙装了一遍,大都截图了,有疏漏的地方请大家批评指正,谢谢!
想执行php maintenance/importDump.php < wikiDump_20090709.xml必须要有一些前期配置才可以,请往下看。
1、确保电脑中已经安装了LAMP套件并运行正常。
2、用mysql为mediawiki创建数据库,以供调用。
1、2两步请参照论坛wiki,暂不细说。
3、下载mediawiki程序包,解压,将目录放至/var/www目录下。
4、浏览器中打开:
http://127.0.0.1/mediawiki出现mediawiki的设置页,
点击Setup the wiki。出现如下提示:
代码: 全选
MediaWiki 1.15.1 Installation
Can't write config file, aborting
In order to configure the wiki you have to make the config subdirectory writable by the web server. Once configuration is done you'll move the created LocalSettings.php to the parent directory, and for added safety you can then remove the config subdirectory entirely.
To make the directory writable on a Unix/Linux system:
cd /path/to/wiki
chmod a+w config
Afterwards retry to start the setup.
这是因为config目录没有写入权限,加入写入权限后打开:
http://127.0.0.1/mediawiki/config/index.php,出现安装界面,首先是检查必须环境:
代码: 全选
Checking environment...
Please include all of the lines below when reporting installation problems.
* PHP 5.2.6-3ubuntu4.1 installed
* Found database drivers for: MySQL
* PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
* Have XML / Latin1-UTF-8 conversion support.
* Session save path (/var/lib/php5) appears to be valid.
* PHP's memory_limit is 16M. Attempting to raise limit to 20M... ok.
* Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
* Found GNU diff3: /usr/bin/diff3.
* Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
* Found GD graphics library built-in.
* Installation directory: /var/www/mediawiki
* Script URI path: /mediawiki
* Installing MediaWiki with php file extensions
* Environment checked. You can install MediaWiki.
下面是设置mediawiki:
代码: 全选
Site config:
Wiki name: #这个wiki的名字。
Language: #设置为中文简体。
Admin username: #wiki管理员的名字。
Password: #管理员的密码
Database config:
Database type:Mysql #默认
Database host:localhost #默认
Database name:wiki #刚才建立的数据库名称
DB username:root #数据库的用户
DB password: #密码
设置好后点击下面的Install Mediawiki!按钮进行安装。
会跳至正在安装界面,几秒后跳至安装成功界面。该界面中有一条提示:
代码: 全选
Installation successful! Move the config/LocalSettings.php file to the parent directory, then follow this link to your wiki.
You should change file permissions for LocalSettings.php as required to prevent other users on the server reading passwords and altering configuration data.
将config目录下生成的LocalSettings.php移至上级目录,然后刷新该页面,出现:
代码: 全选
Setup has completed, your wiki is configured.
Please delete the /config directory for extra security.
安装完毕,配置成功!
为安全起见,删除config目录。
点击your wiki后进入wiki首页!
用root登录不行,不知道为什么……
我建的pityonline用户却可以……
此时可以到终端里执行php maintenance/importDump.php < wikiDump_20090709.xml了,数据导入非常慢,共38700页,慢慢来吧……