[Koha] MULTIPLE KOHA ON ONE SERVER
DEEPTI
ahlawat36 at gmail.com
Tue Dec 14 19:11:29 NZDT 2010
I HAVE INSTALL KOHA ON OPENSUSE 11.1 AND IT IS WORKING PROPERLY BUT NOW I
WANT TO CONFIGURE MULTIPLE KOHA ON SINGLE SERVER .I HAVE DONE SOME
CONFIGURATION BUT IT IS NOT WORK. WILL ANYONE HELP ME
(CONFIGURATION OF MULTIPLE KONA)
To use multiple databases:
A lot of experimentation went into this. You need to modify the
/etc/network/interfaces file to bind multiple ip addresses to the ethernet
interface. Here is what I wound up with:
--------------------------------------------------------------------------------------------------------
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo eth1 eth1:0 eth1:1
iface lo inet loopback
# The primary network interface
allow-hotplug eth1
iface eth1 inet static
address 192.168.21.249
netmask 255.255.255.0
gateway 192.168.21.10
------------------------------------------------------------------------------------------------------
This creates three static addresses on the same interface eth1.
Using phpmyadmin or the MySQL command line, login as kohaadmin and create
the new databases, ours are image, leisure, main.
You need to dump the structure of the koha database and then import it into
the new databases. To dump the database use mysqldump . At the command
line, create a new directory and cd into it. Then enter:
mysqldump –u kohaadmin –p koha > kohaout.sql
You enter the password for kohaadmin, and this creates an sql file of the
koha database.
Create the new databases using phpmyadmin or the mysql command line –
example below. Start the mysql command line utility with:
mysql –u kohaadmin –p
After you enter your password, this gives you a mysql prompt. Then enter:
show databases; to see the list of databases. To create one enter:
create database <new db name>;
Then change to that dataabase:
use <new DB name>;
This command will import all the koha structure into the new database.
source kohaout.sql;
quit gets you out of the MySql utility and back to the command line.
Next you copy the config files. Change to the /etc/koha directory, and copy
the koha-conf.xml and koha-httpd-conf files using the new name of your
database. So if your database is named “book”, you now have book-conf.xml
and book-httpd.conf. Edit the book-conf.xml file, and change the name of
the database. You should find this near the end of the file under the
<config> section. Edit the book-httpd.conf file and make the following
changes:
Edit the VirtualHost entry and change the name to one of the IP addresses
you bound to the network interface – using a different address for each
configuration/database. So your entry looks like <VirtualHost
192.168.21.139:55180> for the OPAC and <VirtualHost 192.168.21.139:55188>
for the staff client. The IP addresses need to be in the interfaces config
file, and the ports (after the :) are from the address range 50000 – 63535.
These are unassigned ports in the internet scheme, and since they will be
used only on the internal network can be whatever you like. The normal koha
ports are the standard http port 80 for the OPAC and 8080 for the staff
client. Further down in each VirtualHost section find the SetEnv KOHA_CONF
declaration. Change the file to the new one, in our example
“/etc/koha/book-conf.xml”. You need to change this in two places, one for
each VirtualHost section.
Change to the /etc/apache2 directory and edit the ports.conf file. Add the
new ports you just put into the VirtualHost directives – 55180 and 55188 in
our example. If you want to use the default koha database, also add 8080 –
the default staff client port.
You need to add symbolic links for the httpd.conf file and enable the site,
so as above you do:
ln -s /etc/koha/book-httpd.conf /etc/apache2/sites-available/book
a2ensite book ( NOT ABLE TO THIS PART AS I THERE IS NO DIR IN /ETC/APACHE2
OF SITES-AVAILABLE)
Then restart Apache - /etc/init.d/apache2 reload
If you have done all your edits correctly, apache will reload without any
errors.
Browse to the new IP address – i.e. 192.168.21.239:55280 and you should see
the koha opac screen. Browse to the staff client – 192.168.21.239:55288 and
you should get that screen. Login as kohaadmin.
For each new database you should create a new library with the IP address
that goes with it entered there. Note: DON’T turn on IndependentBranches, it
causes other problems and had to be turned off. It is not needed anyway
with the different catalogs running on different virtual servers.
That should get you multiple databases, with appropriate defaults when
connecting to the staff client or the opac.
To use a different background on the top bar of the opac for each database,
create a new gif file similar to menu-background.gif found in
/usr/share/koha/opac/htdocs/opac-tmpl/prog/images with a different name. We
have one called green-background.gif in there now. In the
/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css folder create an new css
file - we are using imagelib.css. Edit the opac.css file, find the
menu-background.gif line. Copy the entire section (Alt-6 in nano). Open
the new css file (iamagelib.css) and past the info in (right or left mouse
click). Change the menu-background.gif to green-background.gif. Using the
staff client – System Preferences – OPAC page change the opaccolorstylesheet
option to point to the new css file, imagelib.css in our case. The default
is the colors.css file, which is empty. This file overrides the section
that is in the opac.css file.
To use a different background for the staff client go to the
/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css directory. Copy
the intranet.css file to a new name – I used imagelib-intranet.css. Edit
the file, and change the fourth line in the file from
“background-color:white” to background-color:<something else>”. A list of
colors can be found by searching for “css color codes” on Google. You can
use the name or maybe the code, didn’t try the code. Move the cursor past
the end of the body section marked by a brace and hit Alt-t to delete the
rest of the text in the file. Save the file. In the Staff Client go to the
System Preferences, Staff Client tab and change the
“intranetcolorstylesheet” to the new name. This will change just the
background of the pages and use the defaults in the intranet.css file for
everything else.
I made the above color changes to try and give the librarian and the users a
color cue about what database they were in.
--
View this message in context: http://koha.1045719.n5.nabble.com/MULTIPLE-KOHA-ON-ONE-SERVER-tp3304116p3304116.html
Sent from the Koha - Discuss mailing list archive at Nabble.com.
More information about the Koha
mailing list