correct upstream of Plack::Middle::Debug::Profiler::NYTProf
[koha.git] / INSTALL
diff --git a/INSTALL b/INSTALL
index aebe681..ffe69ae 100644 (file)
--- a/INSTALL
+++ b/INSTALL
-Koha - Requirements and quick-start installation guide
+Koha 3 - the next-generation release of the award-winning Koha open-source
+integrated library system.
+
+Koha is the first open-source Integrated Library System. Developed initially in
+New Zealand by Katipo Communications, Ltd and first deployed in January of 2000
+for the Horowhenua Library Trust, it is currently maintained by a team of
+software providers and library technology staff from around the globe. Learn
+more about the Koha project at http://koha-community.org.
+
+INSTALLATION
+============
+
+You need to have a server running Perl 5.10 or later, MySQL 5, Zebra
+2.0.22 or greater and a webserver (preferably Apache2) before installing
+Koha.
+
+MySQL 5: Create a database called 'koha,' owned by 'kohaadmin'
+user, with a password set. Note: kohaadmin must have at least the
+following privileges: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP,
+ALTER, and LOCK TABLES.
+
+Default installation instructions:
+
+1. perl Makefile.PL
+  (you will be prompted to answer a number of questions and you will
+  need to install some Perl dependencies)
+  WARNING:
+
+  1.1 recent versions of CGI::Session have caused some issues for users;
+  as of this release date, we suggest downloading the CGI::Session::serialize::yaml
+  tarball direct from CPAN and install it directly rather than using the cpan command
+
+  1.2. Optional foreign language installation:
+  If you would like more languages and not only English,
+    cd misc/translator
+    perl translate install fr-FR # or use your preferred language codes
 
-INSTALL document included with [Koha]
+2. make
+3.(optional) make test
+4. sudo make install
+5. sudo ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha
+  (note that the path to koha-httpd.conf may be different depending on your
+  installation choices)
+6. sudo a2enmod rewrite deflate
+7. sudo a2ensite koha && /etc/init.d/apache2 reload
+8. sudo zebrasrv -f /etc/koha/koha-conf.xml
+  (note that you will want to run Zebra in daemon mode for a production
+  system)
+9. Browse to http://servername:8080/ and answer the questions
+10. Optionally add a robots.txt file.  See README.robots for details
 
-For information on how to install Koha without requiring multiple virtual servers - See KohaAllInOne. 
-For additional information on how your Configuration files should look see the Hints file.
+OR if you want to install all dependencies from CPAN and are root, you can
+replace steps 1-3 with "perl install-CPAN.pl" but this is non-standard and
+may not be safe.  Nevertheless, it's pretty cool when it works.
 
-Important....
-To successfully use Koha you need some additional software:
+The defaults will install Koha to places that follow relevant standards,
+such as the File Hierarchy Standard.  If you want to install Koha to a
+different directory like /opt/koha, then replace step 1 with (for example):
 
-A webserver (It was built to work with Apache, but there is no reason it shouldnt work with any other webserver). 
-Mysql (You could intead use postgres, or another sql based database) 
-Perl (mod_perl isnt needed, tho koha should work with mod_perl but this hasnt been tested yet). 
+1. perl Makefile.PL INTRANET_CGI_DIR=/www/cgi-bin
 
-Perl Modules:
+You can change most of the defaults in a similar way, such as DB_HOST.
+For full instructions on how to override the default settings, run
 
-Date::Manip 
-DBI 
-Set::Scalar 
-DBD::mysql (or whatever database system you use) 
-AuthenDBI (if you want to use Database based authentication) 
-CDK (for the telnet interface not nessecary if you plan to use the web based circulation module) also requires installation of the C CDK libraries http://www.vexus.ca/CDK.html ( CDKModuleHasProblems ) 
-File::Spec
-HTML::Template
+$ perldoc rewrite-config.PL
 
---------------------------------------------------------------------------------
+UPGRADE
+=======
+If you are running in another language other than english, please
+switch to english before doing the upgrade, the templating system has
+changed and the templates will need to be regenerated.
+Once you have upgraded, please regenerate your templates in your
+chosen languages.
 
+If you are upgrading from a previous installation of Koha 3.x, you can
+use the following:
 
-Quick-start Installation Guide
-(Assumes the Use of MySQL and Apache)
+ ./koha_perl_deps.pl -u -m # to identify new Perl dependencies
 
-1. Create a new mysql database called for example Koha
-From command line: mysqladmin -uroot -ppassword create Koha 
-There is a databse installation shell script included with the Koha tarball.
+Install any missing modules
+IMPORTANT: Koha 3.4.0 and greater uses Template::Toolkit, this must be installed
+before the webinstaller can run
 
-2. Set up a koha user and password in mysql
-Log in to mysql: mysql -uroot -ppassword 
+On debian/ubuntu
+ sudo apt-get install libtemplate-perl
 
-To create a user called "koha" who has full administrative rights to the "Koha" database when autheicting from "localhost", enter the following on mysql command line:
+Other Linux/Unix platforms
+Use the packaged version or install from CPAN
+  cpan Template
 
-grant all privileges on Koha.* to koha@localhost identified by 'kohapassword'; 
+ perl Makefile.PL --prev-install-log /path/to/koha-install-log
+ make
+ make test
+ sudo make upgrade
 
-Press ENTER, and if you see no errors then enter \q to quit mysql.
+Koha 3.4.x or later  no longer stores items in biblio records.
+If you are upgrading from an older version ou will need to do the
+following two steps, they can take a long time (several hours) to
+complete for large databases
 
+ misc/maintenance/remove_items_from_biblioitems.pl --run
+ misc/migration_tools/rebuild_zebra.pl -b -r
 
-3. Use the mysql script to create the tables
-mysql -uusername -ppassword Koha < koha.mysql 
+WHAT NEXT?
 
-3.1 Update your database tables
-perl updatedatabase -I /pathtoC4 
+1. Running the Web Installer allows you to install sample data for libraries, patrons, etc.
+    but you may want to install additional data such as bibliographic and authorities.
 
-4. Edit koha.conf
-Set the database name to what you have called your database, hostname willprobably stay as localhost (unless you are installing the database on a different machine to the webserver) User and password should be changed to reflect the username and password you have chosen above.
+    Once the installer has completed, you can import and index MARC records from the
+    command line thusly (Note: you can also use the 'Stage MARC records for import' from
+    the Tools area of Koha's Staff Client to import a batch of MARC records):
 
-You can include a line called "includes= " with path to your includes folder instead of entering the path in Output.pm - see example in KohaHints.
+    $ export KOHA_CONF=/usr/share/koha/etc/koha-conf.xml
+      (note: use the correct path to your koha-conf.xml)
 
+2. Import:
+    Bibliographic data in MARC21 format
+    $ misc/migration_tools/bulkmarcimport.pl -file /path/to/marc.iso2709
+    Authority data in MARC21 format
+    $ misc/migration_tools/bulkauthimport.pl -file /path/to/auth.iso2709
 
-5. Copy koha.conf to /etc/
-The permissions on this config file should also be strict, since they contain the database password. At a minimum, the apache user needs to be able to read it, as well as any other user that runs circ.
-I would suggest ownership of www-data.libadmins with no access to others.libadmins contain all users that use koha (If you set the owner as www-data u will need to make sure apache is running
-as www-data)
+3. Fast Index:
+    $ misc/migration_tools/rebuild_zebra.pl -b -w
 
-6. Create directories for scripts and html documents.
-Here you need to decide where your scripts and html are going to live.
-And edit C4/Output.pm to reflect that.
-Set $path= where your includes live,
-for example: $path="/usr/local/www/koha/htdocs/includes";
+    Once the indexing has completed, you will be able to search for records in your
+    system. NOTE: if you don't run the Fast Index utility, and you have the index
+    updates scheduled as per 7.3 the indexing process will happen in the background,
+    but it will be orders of magnitude slower.
 
-You do not need to do that if you have already entered the includes path in koha.conf (see example above) 
+4. Schedule regular index updates
+    run rebuild_zebra.pl -b -a -z as a regular cron job, check the 'misc/cronjobs/crontab.example' file for usage examples
 
-Next copy the C4 directory (in scripts/) to somewhere in your perl path
-eg /usr/local/lib/site_perl/i386-linux/
+    You can also configure zebra-indexing as an background daemon, see http://wiki.koha-community.org/wiki/Background_indexing_with_Zebra
 
-If you do not have sufficient access to copy the files to the default perl folder (maybe you are using your ISPs hosting server) then you can copy the modules to any other location and add a line to apache.conf like:
+5. To enable public Z39.50/SRU servers, you'll need to edit your koha-conf.xml and
+    change the <listen> options to listen on a TCP port; then restart the zebra daemon.
 
-SetEnv? PERL5LIB "/usr/local/www/koha/modules"
 
-Copy the C4 directory into the modules folder (see detailed example in KohaHints)
+IF YOU HAVE PROBLEMS
+====================
 
+IF THIS IS A PRE-RELEASE TREE: please contact developers by email via
+http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
+or
+http://dir.gmane.org/gmane.education.libraries.koha.devel
 
-7. Set up your Online Public Access Catalogue (OPAC)
+IF THIS IS A RELEASED VERSION: please see the support pages at
+http://www.koha-community.org/
 
-Set up a webspace for the OPAC: For example: You might make /usr/local/www/opac ... and set a virtual host in apache to use that dir 
-In your opac dir make a dir called htdocs, and copy everything in opac-html/ to it. 
-Again in ur opac dir make a dir called cgi-bin and copy all the files in scripts/ that have a .pl extension to it, eg copy scripts/*.pl /usr/local/www/opac/cgi-bin/koha/ 
-Your virtual host should be set up to use these dirs, some thing like this: 
+Released versions usually have three-digit numbers, like 3.06.00,
+while other version number styles are usually snapshots or previews.
 
 
-   <VirtualHost opac.your.site>                         
-   ServerAdmin webmaster@your.site                            
-   DocumentRoot /usr/local/www/opac/htdocs                     
-   ServerName opac.your.site                      
-   ErrorLog logs/opac-error_log       
-   TransferLog logs/opac-access_log               
-   </VirtualHost>
+DEVELOPER NOTES
+===============
 
-
-When finished, restart apache and point your browser at opac.your.site and it should be all go (of course - if you dont have any data in the database there wont be much to see!) 
-
-Find supplementary information and config examples in KohaHints
-
-8. Set up the intranet/librarian interface
-
-Create new directories and additional httpd.conf changes to Set up another webspace. Lets call it koha. 
-For example:
-
-In the dir you have just created make an htdocs dir and a cgi-bin dir 
-Copy everything in intranet-html/ to the htdocs dir 
-Copy all the .pl files in scripts/ to the cgi-bin/koha dir 
-Make sure ur virtual host is set up to use these dirs 
-Restart apache point your browser at koha.your.site and it should work 
-
-
-9. Configure SECURITY for the Librarians/Intranet Interface
-If you are using AuthenDBI to do your authentication, you will need to add some users to the users table in the koha database. And edit your apache conf file to use AuthenDBI on the intranet site.
-
-Otherwise, set up htaccess files in both koha/htdocs/ and koha/cgi-bin You can use general .htaccess based security. It is important though to password protect the librarians interface because from it you can delete and add items, remove borrowers fines and generally case havoc.
-
-
-10. Set up Issues, Returns and Telnet interface.
-Since we have already copied the files in scripts/C4 into somewhere in our perl source tree
-
-We just need to now copy the scripts from scripts/telnet/ into somewhere in the executable path, eg /usr/local/bin
-
-Then its done: type circ and your away, ready to issue and return.
-
-In release 1.1.0 on there is now a webbased circulation module, So issues and returns can be done from there, or from circ.
-
-
-You will find some Koha config examples in KohaHints 
-
-
-Check out KohaMiniFAQ for general, supplementary information. 
+For instructions on how to package releases, run perldoc Makefile.PL