Published by: vivek choudhary

Pr-Installation Setup

#apt-get install mysql-server apache2
#mysql -u root -p
>CREATE database koha;
>CREATE user 'kohaadmin'@'localhost' IDENTIFIED by '{koha user password}';
>GRANT ALL ON koha.* TO 'kohaadmin'@'localhost' IDENTIFIED BY '{koha user password}';

Add A Koha Community Repository

# wget -q -O- | sudo apt-key add -
#echo 'deb 17.05 main' | sudo tee /etc/apt/sources.list.d/koha.list
#echo 'deb 17.11 main' | sudo tee /etc/apt/sources.list.d/koha.list
#sudo apt-get update

Download the latest Koha release

Add ‘koha’ User

#adduser koha

Install Dependencies
Determine Build Directory

It may look like:

# ls
koha-16.05.11 koha-latest.tar.gz

Ubuntu Packages from Repository

#sudo apt-get install koha-deps koha-perldeps make

Ubuntu Packages for Perl Dependencies

#koha_dir ./ -m -u

Build, Test, and Install Koha

#sudo make
#make install

Configure and Start Apache

#sudo ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha.conf

Tweak Koha Site File

The default file limits connections to those from (or, which is rather difficult to test/use in a server environment. Edit the file

#sudo vi /etc/apache2/sites-available/koha.conf

And change the two references from (or to *. The first match should to change should look like:

<VirtualHost *:80>

The second match to change should look like:

<VirtualHost *:8080>
#sudo /etc/init.d/apache2 restart

Setup Default Ports

# sudo vi /etc/apache2/ports.conf

Make sure both these Lines to the ports.conf file:

Listen 80
Listen 8080

Enable Modules and Site

# sudo a2enmod rewrite
# sudo a2enmod deflate
# sudo a2ensite koha.conf
# sudo /etc/init.d/apache2 restart

Setup Zebra Search

#sudo ln -s /usr/share/koha/bin/ /etc/init.d/koha-zebra-daemon
#sudo update-rc.d koha-zebra-daemon defaults
#sudo /etc/init.d/koha-zebra-daemon start

Configure Zebra Indexing

#sudo vi /etc/cron.d/koha


*/5 * * * * koha $KOHA_PATH/bin/migration_tools/ -b -a -z &> /dev/null

Published by: Vijay Pratap Singh(Jivesna Tech)

SELECT p.cardnumber AS 'Card Number', concat(p.firstname, " ", p.surname) AS 'Name', As 'E-Mail', c.issuedate AS 'Issue Date',c.date_due AS 'Due Date',
(TO_DAYS(curdate())-TO_DAYS( date_due)) AS 'Days Overdue',(TO_DAYS(curdate())-TO_DAYS( date_due))*5 AS 'Fine',
b.title AS 'Title', AS 'Author', i.itemcallnumber AS'Call No.',
i.barcode AS'Barcode'
FROM borrowers p
LEFT JOIN issues c ON (p.borrowernumber=c.borrowernumber)
LEFT JOIN items i ON (c.itemnumber=i.itemnumber)
LEFT JOIN biblio b ON (i.biblionumber=b.biblionumber)
WHERE c.branchcode = <<Branch|branches>> AND c.date_due < curdate()
ORDER BY p.surname ASC, p.firstname ASC, c.date_due ASC

Published by: Vijay Pratap Singh(Jivesna Tech)

SELECT i.Barcode, b.Title, b.Author,i.ccode,count(DISTINCT i.itemnumber) as "Copies"
FROM biblio b
LEFT JOIN items i USING (biblionumber)
WHERE i.itemnumber
AND b.biblionumber
GROUP BY b.biblionumber

Published by: Vijay Pratap Singh(Jivesna Tech)

SELECT borrowers.cardnumber,borrowers.firstname,borrowers.surname,borrowers.categorycode,biblio.title,items.barcode,statistics.type,statistics.datetime
FROM borrowers
LEFT JOIN statistics ON (statistics.borrowernumber=borrowers.borrowernumber)
LEFT JOIN items ON (items.itemnumber = statistics.itemnumber)
LEFT JOIN biblioitems ON (biblioitems.biblioitemnumber = items.biblioitemnumber)
LEFT JOIN biblio ON (biblioitems.biblionumber = biblio.biblionumber)

Published by: Vijay Pratap Singh(Team Jivesna Tech)

SELECT items.Dateaccessioned AS 'Accession Date',items.Barcode,biblio.Author,biblio.Title, biblioitems.Publishercode AS 'Publisher',biblio.Copyrightdate AS 'Year', biblioitems.Pages,items.ItemCallnumber AS 'Call No.',biblioitems.ISBN,items.booksellerid AS 'Vendor' ,items.Price,items.ccode,
ExtractValue(items.more_subfields_xml,'//datafield[@tag="999"]/subfield[@code="L"]') AS 'Bill date',
ExtractValue(items.more_subfields_xml,'//datafield[@tag="999"]/subfield[@code="k"]') AS 'Bill no.'
FROM items LEFT JOIN biblioitems ON (items.biblioitemnumber=biblioitems.biblioitemnumber) LEFT JOIN biblio ON (biblioitems.biblionumber=biblio.biblionumber)
WHERE items.homebranch =<<Branch|branches>> AND items.barcode BETWEEN <<From Acc. No.>> AND <<To Acc. No.)>>
ORDER BY LPAD(items.barcode,30,' ') ASC