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