1 #!/usr/bin/perl -w # please develop with -w
7 # Copyright 2000-2002 Katipo Communications
9 # This file is part of Koha.
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License along with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA 02111-1307 USA
24 use strict; # please develop with the strict pragma
27 print "\n\nYou must run $0 as root.\n\n";
31 print "You must be root to run this script.\n";
35 my $kohaversion=`cat koha.version`;
39 if ($kohaversion =~ /RC/) {
45 WARNING WARNING WARNING WARNING WARNING
47 You are about to install Koha version $kohaversion. This version of Koha is a
48 release candidate. It is not intended to be installed on production systems.
49 It is being released so that users can test it before we release a final
53 print "Are you sure you want to install Koha $kohaversion? (Y/[N]): ";
58 if ($answer eq "Y" || $answer eq "y") {
59 print "Great! continuing setup... \n";
63 Watch for announcements of Koha releases on the Koha mailing list or the Koha
64 web site (http://www.koha.org/).
71 if (-e "/etc/koha.conf") {
72 my $installedversion=`grep kohaversion= /etc/koha.conf`;
73 chomp $installedversion;
74 $installedversion=~m/kohaversion=(.*)/;
76 if ($installedversion) {
77 $installedversion="You currently have Koha $installedversion on your system.\n";
79 $installedversion="I am not able to determine what version of Koha is installed now.\n";
83 ==========================
84 = Koha already installed =
85 ==========================
87 It looks like Koha is already installed on your system (/etc/koha.conf exists
88 already). If you would like to upgrade your system to $kohaversion, please use
89 the koha.upgrade script in this directory.
99 **********************************
100 * Welcome to the Koha Installer *
101 **********************************
102 Welcome to the Koha install script! This script will prompt you for some
103 basic information about your desired setup, then install Koha according to
104 your specifications. To accept the default value for any question, simply hit
107 Please be sure to read the documentation, or visit the Koha website at
108 http://www.koha.org for more information.
110 Are you ready to begin the installation? (Y/[N]):
113 my $answer = <STDIN>;
116 if ($answer eq "Y" || $answer eq "y") {
117 print "Great! continuing setup... \n";
120 This installer currently does not support a completely automated
123 Please be sure to read the documentation, or visit the Koha website
124 at http://www.koha.org for more information.
132 # Test for Perl and Modules
141 print "\nChecking perl modules ...\n";
142 unless (eval "require 5.004") {
143 die "Sorry, you need at least Perl 5.004\n";
147 unless (eval {require DBI}) { push @missing,"DBI" };
148 unless (eval {require Date::Manip}) { push @missing,"Date::Manip" };
149 unless (eval {require DBD::mysql}) { push @missing,"DBD::mysql" };
150 unless (eval {require MARC::Record}) { push @missing, "MARC::Record"};
152 unless (eval {require Net::Z3950}) {
155 The Net::Z3950 module is missing. This module is necessary if you want to use
156 Koha's Z39.50 client to download bibliographic records from other libraries.
157 To install this module, you will need the yaz client installed from
158 http://www.indexdata.dk/yaz/ and then you can install the perl module with the
161 perl -MCPAN -e 'install Net::Z3950'
163 Press the <ENTER> key to continue:
169 # Print out a list of any missing modules
173 print "You are missing some Perl modules which are required by Koha.\n";
174 print "Once these modules have been installed, rerun this installer.\n";
175 print "They can be installed by running (as root) the following:\n";
176 foreach my $module (@missing) {
177 print " perl -MCPAN -e 'install \"$module\"'\n";
180 print "All modules appear to be installed, continuing...\n";
186 my $domainname = `hostname -d`;
188 my $opacdir = '/usr/local/koha/opac';
189 my $kohadir = '/usr/local/koha/intranet';
191 while ($getdirinfo) {
192 # Loop until opac directory and koha directory are different
197 Please supply the directory you want Koha to store its OPAC files in. Leave off
198 the trailing slash. This directory will be auto-created for you if it doesn't
204 print "Enter directory [$opacdir]: ";
205 chomp($input = <STDIN>);
214 INTRANET/LIBRARIANS DIRECTORY
215 =============================
216 Please supply the directory you want Koha to store its Intranet/Librarians files
217 in. Leave off the trailing slash. This directory will be auto-created for you if
222 print "Enter directory [$kohadir]: ";
223 chomp($input = <STDIN>);
228 if ($kohadir eq $opacdir) {
231 You must specify different directories for the OPAC and INTRANET files!
244 my $hostname = 'localhost';
245 my $user = 'kohaadmin';
252 Koha uses a small configuration file that is placed in your /etc/ files
253 directory. The configuration file, will be created in this directory.
257 #Get the path to the koha.conf directory
258 #print "Enter the path to your configuration directory [$etcdir]: ";
259 #chomp($input = <STDIN>);
266 #Get the database name
269 Please provide the name of the mysql database for your koha installation.
270 This is normally "$dbname".
274 print "Enter database name [$dbname]: ";
275 chomp($input = <STDIN>);
282 #Get the hostname for the database
285 Please provide the hostname for mysql. Unless the database is located on another
286 machine this will be "localhost".
289 print "Enter hostname [$hostname]: ";
290 chomp($input = <STDIN>);
296 #Get the username for the database
299 Please provide the name of the user, who will have full administrative rights
300 to the $dbname database, when authenticating from $hostname.
302 If no user is entered it will default to $user.
305 print "Enter username [$user]:";
306 chomp($input = <STDIN>);
312 #Get the password for the database user
315 Please provide a good password for the user $user.
318 print "Enter password:";
319 chomp($input = <STDIN>);
329 print "Successfully created the Koha configuration file.\n";
334 foreach my $httpdconf (qw(/usr/local/apache/conf/httpd.conf
335 /usr/local/etc/apache/httpd.conf
336 /usr/local/etc/apache/apache.conf
337 /var/www/conf/httpd.conf
338 /etc/apache/conf/httpd.conf
339 /etc/apache/conf/apache.conf
340 /etc/apache-ssl/conf/apache.conf
341 /etc/httpd/conf/httpd.conf
342 /etc/httpd/httpd.conf)) {
343 if ( -f $httpdconf ) {
344 $realhttpdconf=$httpdconf;
345 open (HTTPDCONF, $httpdconf) or warn "Insufficient privileges to open $httpdconf for reading.\n";
346 while (<HTTPDCONF>) {
347 if (/^\s*User\s+"?([-\w]+)"?\s*$/) {
354 unless ($realhttpdconf) {
357 I was not able to find your apache configuration file. It is usually
358 called httpd.conf or apache.conf.
360 print "Where is your Apache configuratin file? ";
361 chomp($input = <STDIN>);
364 $realhttpdconf = $input;
368 if ( -f $realhttpdconf ) {
369 open (HTTPDCONF, $realhttpdconf) or warn "Insufficient privileges to open $realhttpdconf for reading.\n";
370 while (<HTTPDCONF>) {
371 if (/^\s*User\s+"?([-\w]+)"?\s*$/) {
379 unless ($httpduser) {
382 I was not able to determine the user that Apache is running as. This
383 information is necessary in order to set the access privileges correctly on
384 /etc/koha.conf. This user should be set in one of the Apache configuration
385 files using the "User" directive.
387 print "What is your Apache user? ";
388 chomp($input = <STDIN>);
393 $httpduser='Undetermined';
401 my $svr_admin = "webmaster\@$domainname";
402 my $servername=`hostname -f`;
409 OPAC and KOHA/LIBRARIAN CONFIGURATION
410 =====================================
411 Koha needs to setup your Apache configuration file for the
412 OPAC and LIBRARIAN virtual hosts. By default this installer
413 will do this by using one ip address and two different ports
414 for the virtual hosts. There are other ways to set this up,
415 and the installer will leave comments in httpd.conf detailing
416 what these other options are.
418 Please enter the e-mail address for your webserver admin.
422 print "Enter e-mail address [$svr_admin]:";
423 chomp($input = <STDIN>);
433 Please enter the domain name or ip address of your computer.
435 print "Enter server name/ip address [$servername]:";
436 chomp($input = <STDIN>);
439 $servername = $input;
444 Please enter the port for your OPAC interface.
446 print "Enter OPAC port [$opacport]:";
447 chomp($input = <STDIN>);
455 Please enter the port for your Intranet/Librarian interface.
457 print "Enter intranet port [$kohaport]:";
458 chomp($input = <STDIN>);
466 # Update Apache Conf File.
470 my $logfiledir=`grep ^ErrorLog $realhttpdconf`;
474 $logfiledir=~m#ErrorLog (.*)/[^/]*$#;
478 unless ($logfiledir) {
489 print "Checking for modules that need to be loaded...\n";
492 my $includesmodule=0;
493 open HC, $realhttpdconf;
495 if (/^\s*#\s*LoadModule env_module /) {
497 print " Loading env_module in httpd.conf\n";
500 if (/^\s*#\s*LoadModule includes_module /) {
502 print " Loading includes_module in httpd.conf\n";
504 if (/\s*LoadModule includes_module / ) {
510 my $apachebackupmade=0;
511 if ($envmodule || $includesmodule) {
512 system("mv -f $realhttpdconf $realhttpdconf\.prekoha");
514 open HC, ">$realhttpdconf";
520 if (`grep 'VirtualHost $servername' $realhttpdconf`) {
522 $realhttpdconf appears to already have an entry for Koha
523 Virtual Hosts. You may need to edit $realhttpdconf
524 if anything has changed since it was last set up. This
525 script will not attempt to modify an existing Koha apache
529 print "Press <ENTER> to continue...";
533 unless ($apachebackupmade) {
534 system("cp -f $realhttpdconf $realhttpdconf\.prekoha");
536 my $includesdirectives='';
537 if ($includesmodule) {
538 $includesdirectives.="Options +Includes\n";
539 $includesdirectives.=" AddHandler server-parsed .html\n";
541 open(SITE,">>$realhttpdconf") or warn "Insufficient priveleges to open $realhttpdconf for writing.\n";
545 # Ports to listen to for Koha
549 # NameVirtualHost is used by one of the optional configurations detailed below
551 #NameVirtualHost 11.22.33.44
553 # KOHA's OPAC Configuration
554 <VirtualHost $servername\:$opacport>
555 ServerAdmin $svr_admin
556 DocumentRoot $opacdir/htdocs
557 ServerName $servername
558 ScriptAlias /cgi-bin/koha/ $opacdir/cgi-bin/
559 ErrorLog $logfiledir/opac-error_log
560 TransferLog $logfiledir/opac-access_log
561 SetEnv PERL5LIB "$kohadir/modules"
565 # KOHA's INTRANET Configuration
566 <VirtualHost $servername\:$kohaport>
567 ServerAdmin $svr_admin
568 DocumentRoot $kohadir/htdocs
569 ServerName $servername
570 ScriptAlias /cgi-bin/koha/ "$kohadir/cgi-bin/"
571 ErrorLog $logfiledir/koha-error_log
572 TransferLog $logfiledir/koha-access_log
573 SetEnv PERL5LIB "$kohadir/modules"
577 # If you want to use name based Virtual Hosting:
578 # 1. remove the two Listen lines
579 # 2. replace $servername\:$opacport wih your.opac.domain.name
580 # 3. replace ServerName $servername wih ServerName your.opac.domain.name
581 # 4. replace $servername\:$kohaport wih your intranet domain name
582 # 5. replace ServerName $servername wih ServerName your.intranet.domain.name
584 # If you want to use NameVirtualHost'ing (using two names on one ip address):
585 # 1. Follow steps 1-5 above
586 # 2. Uncomment the NameVirtualHost line and set the correct ip address
594 Intranet Authentication
595 =======================
597 I can set it up so that the Intranet/Librarian site is password protected.
599 print "Would you like to do this? ([Y]/N): ";
600 chomp($input = <STDIN>);
602 my $apacheauthusername='librarian';
603 my $apacheauthpassword='';
604 unless ($input=~/^n/i) {
605 print "\nEnter a userid to login with [$apacheauthusername]: ";
606 chomp ($input = <STDIN>);
608 $apacheauthusername=$input;
609 $apacheauthusername=~s/[^a-zA-Z0-9]//g;
611 while (! $apacheauthpassword) {
612 print "\nEnter a password for the $apacheauthusername user: ";
613 chomp ($input = <STDIN>);
615 $apacheauthpassword=$input;
617 if (!$apacheauthpassword) {
618 print "\nPlease enter a password.\n";
621 open AUTH, ">/etc/kohaintranet.pass";
622 my $chars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
623 my $salt=substr($chars, int(rand(length($chars))),1);
624 $salt.=substr($chars, int(rand(length($chars))),1);
625 print AUTH $apacheauthusername.":".crypt($apacheauthpassword, $salt)."\n";
630 AuthUserFile /etc/kohaintranet.pass
632 AuthName "Koha Intranet (for librarians only)"
640 print "Successfully updated Apache Configuration file.\n";
645 SETTING UP Z39.50 DAEMON
646 ========================
649 my $kohalogdir='/var/log/koha';
650 print "Directory for logging by Z39.50 daemon [$kohalogdir]: ";
651 chomp($input = <STDIN>);
656 unless (-e "$kohalogdir") {
657 my $result = mkdir "$kohalogdir", 0770;
659 my @dirs = split(m#/#, $kohalogdir);
663 unless (-e "$checkdir") {
664 mkdir($checkdir, 0775);
671 # Setup the modules directory
675 CREATING REQUIRED DIRECTORIES
676 =============================
681 unless ( -d $kohadir ) {
682 print "Creating $kohadir...\n";
683 my $result=mkdir ($kohadir, 0770);
685 my @dirs = split(m#/#, $kohadir);
689 unless (-e "$checkdir") {
690 mkdir($checkdir, 0775);
694 chown (0, (getgrnam($httpduser))[2], "$kohadir");
695 chmod (0770, "$kohadir");
697 unless ( -d "$kohadir/htdocs" ) {
698 print "Creating $kohadir/htdocs...\n";
699 mkdir ("$kohadir/htdocs", 0750);
701 unless ( -d "$kohadir/cgi-bin" ) {
702 print "Creating $kohadir/cgi-bin...\n";
703 mkdir ("$kohadir/cgi-bin", 0750);
705 unless ( -d "$kohadir/modules" ) {
706 print "Creating $kohadir/modules...\n";
707 mkdir ("$kohadir/modules", 0750);
709 unless ( -d "$kohadir/scripts" ) {
710 print "Creating $kohadir/scripts...\n";
711 mkdir ("$kohadir/scripts", 0750);
713 unless ( -d $opacdir ) {
714 print "Creating $opacdir...\n";
715 my $result=mkdir ($opacdir, 0770);
717 my @dirs = split(m#/#, $opacdir);
721 unless (-e "$checkdir") {
722 mkdir($checkdir, 0775);
726 chown (0, (getgrnam($httpduser))[2], "$opacdir");
727 chmod (0770, "$opacdir");
729 unless ( -d "$opacdir/htdocs" ) {
730 print "Creating $opacdir/htdocs...\n";
731 mkdir ("$opacdir/htdocs", 0750);
733 unless ( -d "$opacdir/cgi-bin" ) {
734 print "Creating $opacdir/cgi-bin...\n";
735 mkdir ("$opacdir/cgi-bin", 0750);
740 print "\n\nINSTALLING KOHA...\n";
741 print "\n\n==================\n";
742 print "Copying internet-html files to $kohadir/htdocs...\n";
743 system("cp -R intranet-html/* $kohadir/htdocs/");
744 print "Copying intranet-cgi files to $kohadir/cgi-bin...\n";
745 system("cp -R intranet-cgi/* $kohadir/cgi-bin/");
746 print "Copying script files to $kohadir/scripts...\n";
747 system("cp -R scripts/* $kohadir/scripts/");
748 print "Copying module files to $kohadir/modules...\n";
749 system("cp -R modules/* $kohadir/modules/");
750 print "Copying opac-html files to $opacdir/htdocs...\n";
751 system("cp -R opac-html/* $opacdir/htdocs/");
752 print "Copying opac-cgi files to $opacdir/cgi-bin...\n";
753 system("cp -R opac-cgi/* $opacdir/cgi-bin/");
755 system("chown -R root.$httpduser $opacdir");
756 system("chown -R root.$httpduser $kohadir");
760 #Create the configuration file
761 open(SITES,">$etcdir/koha.conf") or warn "Couldn't create file
762 at $etcdir. Must have write capability.\n";
768 intrahtdocs=$kohadir/cgi-bin/koha-tmpl/intranet-tmpl
769 opachtdocs=$kohadir/cgi-bin/koha-tmpl/opac-tmpl
770 kohalogdir=$kohalogdir
771 kohaversion=$kohaversion
778 # Set ownership of the koha.conf file for security
780 chown((getpwnam($httpduser)) [2,3], "$etcdir/koha.conf") or warn "can't chown koha.conf: $!";
781 chmod 0440, "$etcdir/koha.conf";
791 my $mysqluser = 'root';
794 foreach my $mysql (qw(/usr/local/mysql
806 To allow us to create the koha database please supply the
807 mysql\'s root users password
811 while ($needpassword) {
812 print "Enter mysql\'s root users password: ";
813 chomp($input = <STDIN>);
815 my $result=system("$mysqldir/bin/mysqladmin -u$mysqluser -p$mysqlpass proc > /dev/null 2>&1");
817 print "\n\nInvalid password for the MySql root user.\n\n";
829 my $result=system("$mysqldir/bin/mysqladmin -u$mysqluser -p$mysqlpass create $dbname");
831 print "\nCouldn't connect to the MySQL server for the reason given above.\n";
832 print "This is a serious problem, the database will not get installed.
\a\n";
833 print "Press <ENTER> to continue...";
837 system("$mysqldir/bin/mysql -u$mysqluser -p$mysqlpass $dbname < koha.mysql");
838 system("$mysqldir/bin/mysql -u$mysqluser -p$mysqlpass mysql -e \"insert into user (Host,User,Password) values ('$hostname','$user',password('$pass'))\"\;");
839 system("$mysqldir/bin/mysql -u$mysqluser -p$mysqlpass mysql -e \"insert into db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv, index_priv, alter_priv) values ('%','$dbname','$user','Y','Y','Y','Y','Y','Y','Y','Y')\"");
840 system("$mysqldir/bin/mysqladmin -u$mysqluser -p$mysqlpass reload");
842 system ("perl -I $kohadir/modules scripts/updater/updatedatabase");
849 If you are installing Koha for evaluation purposes, I have a batch of sample
850 data that you can install now.
852 If you are installing Koha with the intention of populating it with your own
853 data, you probably don't want this sample data installed.
855 print "\nWould you like to install the sample data? Y/[N]: ";
856 chomp($input = <STDIN>);
857 if ($input =~/^y/i) {
858 system("gunzip sampledata-1.2.gz");
859 system("cat sampledata-1.2 | $mysqldir/bin/mysql -u$mysqluser -p$mysqlpass $dbname");
860 system("gzip -9 sampledata-1.2");
861 system("$mysqldir/bin/mysql -u$mysqluser -p$mysqlpass $dbname -e \"insert into branches (branchcode,branchname,issuing) values ('MAIN', 'Main Library', 1)\"");
862 system("$mysqldir/bin/mysql -u$mysqluser -p$mysqlpass $dbname -e \"insert into printers (printername,printqueue,printtype) values ('Circulation Desk Printer', 'lp', 'hp')\"");
865 Sample data has been installed. For some suggestions on testing Koha, please
866 read the file doc/HOWTO-Testing. If you find any bugs, please submit them at
867 http://bugs.koha.org/. If you need help with testing Koha, you can post a
868 question through the koha-devel mailing list, or you can check for a developer
869 online at +irc.katipo.co.nz:6667 channel #koha.
871 You can find instructions for subscribing to the Koha mailing lists at:
876 Press <ENTER> to continue...
880 print "\n\nWould you like to add a branch and printer? [Y]/N: ";
881 chomp($input = <STDIN>);
884 unless ($input =~/^n/i) {
885 my $branch='Main Library';
886 print "Enter a name for the library branch [$branch]: ";
887 chomp($input = <STDIN>);
891 $branch=~s/[^A-Za-z0-9\s]//g;
892 my $branchcode=$branch;
893 $branchcode=~s/[^A-Za-z0-9]//g;
894 $branchcode=uc($branchcode);
895 $branchcode=substr($branchcode,0,4);
896 print "Enter a four letter code for your branch [$branchcode]: ";
897 chomp($input = <STDIN>);
901 $branchcode=~s/[^A-Z]//g;
902 $branchcode=uc($branchcode);
903 $branchcode=substr($branchcode,0,4);
904 print "Adding branch '$branch' with code '$branchcode'.\n";
905 system("$mysqldir/bin/mysql -u$mysqluser -p$mysqlpass $dbname -e \"insert into branches (branchcode,branchname,issuing) values ('$branchcode', '$branch', 1)\"");
906 my $printername='Library Printer';
907 print "Enter a name for the printer [$printername]: ";
908 chomp($input = <STDIN>);
912 $printername=~s/[^A-Za-z0-9\s]//g;
913 my $printerqueue='lp';
914 print "Enter the queue for the printer [$printerqueue]: ";
915 chomp($input = <STDIN>);
917 $printerqueue=$input;
919 $printerqueue=~s/[^A-Za-z0-9]//g;
920 system("$mysqldir/bin/mysql -u$mysqluser -p$mysqlpass $dbname -e \"insert into printers (printername,printqueue,printtype) values ('$printername', '$printerqueue', '')\"");
929 UPDATING DATABASE (MARC TABLES)
930 ===============================
934 while ($answer ne "1" && $answer ne "2" && $answer ne "3") {
936 You can import marc parameters for :
937 1- english marc21 or for
940 Please choose which parameter you want to install. Note if you choose 3, nothing will be added, and it can be a BIG job to manually create those tables
945 if ($answer eq "1") {
946 system("cat script/misc/marc_datas/marc21_en/structure_def.sql | $mysqldir/bin/mysql -u$mysqluser -p$mysqlpass $dbname");
948 if ($answer eq "2") {
949 system("cat scripts/misc/marc_datas/unimarc_fr/structure_def.sql | $mysqldir/bin/mysql -u$mysqluser -p$mysqlpass $dbname");
950 system("cat scripts/misc/lang-datas/fr/stopwords.sql | $mysqldir/bin/mysql -u$mysqluser -p$mysqlpass $dbname");
953 #system ("perl -I $kohadir/modules scripts/marc/fill_usmarc.pl");
954 system ("perl -I $kohadir/modules scripts/marc/updatedb2marc.pl");
956 chmod 0770, $kohalogdir;
957 chown((getpwnam($httpduser)) [2,3], $kohalogdir) or warn "can't chown $kohalogdir: $!";
960 print "Modifying Z39.50 daemon launch script...\n";
962 open (L, "$kohadir/scripts/z3950daemon/z3950-daemon-launch.sh");
965 $newfile.="RunAsUser=$httpduser\n";
966 } elsif (/^KohaZ3950Dir=/) {
967 $newfile.="KohaZ3950Dir=$kohadir/scripts/z3950daemon\n";
973 system("mv $kohadir/scripts/z3950daemon/z3950-daemon-launch.sh $kohadir/scripts/z3950daemon/z3950-daemon-launch.sh.orig");
974 open L, ">$kohadir/scripts/z3950daemon/z3950-daemon-launch.sh";
980 print "Modifying Z39.50 daemon wrapper script...\n";
982 open (S, "$kohadir/scripts/z3950daemon/z3950-daemon-shell.sh");
984 if (/^KohaModuleDir=/) {
985 $newfile.="KohaModuleDir=$kohadir/modules\n";
986 } elsif (/^KohaZ3950Dir=/) {
987 $newfile.="KohaZ3950Dir=$kohadir/scripts/z3950daemon\n";
988 } elsif (/^LogDir=/) {
989 $newfile.="LogDir=$kohalogdir\n";
996 system("mv $kohadir/scripts/z3950daemon/z3950-daemon-shell.sh $kohadir/scripts/z3950daemon/z3950-daemon-shell.sh.orig");
997 open S, ">$kohadir/scripts/z3950daemon/z3950-daemon-shell.sh";
1000 chmod 0750, "$kohadir/scripts/z3950daemon/z3950-daemon-launch.sh";
1001 chmod 0750, "$kohadir/scripts/z3950daemon/z3950-daemon-shell.sh";
1002 chmod 0750, "$kohadir/scripts/z3950daemon/processz3950queue";
1003 chown(0, (getpwnam($httpduser)) [3], "$kohadir/scripts/z3950daemon/z3950-daemon-shell.sh") or warn "can't chown $kohadir/scripts/z3950daemon/z3950-daemon-shell.sh: $!";
1004 chown(0, (getpwnam($httpduser)) [3], "$kohadir/scripts/z3950daemon/processz3950queue") or warn "can't chown $kohadir/scripts/z3950daemon/processz3950queue: $!";
1013 Congratulations ... your Koha installation is almost complete!
1014 The final step is to restart your webserver.
1016 You will be able to connect to your Librarian interface at:
1018 http://$servername\:$kohaport/
1020 and the OPAC interface at :
1022 http://$servername\:$opacport/
1025 Be sure to read the INSTALL, and Hints files.
1027 For more information visit http://www.koha.org
1029 Would you like to restart your webserver now? (Y/[N]):
1032 my $restart = <STDIN>;
1035 if ($restart=~/^y/i) {
1036 # Need to support other init structures here?
1037 if (-e "/etc/rc.d/init.d/httpd") {
1038 system('/etc/rc.d/init.d/httpd restart');
1039 } elsif (-e "/etc/init.d/apache") {
1040 system('/etc//init.d/apache restart');
1041 } elsif (-e "/etc/init.d/apache-ssl") {
1042 system('/etc/init.d/apache-ssl restart');
1046 Congratulations ... your Koha installation is complete!
1047 You will need to restart your webserver before using Koha!