1 #!/usr/bin/perl -w # please develop with -w
3 use strict; # please develop with the strict pragma
6 **********************************
7 * Welcome to the Koha Installer *
8 **********************************
13 This installer will prompt you with a series of questions.
14 It assumes you (or your system administrator) has installed:
15 * Apache (http://www.apache.org)
16 * Perl (http://www.perl.org)
19 and one of the following database applications:
20 * MySql (http://www.mysql.org)
23 on some type of Unix or Unix-like operating system
27 Is Apache, Perl, and a database from the list above installed on this system?
34 if ($answer eq "Y" || $answer eq "y") {
38 You will need to setup database space for your application.
39 The installer currently does not support an automated setup with this database.
40 Please be sure to read the documentation.
45 print "I need to unpack the Koha TarFile -- where is it? ";
49 # FIXME? using system is probably not the best way to do this
50 # tar on solaris may not work properly, etc.
51 system("tar -x $answer"); #unpack fill out
54 #test for Perl and Apache?
55 print "Are you using MySql?[Y/N]: ";
59 system("mysqladmin -uroot -ppassword create $KohaDBNAME ");
60 system("mysql -u$root -p$password ");
61 #need to get to mysql prompt HOW DO I DO THIS?
64 # you could pipe this into mysql in the shell that system generates
65 # can this be done from dbi?
66 system("grant all privileges on Koha.* to koha@localhost identified by 'kohapassword'; ");
71 You will need to use the MySQL database system for your application.
72 The installer currently does not support an automated setup with this database.
77 system ("perl updatedatabase -I /pathtoC4 ");
81 # is there a reason we don't just create the conf file here?
84 You will need to add the following to the Koha configuration file\n";
86 hostname=localhost\n";
89 includes=/usr/local/www/koha/htdocs/includes\n";
93 # <VirtualHost opac.your.site>
94 # ServerAdmin webmaster@your.site
95 # DocumentRoot /usr/local/www/opac/htdocs
96 # ServerName opac.your.site
97 # ErrorLog logs/opac-error_log
98 # TransferLog logs/opac-access_log
104 # this is a pretty rude thing to do on a system ...
105 # perhaps asking the user first would be better.
107 system('/etc/rc.d/init.d/httpd restart');