Installing Koha on Mac OS X

Stephen Hedges

This document is related to Koha and is licensed to you under the GNU General Public License version 2 or later (http://www.gnu.org/licenses/gpl.html).

Koha-related documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies.

You may create a derivative work and distribute it provided that you:

  1. License the derivative work with this same license, or the Linux Documentation Project License (http://www.tldp.org/COPYRIGHT.html). Include a copyright notice and at least a pointer to the license used.

  2. Give due credit to previous authors and major contributors.

Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions.

No liability for the contents of this document can be accepted. Use the concepts, examples and information at your own risk. There may be errors and inaccuracies, that could be damaging to your system. Proceed with caution, and although this is highly unlikely, the author(s) do not take any responsibility.

All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements.

2006-01-25

Revision History
Revision 2.2.5 2006-01-25 sh

Initial version


1. Introduction
2. Support programs and utilities
2.1. Linux
2.2. Apache
2.3. MySQL
2.4. Perl
3. Installing Koha -- first pass
3.1. Perl modules
4. Installing Koha -- second pass
5. Modifying the httpd.conf files

1. Introduction

Most of Koha will work on the Mac OS X operating system, so long as you have version 10.2 or higher. Earlier versions of OS X do not support some of the other programs that Koha uses, particularly MySQL. The one part of Koha that you will not be able to install is the Z39.50 client. That is because the current version of Koha (2.2.5) uses the Net::Z3950 Perl module, which in turn depends on the Event module, which has not been ported to OS X. This should be remedied in the future, beginning with Koha version 3.0.

Because of this and some other limitations, I would not advise using Koha on OS X in a production environment. Until the next version of Koha is released, it is best to consider your Koha installation as a test-bed for experimenting with Koha. Version 3.0 will have enough stability on OS X to be used in production.

If you have OS X Server, some of the support programs that you need to run Koha will already be on your computer; if you do not, these instructions will help you get what you need to have. These instructions were developed in the course of installing Koha 2.2.5 on standard Mac OS X v10.3.9.

Special thanks to Adam Steer for sharing his experiences with Koha on Mac OS X.

2. Support programs and utilities

Koha is a L.A.M.P application -- meaning that it is developed for use on systems running Linux, Apache, MySQL, and Perl. While other configurations are possible if you make modifications to Koha, these instructions assume that Koha will be installed without major modifications. So the first step is to set up your Mac OS X computer with all the programs and utilities necessary to run a L.A.M.P application.

2.1. Linux

Mac OS X is essentially a Linux OS (based loosely on FreeBSD), so technically you already have Linux. However, you may not have X11 and the developer tools, both of which will give you more complete Linux capabilities and make some aspects of Koha easier to manage.

To check to see if you have X11 on your Mac, go to Applications>Utilities and look for X11. If it is not there, you can download it from www.apple.com/downloads/macosx/apple/x11formacosx.html.

To install developer tools, go to Applications>Installers>Xcode Tools and open the Developer.mpkg package. If the package is not there, you can download it from developer.apple.com/tools.

Note

The Apple website tends to change fairly often, so don't be surprised if the URLs above do not work and you have to search to find the current download sites.

2.2. Apache

This one is easy. If you haven't already done so, go to System Preferences>Sharing and turn on Personal Web Sharing.

Figure 1. Personal Web Sharing

Personal Web Sharing

If you prefer working from a terminal window, you can also do:

emac:~ admin$ sudo apachectl start

Be ready to supply your administrator password (the one you use to apply system updates from Apple).

The web server configuration file, by the way, can be found at /etc/httpd/httpd.conf. You will need to modify it after you install Koha.

2.3. MySQL

Releases of MySQL are available as .dmg files from http://downloads.mysql,com, meaning they are easy to install; however, the newer releases of MySQL can cause problems with Koha. Starting with version 4.1.x, MySQL uses a new password hash that is not compatible with the Koha code. There's an explanation of this problem at http://dev.mysql.com/doc/refman/4.1/en/old-client.html. Beginning with version 5.0, MySQL treats return as a reserved word; unfortunately, Koha uses return as a data column name, so MySQL 5.0.x is unusable with Koha (at this writing, at least).

The password problems and some other MySQL limitations can be avoided by downloading the OS X installer version of MySQL 4.1.16 from http://dev.mysql.com/downloads/mysql/4.1.html. Install both the MySQL package and the StartupItem package, then restart your computer. MySQL is now started. Before we install Koha, we'll do some things to work around the Koha limitations.

(If you are running Mac OS X Server, you are in luck -- MySQL is already on your machine. Just go to Applications>Server>MySQL Manager to access it. But be aware of the problems with versions later than 4.1. Generally, if your OS X Server is earlier than version 10.4, you'll have no problems, otherwise you'll need to take the following steps to work around the Koha limitations.)

Make a note of the root password for your MySQL -- you will need it when you install Koha. (In fact, if you just installed MySQL, I recommend that you leave the root password blank until after you have installed Koha.)

To make it easier to access MySQL later, you might want to set an alias or modify your PATH environment. For `tcsh' use:

alias mysql /usr/local/mysql/bin/mysql
alias mysqladmin /usr/local/mysql/bin/mysqladmin

Even better, add /usr/local/mysql/bin to your `PATH' environment variable by adding the following line to your `$HOME/.tcshrc' file if your shell is `tcsh':

setenv PATH ${PATH}:/usr/local/mysql/bin

For `bash', use:

alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin

Now go to a terminal window and access mysql as root:

[emac:~] admin% mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22 to server version: 4.1.16-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

From this mysql> prompt, enter GRANT ALL PRIVILEGES ON *.* to 'kohaadmin'@'localhost' IDENTIFIED BY 'xxxxxxxx'; where the x's are replaced by a password. This assumes that you are going to use the default "kohaadmin" user name for your database and will refer to your computer as "localhost" when running Koha. (Note that the Koha installer will try to grab whatever your Mac calls itself -- "emac" in our example -- so remember to use "localhost" when the installer prompts you for this information.) Make a note of the password you choose, the installer will ask for it.

Next we need to keep the installer from trying to set up this same account. When you unzip your Koha tarball, you will create a folder called Koha-2.2.5, and in this folder you will find Installer.pm. You will be commenting lines 1812 and 1813 to prevent the installer from trying to create the account you just created manually.

#    print system("$mysqldir/bin/mysql -u$mysqluser -e \"insert into user (Host,User,Password)
values ('$hostname','$user',password('$pass'))\" mysql\;");
# system("$mysqldir/bin/mysql -u$mysqluser -e \"insert into db (Host,Db,User,Select_priv,
Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv, index_priv, alter_priv)
values ('%','$database','$user','Y','Y','Y','Y','Y','Y','Y','Y')\" mysql");

Now your MySQL should be ready to go.

Note

Once again, this method of installing MySQL and setting up the Koha administrator account is not recommended for a production environment.

2.4. Perl

If you are running OS X 10.3 or later, this is the easiest step of all -- you already have Perl 5.8 on your machine. If you are running 10.2, then the instructions at http://developer.apple.com/internet/opensource/perl.html will help you get Perl set up on your computer.

You are also going to need some Perl modules, but we will deal with those in the course of our installation. For now, you should have everything you need to start the Koha installation.

3. Installing Koha -- first pass

First of all, go to http://sourceforge.net/projects/koha and get the most recent version of the Koha tarball (currently 2.2.5 as this is written). When you download this to your computer, your Mac should automatically unzip it for you and leave you with a Koha-2.2.5 folder, most likely located on your desktop.

Open a terminal window and navigate to this folder (e.g. cd Desktop/Koha-2.2.5). Then start the install script:

emac:~/Desktop/Koha-2.2.5 admin$ sudo perl installer.pl
Password:




WELCOME TO THE KOHA INSTALLER

This program will ask some questions and try to install koha for you. You
need to know: where most koha files should be stored (you can set the
prefix environment variable for this); the username and password of a mysql
superuser; and details of your library setup. You may also need to know
details of your Apache setup.

If you want to install the Koha configuration files somewhere other than
/etc (for installing not as root, or to have many Kohas on one system, for
example), you should set the etcdir environment variable. Please look at
your manuals for details of how to set that.

Recommended answers are given in brackets after each question. To accept
the default value for any question (indicated by []), simply hit Enter at
the prompt.

Note that you also can define an auto_install_file, that will answer every
question automatically. To use this feature, run ./installer.pl -i
/path/to/auto_install_file

Are you ready to begin the installation? ([Y]/N):

Answer "Y" to the prompt, and Koha will run a check of your system and let you know what is still missing. Your display will probably look like this:

Checking perl modules ... 


The Net::Z3950 module is missing. This module is necessary if you want to
use Koha's Z39.50 client to download bibliographic records from other
libraries.

To install this module, you will need the yaz client installed from
http://www.indexdata.dk/yaz/ and then you can install the perl module with
the command:

perl -MCPAN -e 'install Net::Z3950'

...or by installing packages for your distribution, if available.

IMPORTANT NOTE : If you use Perl 5.8.0, you might need to edit NET::Z3950's
Makefile.PL and yazwrap/Makefile.PL to include:

'DEFINE' => '-D_GNU_SOURCE',

Also note that some installations of Perl on Red Hat will generate a lot of
"'my_perl' undeclared" errors when running make in Net-Z3950. This is fixed
by inserting in yazwrap/ywpriv.h a line saying #include "XSUB.h"

Press the <ENTER> key to continue:

And then when you press <ENTER> you will get a list of some more modules you are missing, and the installer will abort:

You are missing some Perl modules required by Koha. Please run this again
after installing them. They may be installed by finding packages from your
operating system supplier, or running (as root) the following commands:

perl -MCPAN -e 'install "DBI"'

perl -MCPAN -e 'install "Date::Manip"'

perl -MCPAN -e 'install "DBD::mysql"'

perl -MCPAN -e 'install "HTML::Template"'

perl -MCPAN -e 'install "MARC::Record"'

perl -MCPAN -e 'install "Mail::Sendmail"'

perl -MCPAN -e 'install "You will need PDF::API2 for barcode generator"'

perl -MCPAN -e 'install "Net::LDAP"'

perl -MCPAN -e 'install "Event"'

perl -MCPAN -e 'install "Net::Z3950"'
emac:~/Desktop/Koha-2.2.3 admin$

Let's deal with the modules listed up to Event, then deal with Event and Net::Z3950 separately.

3.1. Perl modules

Follow these instructions to install the missing Perl modules on your computer, but be aware that you need to do this as root -- sudo will not give you enough permissions. This is true of all the Perl modules you need to install, so be brave (but careful) and login as root on your computer:

emac:~/Desktop/Koha-2.2.5 admin$ su -l root
Password:
emac:~ root#

Note that the root password is different than your administrator password, and in fact may not be defined at all on your system. This is a security measure of OS X. If you have trouble logging in as root, you may have to set the root password first:

emac:~/Desktop/Koha-2.2.5 admin$ sudo passwd root
Password:
Changing password for root.
New password:
Retype new password:

The first password requested will be your administrator password. Choose a different password for your root password. Login as root and continue the process of installing modules.

This process is actually pretty easy: grab each module from CPAN and install it in one step, using the commands listed by the installer program:

emac:~ root# perl -MCPAN -e 'install "DBI"'

Note

If this is the first time you have used CPAN, you will have to go through the process of configuring it. See the Configuring Perl's CPAN utility section of Joshua Ferraro's Installing Koha on Debian document on www.kohadocs.org for guidance.

If all goes well, a lot of stuff will fly by on your screen, ending with something like this:

[...]
Installing /man/man3/DBI::DBD.3pm
Installing /man/man3/DBI::DBD::Metadata.3pm
Installing /man/man3/DBI::FAQ.3pm
Installing /man/man3/DBI::Profile.3pm
Installing /man/man3/DBI::ProfileData.3pm
Installing /man/man3/DBI::ProfileDumper.3pm
Installing /man/man3/DBI::ProfileDumper::Apache.3pm
Installing /man/man3/DBI::ProxyServer.3pm
Installing /man/man3/DBI::PurePerl.3pm
Installing /man/man3/DBI::SQL::Nano.3pm
Installing /man/man3/DBI::W32ODBC.3pm
Installing /man/man3/Roadmap.3pm
Installing /man/man3/Win32::DBIODBC.3pm
Installing /usr/bin/dbiprof
Installing /usr/bin/dbiproxy
Writing ///Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI/.packlist
Appending installation info to ///System/Library/Perl/5.8.1/darwin-thread-multi-2level/perllocal.pod
/usr/bin/make install -- OK
emac:~ root#

Repeat this process for each of the Perl modules listed as missing by the installer, until you get to the line that says "You will need PDF::API2 for barcode generator."

Koha has a built-in barcode generator, but it depends on a older version of the Perl PDF::API2 module than the one available from CPAN. If you want to print your own barcodes, you need to grab the version 0.3r77 tarball of PDF::API2 from http://cpan.mirror.fr/index2.php?pwd=modules%2Fby-module%2F%2FPDF (or anywhere else you can find it), unzip it into a PDF-API2-0.3r77 folder, navigate to that folder, and install it:

emac:~ root# cd /Users/admin/Desktop/PDF-API2-0.3r77
emac:/Users/admin/Desktop/PDF-API2-0.3r77 root# Perl Makefile.pl
____ ____ _____ _ ____ ___ ____
| _ \| _ \| ___| _ _ / \ | _ \_ _| |___ \
| |_) | | | | |_ (_) (_) / _ \ | |_) | | __) |
| __/| |_| | _| _ _ / ___ \| __/| | / __/
|_| |____/|_| (_) (_) /_/ \_\_| |___| |_____|
(0.3r77)
please look at http://www.penguin.at0.net/~fredo/files/
for examples and contrib.
Checking if your kit is complete...
Looks good
Warning: prerequisite Compress::Zlib 1.03 not found.
Writing Makefile for PDF::API2
anything else ? NO.
emac:/Users/admin/Desktop/PDF-API2-0.3r77 root#

At this point, you might as well go ahead and grab the Compress::Zlib module:

emac:/Users/admin/Desktop/PDF-API2-0.3r77 root# perl -MCPAN -e 'install "Compress::Zlib"'

Then continue with the installation of PDF-API2:

emac:/Users/admin/Desktop/PDF-API2-0.3r77 root# make
cp lib/PDF/API2/ExtGState.pm blib/lib/PDF/API2/ExtGState.pm
cp lib/PDF/API2/TTF/Fpgm.pm blib/lib/PDF/API2/TTF/Fpgm.pm
[...]
cp lib/PDF/API2/Page.pm blib/lib/PDF/API2/Page.pm
cp lib/PDF/API2/PDF/AFont.pm blib/lib/PDF/API2/PDF/AFont.pm

emac:/Users/admin/Desktop/PDF-API2-0.3r77 root# make install
Installing /Library/Perl/5.8.1/PDF/API2.pm
Installing /Library/Perl/5.8.1/PDF/API2/Annotation.pm
[...]
Installing /Library/Perl/5.8.1/PDF/API2/UniMap/microsoft-dingbats.map
Writing ///Library/Perl/5.8.1/darwin-thread-multi-2level/auto/PDF/API2/.packlist
Appending installation info to ///System/Library/Perl/5.8.1/darwin-thread-multi-2level/perllocal.pod
emac:/Users/admin/Desktop/PDF-API2-0.3r77 root#

Next on the list of modules is Net::LDAP, which you will only need if you are going to retrieve lists of authorized users from an LDAP server. If you use the nifty perl -MCPAN -e 'install' command for this, you'll get a list of missing modules that are dependencies or options for the Net::Z3950 module:

- Convert::ASN1   ...missing. (would need 0.07)
- Authen::SASL ...missing. (would need 2)
- URI::ldap ...missing. (would need 1.1)
- IO::Socket::SSL ...missing. (would need 0.81)
- XML::SAX::Base ...missing.

If you choose "yes" for installing all of these, you'll always get an error:

Writing Makefile for Net::LDAP
make: *** No targets specified and no makefile found. Stop.
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible

You have two choices here. You can do the easy thing and choose not to install the IO::Socket::SSL module, which should allow Net::Z3950 to install. Or if you feel you must have a complete installation, you can go to http://ldap.perl.org/ to download the perl-ldap-0.33 tarball and install it manually. Unzip the tarball, navigate to that directory, and run the Makefile.PL script:

emac:/Users/admin/Desktop/perl-ldap-0.33 root# perl Makefile.PL
*** ExtUtils::AutoInstall version 0.59
*** Checking for dependencies...
[Core Features]
- Convert::ASN1 ...loaded. (0.19 >= 0.07)
[SASL authentication]
- Authen::SASL ...loaded. (2.09 >= 2)
- Digest::MD5 ...loaded. (2.26)
[LDAP URLs]
- URI::ldap ...loaded. (1.11 >= 1.1)
[LDAPS]
- IO::Socket::SSL ...missing. (would need 0.81)
==> Auto-install the 1 optional module(s) from CPAN? [n] y
[Read/Write DSML files]
- XML::SAX::Base ...loaded. (1.02)
[Read/Write LDIF files]
- MIME::Base64 ...loaded. (2.20)
*** Dependencies will be installed the next time you type 'make'.
*** ExtUtils::AutoInstall configuration finished.
*** Installing dependencies...
*** Installing IO::Socket::SSL...
CPAN: Storable loaded ok
Going to read /var/root/.cpan/Metadata
[...]

Go ahead and choose to install the optional IO::Socket::SSL module. The process will end the same way as the process started with the perl -MCPAN -e 'install' command, but now there's a way out, using the install-nomake script that comes with the tarball:

Writing Makefile for Net::LDAP
emac:/Users/admin/Desktop/perl-ldap-0.33 root# make
make: *** No targets specified and no makefile found. Stop.

emac:/Users/admin/Desktop/perl-ldap-0.33 root# perl ./install-nomake
Installing /Library/Perl/5.8.1/Bundle/Net/LDAP.pm
Installing /Library/Perl/5.8.1/LWP/Protocol/ldap.pm
[...]
Installing /Library/Perl/5.8.1/Net/LDAP/Extension/SetPassword.pm
Installing /Library/Perl/5.8.1/Net/LDAP/Extension/WhoAmI.pm
emac:/Users/admin/Desktop/perl-ldap-0.33 root#

Done!

The final two missing modules listed by the Koha installer program are Event and Net::Z3950. These two modules allow the Koha Z39.50 client to install and function. Unfortunately, they won't install on Mac OS X, because the Event module has not been ported to OS X, and Net::Z3950 is dependent on Event. This problem should be fixed in future version of Koha, which will not use the Event module, but for now you'll just have to forego doing Z39.50 searches from Koha.

4. Installing Koha -- second pass

Now you should be able to try the installation process again. Let's look at this process:

emac:~/Desktop/Koha-2.2.5 admin$ sudo perl installer.pl


WELCOME TO THE KOHA INSTALLER

This program will ask some questions and try to install koha for you. You
need to know: where most koha files should be stored (you can set the
prefix environment variable for this); the username and password of a mysql
superuser; and details of your library setup. You may also need to know
details of your Apache setup.

If you want to install the Koha configuration files somewhere other than
/etc (for installing not as root, or to have many Kohas on one system, for
example), you should set the etcdir environment variable. Please look at
your manuals for details of how to set that.

Recommended answers are given in brackets after each question. To accept
the default value for any question (indicated by []), simply hit Enter at
the prompt.

Note that you also can define an auto_install_file, that will answer every
question automatically. To use this feature, run ./installer.pl -i
/path/to/auto_install_file

Are you ready to begin the installation? ([Y]/N): y
Great! Continuing...



PERL MODULES

Checking perl modules ...


The Net::Z3950 module is missing. This module is necessary if you want to
use Koha's Z39.50 client to download bibliographic records from other
libraries.

To install this module, you will need the yaz client installed from
http://www.indexdata.dk/yaz/ and then you can install the perl module with
the command:

perl -MCPAN -e 'install Net::Z3950'

...or by installing packages for your distribution, if available.

IMPORTANT NOTE : If you use Perl 5.8.0, you might need to edit NET::Z3950's
Makefile.PL and yazwrap/Makefile.PL to include:

'DEFINE' => '-D_GNU_SOURCE',

Also note that some installations of Perl on Red Hat will generate a lot of
"'my_perl' undeclared" errors when running make in Net-Z3950. This is fixed
by inserting in yazwrap/ywpriv.h a line saying #include "XSUB.h"

Press the <ENTER> key to continue:


PERL MODULES AVAILABLE

All required perl modules are installed.

Press <ENTER> to continue:



OPAC DIRECTORY

Please supply the directory you want Koha to store its OPAC files in. This
directory will be auto-created for you if it doesn't exist.

OPAC Directory [/usr/local/koha/opac]:


LIBRARIAN DIRECTORY

Please supply the directory you want Koha to store its Librarian interface
files in. This directory will be auto-created for you if it doesn't exist.

Intranet Directory [/usr/local/koha/intranet]:


LOG DIRECTORY

Specify a directory where log files will be written.

Koha Log Directory [/usr/local/koha/log]:


DATABASE NAME

Please provide the name that you wish to give your koha database. It must
not exist already on the database server.

Most users give a short single-word name for their library here.

Database name [Koha]:


DATABASE HOST

Please provide the mysql server name. Unless the database is stored on
another machine, this should be "localhost".

Database host [localhost]:


DATABASE USER

We are going to create a new mysql user for Koha. This user will have full
administrative rights to the database called Koha when they connect from
localhost. This is also the name of the Koha librarian superuser.

Most users give a single-word name here.

Database user [kohaadmin]:


DATABASE PASSWORD

Please provide a good password for the user kohaadmin.

IMPORTANT: You can log in using this user and password at any time.

Password for database user kohaadmin: xxxxxxxxx


APACHE CONFIGURATION

Koha needs to write an Apache configuration file for the OPAC and Librarian
sites. By default this installer will do this by using one name and two
different ports for the virtual hosts. There are other ways to set this up,
and the installer will leave comments in /etc/koha-httpd.conf about them.

NOTE: You will need to add lines to your main httpd.conf to include
/etc/koha-httpd.conf (using the Include directive) and to make sure it is
listening on the right ports and host names (using the Listen directive).

Press <ENTER> to continue:


WEB E-MAIL CONTACT

Enter the e-mail address to be used as a contact for Koha. This address is
displayed if fatal errors are encountered.

E-mail contact [webmaster@local]: auser@yourdomain


WEB HOST NAME OR IP ADDRESS

Please enter the host name or IP address that you wish to use for koha.
Normally, this should be a name or IP that belongs to this machine.

Host name or IP Address [emac.local]: localhost


OPAC PORT

Please enter the port for your OPAC interface. This defaults to port 80,
but if you are already serving web content with this hostname, you should
change it to a different port (8000 might be a good choice, but check any
firewalls).

Enter the OPAC Port [80]:


LIBRARIAN PORT

Please enter the port for your Librarian interface. This must be different
from the OPAC port (80).

Enter the Intranet Port [8080]:



UPDATING APACHE CONFIGURATION

Checking for modules that need to be loaded...

Use of uninitialized value in pattern match (m//) at Install.pm line 630, <HC> line 206.


APACHE CONFIGURATION NEEDS UPDATE

Koha uses the mod_env and mod_include apache features, but the installer
did not find them in your config. Please make sure that they are enabled
for your Koha site.

Use of uninitialized value in pattern match (m//) at Install.pm line 634, <HC> line 206.
Use of uninitialized value in pattern match (m//) at Install.pm line 634, <HC> line 206.
Use of uninitialized value in pattern match (m//) at Install.pm line 634, <HC> line 206.
Use of uninitialized value in pattern match (m//) at Install.pm line 634, <HC> line 206.
Use of uninitialized value in pattern match (m//) at Install.pm line 634, <HC> line 206.
Use of uninitialized value in pattern match (m//) at Install.pm line 634, <HC> line 206.
Press <ENTER> to continue:


INSTALLING FILES

Copying files to installation directories:Copying admin templates to /usr/local/koha/intranet/htdocs.
Copying admin interface to /usr/local/koha/intranet/cgi-bin.
Copying main scripts to /usr/local/koha/intranet/scripts.
Copying perl modules to /usr/local/koha/intranet/modules.
Copying OPAC templates to /usr/local/koha/opac/htdocs.
Copying OPAC interface to /usr/local/koha/opac/cgi-bin.


MYSQL ROOT USER PASSWORD

To create the koha database, please enter your mysql server's root user
password:

Password:


CREATING DATABASE

Creating the MySQL database for Koha...

...and so forth. The installer will ask a few more questions about your preferred language, your preferred flavor of MARC, etc., but at this point you are just about finished.

5. Modifying the httpd.conf files

If you are using a standard version of the Apache configuration file, you saw a message about mod_env and mod_include not being found by the installer. Actually, mod_include is probably already enabled, but mod_env is not. We now need to fix this and do some modifications to the file to enable Koha to work.

The file you will be editing is /etc/httpd/httpd.conf, and you will need to have root (administrator) privileges in order to change it. Make a backup copy before you begin. In the file you will see a section that looks like this:

# Note: The order in which modules are loaded is important.  Don't change
# the order below without expert advice.
#
# Example:
# LoadModule foo_module libexec/mod_foo.so
#LoadModule vhost_alias_module libexec/httpd/mod_vhost_alias.so
#LoadModule env_module libexec/httpd/mod_env.so
LoadModule config_log_module libexec/httpd/mod_log_config.so
...
#LoadModule info_module libexec/httpd/mod_info.so
LoadModule includes_module libexec/httpd/mod_include.so
LoadModule autoindex_module libexec/httpd/mod_autoindex.so

Remove the "#" from the beginning of the line #LoadModule env_module libexec/httpd/mod_env.so to uncomment it and make it active. Following this section of the file you will see a section that begins like this:

#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList
#AddModule mod_vhost_alias.c
#AddModule mod_env.c
AddModule mod_log_config.c

Again, uncomment the line #AddModule mod_env.c. Now go to the end of the file and add the following line:

Include /etc/koha-httpd.conf

Save this file.

Note

Save a backup copy of this altered file, too. Updates you receive to your Mac software may overwrite your changes, so keep them safe somewhere else.

Now edit /etc/koha-httpd.conf. Here you will be altering the "Listen" directives. You will see a line that says #Listen 8080. Uncomment this line, and add another line:

Listen 8080
Listen 80

Restart Apache and you should be finished. Open a browser, type in the URL http://localhost and you should see the Koha OPAC. Type in http://localhost:8080 and you should see the Koha librarian login screen. (Use kohaadmin and your password to access Koha.) Enjoy!