El día Tuesday, April 07, 2009 a las 11:20:33AM -0700, Alaín Ramírez González escribió:
> Bueno lista resulta ser que tengo las salvas del Wikiversity y necesito > importarlas a la wiki (vacía) que instalé, la pregunta es ¿como lo > hago?, me cansado de trastear dentro pero no viene ninguna opción que me > permita hacerlo, los archivos en cuestión son estos: > > eswikiversity-20090404-pages-articles.xml > eswikiversity-20090404-pages-meta-history.xml > eswikiversity-20090404-pages-meta-current.xml Hola, El tema de tener un Wiki local para el uso en momentos de 'fuera de línea' ya me interesaba desda hace algún tiempo. En mi caso quería tener una versión de Wiki en Español http://es.wikipedia.org/wiki/Wikipedia:Portada Un poco instado por tu mensaje me puse anoche a trabajar y he os acá una guía que explica paso a paso cómo uno hace de una salva en XML eswiki-20080304-pages-articles.xml.bz2 un Wiki en la computadora local, y especialmente qué herramientas se necesitan instalar. Claro, va con FreeBSD y su colección de los ports. Pero para los amantes de Linux, pues que usen sus rpm'es respectivas. Todo función como Dios manda. Las páginas y buscador de http://es.wikipedia.org/wiki/Wikipedia:Portada tengo ahora en http://localhost/mediawiki/index.php/Wiki Saludos matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e <[email protected]> - w http://www.oclc.org/ http://www.UnixArea.de/ People who hate Microsoft Windows use Linux but people who love UNIX use FreeBSD.
$Id: mediawiki.txt,v 1.2 2009/04/10 11:10:21 guru Exp $ How to install & configure Apache, PHP5, MySQL and MediaWiki to import a complete MediaWiki like http://es.wikipedia.org/wiki/ - install /usr/ports/www/apache13 - install /usr/ports/lang/php5 but make sure that Apache module is configure (it is off by default) - install /usr/ports/databases/mysql50-server - configure mysqlserver in /etc/rc.conf with mysql_enable="YES" mysql_dbdir="/usr/db/mysql" - create /usr/db/mysql and chown it: # mkdir -p /usr/db/mysql # chown mysql:mysql /usr/db/mysql we need at least around 4 GByte for the DB later; - start mysqlserver (will come up now on any reboot): # /usr/local/etc/rc.d/mysql-server start - create the 'root' account in MySQL database: $ mysqladmin -u root password 'xxxxxx' - configure Apache in /usr/local/etc/apache/httpd.conf for PHP5 (default is PHP4); change or add the following diff lines: # diff /usr/local/etc/apache/httpd.conf /usr/local/etc/apache/httpd.conf.old 440c440 < <IfModule mod_php5.c> --- > <IfModule mod_php4.c> 448,449c448,449 < <IfModule mod_php5.c> < DirectoryIndex index.php index.html index.htm --- > <IfModule mod_php4.c> > DirectoryIndex index.php index.html 1045,1048d1044 < < AddType application/x-httpd-php .php < AddType application/x-httpd-php-source .phps < AddType application/x-httpd-php .php .htm .html - configure Apache in /etc/rc.conf with apache_enable="YES" - start Apache (will come up now on any boot): # /usr/local/etc/rc.d/apache restart - install MediaWiki && friends from ports: /usr/ports/www/mediawiki /usr/ports/www/p5-HTML-WikiConverter /usr/ports/www/p5-WWW-Wikipedia /usr/ports/www/p5-HTML-WikiConverter-MediaWiki - copy over the installed mediawiki tree to the DOCROOT of Apache: # cd /usr/local/www # cp -Rp mediawiki data - configure mediawiki # cd /usr/local/www/data/mediawiki # chmod a+w config http://localhost/mediawiki/config/ fill out the PHP form and submit; below at the end is the resulting output with my configuration; - move over the resulting file LocalSettings.php and we're done: # cd /usr/local/www/data/mediawiki # mv config/LocalSettings.php . We need additional extensions and tools for importing real MediaWiki, see also: http://meta.wikimedia.org/wiki/Importing_a_Wikipedia_database_dump_into - port /usr/ports/lang/ocaml # cd /usr/ports/lang/ocaml # make install clean - port /usr/ports/lang/php5-extensions - port /usr/ports/textproc/php5-dom after the PHP extensions restart Apache; - install the tool 'texcv' # cd /usr/local/www/data/mediawiki/math/ # cat README # gmake 'texcv' needs a worldwide writeable dir 'tmp' below Wiki topdir # cd /usr/local/www/data/mediawiki/ # mkdir tmp # chmod 0777 tmp - configure 'tidy' as explained in the above Wiki page # cd /usr/ports/www/tidy # make install clean - get some Wiki extensions from http://www.mediawiki.org/wiki/Special:ExtensionDistributor at least we need for nice rendering these: # tar xzf ParserFunctions-MW1.11-r25491.tar.gz -C /usr/local/www/data/mediawiki/extensions # tar xzf Cite-MW1.11-r25492.tar.gz -C /usr/local/www/data/mediawiki/extensions # tar xzf HTTPRedirect-MW1.11-r19878.tar.gz -C /usr/local/www/data/mediawiki/extensions # tar xzf Purge-MW1.11-r23140.tar.gz -C /usr/local/www/data/mediawiki/extensions # tar xzf TidyTab-MW1.11-r36280.tar.gz -C /usr/local/www/data/mediawiki/extensions # tar xzf ImageMap-MW1.11-r25543.tar.gz -C /usr/local/www/data/mediawiki/extensions - fetch and patch the XML to SQL converter xml2sql-0.5.tar.gz see: http://meta.wikimedia.org/wiki/Xml2sql $ CFLAGS="-I/usr/local/include " export CFLAGS $ LDFLAGS="-L/usr/local/lib " export LDFLAGS $ ./configure $ gmake $ make install - now it's time to get the real stuff: a XML dump of the Spanish Wiki: $ wget http://download.wikimedia.org/eswiki/20080304/eswiki-20080304-pages-articles.xml.bz2 $ mkdir tmp ; cd tmp $ bunzip2 -c ../eswiki-20080304-pages-articles.xml.bz2 | xml2sql this gives around ~1.6 GByte import files $ mysqlimport -u root -p --local wikidb `pwd`/{page,revision,text}.txt Enter password: the import takes around 4 hours (on my 1GHz laptop) - still TODO: images - *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MediaWiki 1.11.2 Installation Don't forget security updates! Keep an eye on the low-traffic release announcements mailing list. Checking environment... Please include all of the lines below when reporting installation problems. PHP 5.2.5 installed Found database drivers for: MySQL PHP server API is apache; ok, using pretty URLs (index.php/Page_Title) Have XML / Latin1-UTF-8 conversion support. Warning: A value for session.save_path has not been set in PHP.ini. If the default value causes problems with saving session data, set it to a valid path which is read/write/execute for the user your web server is running under. PHP's memory_limit is 128M. APC installed GNU diff3 not found. Found ImageMagick: /usr/local/bin/convert; image thumbnailing will be enabled if you enable uploads. Found GD graphics library built-in. Installation directory: /usr/local/www/data/mediawiki Script URI path: /mediawiki Installing MediaWiki with php file extensions Environment checked. You can install MediaWiki. Generating configuration file... Database type: MySQL Loading class: DatabaseMysql Attempting to connect to database server as root...success. Connected to 5.0.51a Attempting to create database... Created database wikidb Creating tables... done. Initializing data... Granting user permissions to wikiuser on wikidb...success. Created sysop account WikiAdmin. Creating LocalSettings.php... 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.
_______________________________________________ Cancelar suscripción https://listas.softwarelibre.cu/mailman/listinfo/linux-l Buscar en el archivo http://listas.softwarelibre.cu/buscar/linux-l
