Install MediaWiki under Ubuntu10.04

Source: Internet
Author: User
Tags mediawiki
1. Install the related software sudoapt-getinstallapache2sudoapt-getinstallmysql-servermysql-client (the password is required in the middle, remember the password you set) sudoapt-getinstallphp5php5-mysqlsudoapt-getinstalllibgd2-xpmlibgd2-xpm-dev

1. Install related software

Sudo apt-get install apache2
Sudo apt-get install mysql-server mysql-client (password required in the middle, remember the password you set)
Sudo apt-get install php5 php5-mysql
Sudo apt-get install libgd2-xpm libgd2-xpm-dev php5-gd
Sudo apt-get install mediawiki

2. Configure mediawiki
Sudo vi/etc/mediawiki/apache. conf:
# Alias/mediawiki/var/lib/mediawiki
Restart apache2: service apache2 restart

3. Set mediawiki
Access http :// /Wiki, click the above link: http :// /Wiki/config/index. php.
After the settings are complete, pay attention to the prompt at the end of the page:
Move/var/lib/mediawiki/config/LocalSettings. php to/etc/mediawiki
Run the following command: mv/var/lib/mediawiki/config/LocalSettings. php/etc/mediawiki.

4. permission settings

5. SyntaxHighlight GeSHi
Go to the plug-in directory (extensions) of MediaWIKI and run the following command:
Svn export http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SyntaxHighlight_GeSHi
After installation, the following files and directories will appear under the directory:
Geshi/README SyntaxHighlight_GeSHi.class.php SyntaxHighlight_GeSHi.i18n.php SyntaxHighlight_GeSHi.php
Modify the file: LocalSettings. php. Insert the code at the end:
Require_once ("$ IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php ");
Modify the SyntaxHighlight_GeSHi.class.php file by referring to the following code:
$ Css = array ();
$ Css [] ='';
If this setting is not enabled, comment out this line of code:
Require_once ("$ IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php ");
Refresh, refresh, And then refresh to enable syntax highlighting.
Try to use This label replaces the original The latter may have problems in processing xml and so on.


6. data backup and recovery
Export MySQL database data:
Mysqldump-u root-p -- opt wikidb> wikidb. SQL
Go to the Ubuntu mediawiki installation directory:/var/lib/mediawiki and package the following files and directories:
Tar-zcvf mediawiki.tar.gz images/skins/extensions/LocalSettings. php
Check whether the packaging file is what we need:
Tar-ztvf mediawiki.tar.gz
If the visual structure is correct, move the two files wikidb.sqland mediawiki.tar.gz to the location where they will be placed to complete the backup.


After mediawiki is reinstalled, you must set the wiki settings in the browser before performing the following operations.
Restore database execution: mysql wikidb <wikidb. SQL-p
Restore the plug-in and run tar-zxvf mediawiki.tar.gz in the mediawiki directory. If the plug-in is not enabled, check the plug-in according to the plug-in Settings section.
The restored home page may be a recovery page. Don't worry. You can edit it. At this time, the data is backed up and saved.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.