One of a series of test instances for migrating the Koha Wiki MediaWiki database.
For the current Koha Wiki, visit https://wiki.koha-community.org .Koha 3.4
MSWin32 Koha Source
Until the changes make it into the master branch of the main Koha repo, you may get the MSWin32-modified source here:
http://git.koha-community.org/gitweb/?p=wip/koha-chris_n.git;a=shortlog;h=refs/heads/MSWin32
Installation Notes
While it may seem conceivable to run perl scripts with a 64-bit interpreter, you must install everything in its 32-bit x86 incarnation, because certain dependencies are not available (for Windows) compiled for x64 (libxml2, e.g.). That said, it is of course possible to attempt to compile it yourself for x64 systems.
- Download and install Strawberry Perl 5.12.3.0 - http://strawberry-perl.googlecode.com/files/strawberry-perl-5.12.3.0.msi
- Use default install directory: [../../../Strawberry C:\Strawberry]
- Download and install Apache HTTP 2.2.21 - http://mirror.candidhosting.com/pub/apache//httpd/binaries/win32/httpd-2.2.21-win32-x86-openssl-0.9.8r.msi
- Use default install directory
- Download and install Zebra 2.0.49 - http://ftp.indexdata.dk/pub/zebra/win32/idzebra_2.0.49.exe
- Use default install directory
- Download and install YAZ 4.2.15 - http://ftp.indexdata.dk/pub/yaz/win32/yaz_4.2.15.exe
- Use default install directory
- Download and install dmake - http://search.cpan.org/dist/dmake/
- Use [../../../dmake C:\dmake]
- Note: As of Strawberry 5.12.3.0, the dmake included with Strawberry will borke, so you'll need to use the newest version of dmake which you just downloaded.
- Download and install MySql - http://www.mysql.com/downloads/installer/
- Use default install directory
- I used the developer installation options
- Requires .NET 4.x; This must be installed separately
- Requires Visual C++ runtime libraries; This will be installed by MySql installer
- Download Koha snapshot - http://git.koha-community.org/gitweb/?p=koha.git;a=summary
- Extract tarball into [../../../koha_src C:\koha_src]
- Open a command prompt in [../../../koha_src C:\koha_src] and run 'perl koha_perl_deps.pl -m'
- Open Strawberry's CPAN client and install Koha's Perl dependencies
- Modules which do not compile "as is:" (Note: Most of these will require modification to add 'blib/lib/module/name' or some sort to the PERL5LIB env-var; I did not take time to troubleshoot why Strawberry's CPAN client does not seem to handle pathing correctly.)
- DBD::SQLite2 (optional)
- Graphics::Magick (optional)
- Memoize::Memcached (optional)
- Modules which gave some problems:
- HTTP::OAI (mandatory)
- Install this late or even last; it seems to compile ok at that point
- Net::Server (optional)
- dmake test hung up on t/Server_http.t ........... 4/5
- skipped tests and did dmake install
- Net::Z3950::ZOOM
- this always requires munging up Makefile.PL as the Zebra and YAZ components are in different locations on Win32
- open Makefile.PL in your favorite line editor and
- comment out lines 10-22
- uncomment lines 25-26 and modify them to match the correct pathing to the YAZ includes and libs; something like:
- my $yazinc = '-Ic:\progra~1\yaz\include';
- my $yazlibs = 'c:\progra~1\yaz\lib\yaz4.lib';
- after running 'perl Makefile.PL' you will have to edit the resulting Makefile and append the path to the YAZ library to it: C:\progra~1\yaz\lib\yaz4.lib
- then make, make test, and make install to finish up
- Number::Format (mandatory)
- one test failed like this: t/locale.t ........... 1/? Invalid sep_by_space value at t/locale.t line 77
- I went on and forced the installation, but there might be some ramifications later
- PDF::API2 (mandatory)
- while running 'dmake test' an error was encountered when the package looked for libgd-2_.dll yet the test passed and cpan completeted the installation.
- This package may require the installation of the GD libs from here: http://gnuwin32.sourceforge.net/packages/gd.htm
- If this is true, this bug report provides helpful information: https://rt.cpan.org/Public/Bug/Display.html?id=21911
- This turned out to be a path issue; I need to add the following path to my PATH envvar: C:\strawberry\c\bin
- PDF::API2::Simple (mandatory)
- This package requires Module::Install; you may have to build this outside of the cpan environment; if so, see the section of this document on DOS PATH env var
- 'make test' will fail due to incorrect @INC; fix this by setting the PERL5LIB envvar to something like this: set PERL5LIB=C:\strawberry\cpan\build\PDF-API2-Simple-1.1.4-PoZW9f\blib\lib
- PDF::Reuse (mandatory)
- This package requires Text::PDF::TTFont0 which will fail 'make test' for some quirky reason inside of the cpan environment; outside of the cpan environment, do 'make install'
- cd over to the PDF::Reuse build directory and do 'make test' and 'make install'
- PDF::Reuse::Barcode (mandatory)
- This package requires Barcode::Code128 which will fail 'make test' due to a problem reading back the test png it creates in t/png.t; this is a problem with the win32 plaform vs unix IIRC; it can safely be ignored and the installation forced.
- PDF::Reuse::Barcode will then pass 'make test' and install without incident.
- POE (mandatory)
- This package on Win32 is dependent upon a number of Win32* packages which will have to be built outside of the cpan environment. After this do 'dmake test' and 'dmake install'
- Template (mandatory)
- This package fails inside the cpan environment for some strange reason (probably pathing); Instal it outside cpan and all is well.
- Text::CSV_XS (mandatory)
- Install outside of cpan environment.
- Text::Iconv (mandatory)
- Install outside of cpan environment
- XML::Dumper (mandatory)
- Install outside of cpan environment
- DBD::Mysql
- You will need to download this and build it apart from cpan as it is not available in the Strawberry cpan at this time.
- You will need to add the path to mysqladmin.exe to your PATH envvar prior to running 'perl Makefile.PL'
- 'dmake test' fails on one test like this:
- C:\strawberry\cpan\build\DBD-mysql-4.020>perl t/80procs.t
- 1..29
- ok 1
- ok 2
- DBD::mysql::db do failed: alter routine command denied to user @'localhost' fo
- r routine 'test.testproc' at t/80procs.t line 41.
- DBD::mysql::db do failed: alter routine command denied to user @'localhost' fo
- r routine 'test.testproc' at t/80procs.t line 41.
- # Looks like you planned 29 tests but ran 2.
- # Looks like your test exited with 255 just after 2.
- install it anyway as I think this is just a test db permissions issue.
- C:\strawberry\cpan\build\DBD-mysql-4.020>dmake install
- HTTP::OAI (mandatory)
- Modules which are deprecated:
- HTML::Template::Pro
- cd into the Koha source directory and do 'perl Makefile.PL'; Here is what I did and saw:
C:\koha_src>perl Makefile.PL unable to locate Koha configuration file koha-conf.xml at C:/koha_src/C4/Context .pm line 307. By default, Koha can be installed in one of three ways: standard: Install files in conformance with the Filesystem Hierarchy Standard (FHS). This is the default mode and should be used when installing a production Koha system. On Unix systems, root access is needed to complete a standard installation. single: Install files under a single directory. This option is useful for installing Koha without root access, e.g., on a web host that allows CGI scripts and MySQL databases but requires the user to keep all files under the user's HOME directory. dev: Create a set of symbolic links and configuration files to allow Koha to run directly from the source distribution. This mode is useful for developers who want to run Koha from a git clone. Installation mode (dev, single, standard) [single] dev Please specify the directory in which to install Koha's active configuration files and (if applicable) the Zebra database. Koha's CGI scripts and templates will be run from the current directory. Configuration directory: [c:/progra~1/koha-dev] c:/koha-dev Please specify which database engine you will use to store data in Koha. The choices are MySQL and PostgreSQL; please note that at the moment PostgreSQL support is highly experimental. DBMS to use (Pg, mysql) [mysql] Please specify the name or address of your database server. Note that the database does not have to exist at this point, it can be created after running 'make install' and before you try using Koha for the first time. Database server [localhost] Please specify the port used to connect to the DMBS [3306] Please specify the name of the database to be used by Koha [koha] Please specify the user that owns the database to be used by Koha [kohaadmin] Please specify the password of the user that owns the database to be used by Koha [katikoan] Koha can use the Zebra search engine for high-performance searching of bibliographic and authority records. If you have installed the Zebra software and would like to use it, please answer 'yes' to the following question. Otherwise, Koha will default to using its internal search engine. Please note that if you choose *NOT* to install Zebra, koha-conf.xml will still contain some references to Zebra settings. Those references will be ignored by Koha. Install the Zebra configuration files? (no, yes) [yes] Unable to find the Zebra programs 'zebrasrv' and 'zebraidx' in your PATH or in some of the usual places. If you haven't installed Zebra yet, please do so and run Makefile.PL again. Since you've chosen to use Zebra with Koha, you must specify the primary MARC format of the records to be indexed by Zebra. Koha provides Zebra configuration files for MARC 21 and UNIMARC. MARC format for Zebra indexing (marc21, normarc, unimarc) [marc21] Koha supplies Zebra configuration files tuned for searching either English (en) or French (fr) MARC records. Primary language for Zebra indexing (en, fr, nb) [en] Koha can use one of two different indexing modes for the MARC authorities records: grs1 - uses the Zebra GRS-1 filter, available for legacy support dom - uses the DOM XML filter; offers improved functionality. Authorities indexing mode (dom, grs1) [dom] Please specify Zebra database user [kohauser] Please specify the Zebra database password [zebrastripes] Since you've chosen to use Zebra, you can enable the SRU/ Z39.50 Server if you so choose, but you must specify a few configuration options for it. Please note that if you choose *NOT* to configure SRU, koha-conf.xml will still contain some references to SRU settings. Those references will be ignored by Koha. Install the SRU configuration files? (no, yes) [yes] SRU Database host? [localhost] SRU port for bibliographic data? [9998] SRU port for authority data? [9999] Since you've chosen to use Zebra, you can also choose to install PazPar2, which is a metasearch tool. With PazPar2, Koha can perform on-the-fly merging of bibliographic records during searching, allowing for FRBRization of the results list. Install the PazPar2 configuration files? [no] Use memcached and memoize to cache the results of some function calls? This provides a signficant performance improvement. You will need a Memcached server running. (no, yes) [no] Would you like to run the database-dependent test suite? (no, yes) [no] Koha will be installed with the following configuration parameters: AUTH_INDEX_MODE dom DB_HOST localhost DB_NAME koha DB_PASS katikoan DB_PORT 3306 DB_TYPE mysql DB_USER kohaadmin INSTALL_BASE C:\koha-dev INSTALL_MODE dev INSTALL_PAZPAR2 no INSTALL_SRU yes INSTALL_ZEBRA yes KOHA_INSTALLED_VERSION 3.05.00.011 RUN_DATABASE_TESTS no USE_MEMCACHED no ZEBRA_LANGUAGE en ZEBRA_MARC_FORMAT marc21 ZEBRA_PASS zebrastripes ZEBRA_SRU_AUTHORITIES_POR9999 ZEBRA_SRU_BIBLIOS_PORT 9998 ZEBRA_SRU_HOST localhost ZEBRA_USER kohauser and in the following directories: DOC_DIR C:\koha-dev\doc INTRANET_CGI_DIR C:\koha_src INTRANET_TMPL_DIR C:\koha_src\koha-tmpl\intranet-tmpl INTRANET_WWW_DIR C:\koha_src\koha-tmpl KOHA_CONF_DIR C:\koha-dev\etc LOG_DIR C:\koha-dev\var\log MAN_DIR C:\koha-dev\man MISC_DIR C:\koha-dev\misc OPAC_CGI_DIR C:\koha_src OPAC_TMPL_DIR C:\koha_src\koha-tmpl\opac-tmpl OPAC_WWW_DIR C:\koha_src\koha-tmpl PAZPAR2_CONF_DIR C:\koha-dev\etc\pazpar2 PERL_MODULE_DIR C:\koha_src SCRIPT_DIR C:\koha-dev\bin SCRIPT_NONDEV_DIR C:\koha-dev\bin ZEBRA_CONF_DIR C:\koha-dev\etc\zebradb ZEBRA_DATA_DIR C:\koha-dev\var\lib\zebradb ZEBRA_LOCK_DIR C:\koha-dev\var\lock\zebradb ZEBRA_RUN_DIR C:\koha-dev\var\run\zebradb To change any configuration setting, please run perl Makefile.PL again. To override one of the target directories, you can do so on the command line like this: perl Makefile.PL PERL_MODULE_DIR=/usr/share/perl/5.8 You can also set different default values for parameters or override directory locations by using environment variables. For example: export DB_USER=my_koha perl Makefile.PL or DB_USER=my_koha DOC_DIR=/usr/local/info perl Makefile.PL If installing on a Win32 platform, be sure to use: 'dmake -x MAXLINELENGTH=3000000' Warning: prerequisite CGI::Session::Driver::memcached 0.04 not found. Warning: prerequisite DBD::SQLite2 0.33 not found. Warning: prerequisite Graphics::Magick 1.3.05 not found. Warning: prerequisite Gravatar::URL 1.03 not found. Warning: prerequisite HTML::Template::Pro 0.69 not found. Warning: prerequisite HTTP::OAI 3.2 not found. Warning: prerequisite Memoize::Memcached 0.03 not found. Writing Makefile for koha [../../../koha_src C:\koha_src]
- Create the koha db in mysql and then do:
C:\koha_src\installer\data\mysql>mysql -uroot -p koha<kohastructure.sql Enter password: ***********
- Next do 'dmake -x MAXLINELENGTH=3000000'
- Then do 'dmake install'
- Fixup Apache httpd.conf
- You'll have to modify httpd.conf with some lines like the following (NOTE: You are responsible for securing your own webserver; these suggestions are provided "as is" with no warranty whatsoever... you've been warned.)
# # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "C:/koha_src/koha-tmpl" # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # <Directory "C:/koha_src"> # # Controls who can get stuff from this server. # Order allow,deny Allow from all </Directory>
- You'll have to do some fixup on the directory path separators in koha-httpd.conf; Here is an excerpt from what I did:
## OPAC <VirtualHost 192.168.3.100:80> ServerAdmin webmaster@Accounting DocumentRoot C:/koha_src/koha-tmpl ServerName Accounting # ServerAlias opac.mydomain.com ScriptAlias /cgi-bin/koha/ "C:/koha_src/opac/" ScriptAlias /index.html "C:/koha_src/opac/opac-main.pl" ScriptAlias /opac-search.pl "C:/koha_src/opac/opac-search.pl" ScriptAlias /search "C:/koha_src/opac/opac-search.pl" ErrorLog C:/koha-dev/var/log/koha-opac-error_log # CustomLog C:/koha-dev/var/log/koha-opac-access_log combined # TransferLog C:/koha-dev/var/log/koha-opac-access_log SetEnv KOHA_CONF "C:/koha-dev/etc/koha-conf.xml" SetEnv PERL5LIB "C:/koha_src"
- NOTE: If running a 'dev' install the 'fix-perl-path.pl' must be run on the repo/etc. directory whereas the installer only runs it on the 'blib' directory. Failure to do this will result in the following error in the error log:
[Wed Oct 05 22:13:42 2011] [error] [client 192.168.3.100] (OS 3)The system cannot find the path specified. : couldn't create child process: 720003: mainpage.pl [Wed Oct 05 22:13:42 2011] [error] [client 192.168.3.100] (OS 3)The system cannot find the path specified. : couldn't spawn child process: [../../../koha_src/mainpage.pl C:/koha_src/mainpage.pl]
- ALTERNATE: As an alternate to the above path mods, you can move a copy of the perl executable to C:/usr/bin. This is actually preferrable on a development installation as it keeps GIT happy. (A thing greatly to be desired!)
- Install zebrasrv as a service by doing:
C:\Program Files\Zebra\bin>zebrasrv -install -l C:\koha-dev\var\log\zebrasrv-error_log
- Before starting your Zebra, be sure to:
- Comment/uncomment the correct listen directive lines in koha-conf.xml for win32.
- Fixup directory path separators in <xi:fallback> directives like this:
<xi:include href="C:/koha-dev/etc/zebradb/explain-biblios.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
- Kick-start your new Zebra in the same way you do all Windows services. Check the zebrasrv-error_log for clues if your zebra borks on you. You may also find such as this useful:
C:\Program Files\Zebra\bin>"C:\Program Files\Zebra\bin\zebrasrv.exe" -v fatal -l C:\koha-dev\var\log\zebrasrv-error_log -f C:\koha-dev\etc\koha-conf.xml