Using the tulinux operating system to create a wikipedia Image

Source: Internet
Author: User
Tags mediawiki
Article Title: UbuntuLinux operating system creates a wikipedia image. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

1. Install LAMP

Sudo aptitude install apache2

Sudo aptitude install mysql-server

Sudo aptitude install php5

Sudo aptitude install php5-mysql

Sudo aptitude install php5-cli

Sudo aptitude install libgd2-xpm libgd2-xpm-dev php5-gd

2. Configure php and mysql

Sudo gedit/etc/php5/apache2/php. ini

Upload_max_filesize = 8 M

Memory_limit = 12 M

Extension = mysql. so

Sudo gedit/etc/mysql/my. cnf

Max_allowed_packet = 128 M

3. Install MediaWiki

Cd/var/www

Sudo wget http://download.wikimedia.org/mediawiki/1.12/mediawiki-1.12.0.tar.gz

Sudo tar vxfz mediawiki-1.12.0.tar.gz

Sudo mv mediawiki-1.12.0 wiki

Cd/var/www/wiki

Sudo chmod a + w config

4. Configure MediaWiki

Configure: http: // localhost/wiki

Do not add a table prefix

Sudo mv config/LocalSettings. php.

Sudo rm-rf config

5. Download Znwiki and import programs

Http://download.wikimedia.org/zhwiki/20080407/zhwiki-20080407-pages-articles.xml.bz2

Http://download.wikimedia.org/tools/mwdumper.jar

6. Clear the database for Import

Mysql-p wikidb

Password :******

Mysql> delete from page;

Mysql> delete from revision;

Mysql> delete from text;

7. Import

Java-jar/home/(your username)/mwdumper. jar -- format = SQL: 1.5/home/(your username)/zhwiki-20080407-pages-articles.xml.bz2 | mysql-u (Table administrator)-p (database name)

Example:

Java-jar/home/antares/mwdumper. jar -- format = SQL: 1.5/home/antares/zhwiki-20080407-pages-articles.xml.bz2 | mysql-u root-p wikidb

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.