On Montag 20 April 2009 20:38:08 Asaf Bartov wrote:
Hello, everyone.
As Manuel mentioned some time ago, I'm from Wikimedia Israel, and we're interested in trying the OpenZIM tools for a static version of the Hebrew Wikipedia we are working on, for inclusion in the Israeli government's One Laptop Per Child (OLPC) project.
So far, I've been able to compile and run all the tools, but am having some trouble creating ZIM files: I've dumped a locally-loaded Mediawiki installation to HTML using these instructions http://openzim.org/Wiki2html, but when I try to run the builZimFileFromDirectory.pl script, I get silly postgresql errors about failing to connect using "kiwix" user. I should probably create a user, or a database, or both, but I've never used postgresql (I use mysql), and despite trying some combinations of commands to create a 'kiwix' user, with and without a password, couldn't get the DBI::connect call to succeed. I am sure you are all familiar with postgresql and can give me a quick pointer on how to proceed. I'm using a modern unstable Debian box, with a default packager-supplied installation of postgresql and the related Perl DBD module.
Thanks in advance,
Asaf Bartov
Asaf Bartov asaf@forum2.org
Hi Asaf,
postgresql is very flexible, how to authenticate users. This makes it a little more difficult. But not really that difficult.
Postgresql has a configuration file pg_hba.conf (on debian found at /etc/postgresql/8.3/main/pg_hba.conf). There you can find a line: local all all ident sameuser
Replace this "ident sameuser" with "trust": local all all trust
After restarting postgresql (/etc/init.d/postgresql restart) you are able to connect with every db-user you want without using passwords. Run createuser -U postgresql kiwix
This connects to the database using user postgresql (which is the standard admin user) and creates a user kiwix. It will ask you, if that user should have the right to create new users. Kiwix does not need that right (but it won't hurt, so it makes actually no difference). Now you should be able to connect using user kiwix.
Tommi