特殊:Badtitle/NS100:MediaWiki

来自Ubuntu中文
Wikibot留言 | 贡献2008年10月19日 (日) 16:12的版本
跳到导航跳到搜索
可打印版本不再受到支持且可能有渲染错误。请更新您的浏览器书签并改用浏览器默认打印功能。

{{#ifexist: :MediaWiki/zh | | {{#ifexist: MediaWiki/zh | | {{#ifeq: {{#titleparts:MediaWiki|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:MediaWiki|1|-1|}} | zh | | }}

MediaWiki is the engine that is used for Wikipedia. See MediaWiki for more information

Install

To install on your [U|K|Edu]buntu server (with Apache and MySQL - UbuntuHelp:ApacheMySQLPHP or another web server already installed):

 sudo apt-get install mediawiki imagemagick mediawiki-math mysql-server

To enable MediaWiki edit the following file and remove the '#' from the third line so that it reads 'Alias /mediawiki /var/lib/mediawiki':

sudo gedit /etc/apache2/conf.d/mediawiki.conf

Then restart apache:

 sudo /etc/init.d/apache2 restart

The next step is to visit the website. Since you will be entering passwords, you don't want to make an unsecured connection. Either set up a ssl server] ( see UbuntuHelp:forum/server/apache2/SSL) and connect with https://your.site.net/mediawiki, or visit from the server itself (using [lynx] or [links], two excellent text-based web browsers):

 lynx localhost/mediawiki

fill out the forms, noting that the final form is NOT your root or user password, but the password for the root mysql account (blank by default) Lastly, move the config files as requested to prevent anyone else from changing these settings: NOTE: Check the output in your web browser if it's instructions differ from below follow them.

 sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php
 sudo chmod 600 /etc/mediawiki/LocalSettings.php
 sudo rm -Rf /var/lib/mediawiki/config

You are done! you should see a wiki page at: http://your.site.net/mediawiki

Customize

The Apache config files reside at /etc/apache2/conf.d/mediawiki.conf You might want to customize the look of your wiki.

To change the icon make a 135x135 pixel logo in PNG format and move it to the right place:

 sudo cp my_new_logo.png /var/lib/mediawiki/skins/common/images/wiki.png

To get rid of the Mac-like sunburst in the background, edit /var/lib/mediawiki/skins/monobook/main.css and change: background: #f9f9f9 url(headbg.jpg) 0 0 no-repeat; to background: #f9f9f9; see http://prevolution.org/mediawikifarm for running multiple wikis on a server