Quick jump:  What's new

 
Go to:
 
Weblog: sysadmin   
in KOHA
Printanje i programiranje kartica


Printanje u Beču

Beč = batch (eng.) - u jednom cugu, za razliku od po potrebi

Napisati postojeću proceduru printanja kartica (pokretanje skripte)

Naručivanje praznih kartica

Paziti da zadnja strana bude bijela, jer i tako moramo printati dvostrano, pa nam to daje veću fleksibilnost.

Plan

  • čitač postaviti ispod printer-a tako da programirana kartica padne na čitač i isprogramira se (možda malo alu-folije ako čitač bude hvatao kartice iz spremnika)
  • Linux stroj sa podrškom za pritanje kartica i barkoda na njima koji podatke sprema nazad direktno u Kohu

Workflow

  • link sa intranet-a na lokalnu mašinu (linux stroj) gdje se pokreće pitanje na printer (možda lokalno spojen, možda mrežom)
  • kartica pada na čitač koji je programira i šalje podatak u kohu sa postom na neki ssl cgi (možda sa svojim certifikatima?)

CUPS driver



Tehnical test card:

Firmware 0821 f:200 E
X-Y-Smart Offsets 16 - 20 - 409
Printed lines 994 L / 636 W

PageSize[243.84 155.52]

Upstream CUPS support

Programming guide

Encode the three tracks

Ss                                    // Sequence Start
Pmc;h                                 // Set the coercivity to Hico
Dm;1;EVOLISPEBBLE                     // Download EVOLISPEBBLE on track 1
Dm;2;1234567890                       // Download 12345679890 on track 2
Dm;3;0987654321                       // Download 9876543210 on track 3
Se                                    // Sequence eject

Use the internal font and rotate them

Wcb ;k                                // Clear Monochrome Panel
Ss                                    // Sequence Start
Pwr ;0                                // Set the text orientation to 0
Wt ;100 ;300 ;0 ;10 ;Test rotations   // Write the Text "Test Rotation"
Wt ;500 ;250 ;0 ;50 ;0                // Write the text "0"
Pwr;90                                // Set the Text orientation to zero
Wt ;500 ;250 ;0 ;50 ;90               // Write the text "90"
Pwr;180                               // Set the Text orientation to 180
Wt ;500 ;250 ;0 ;50 ;180              // Write the text "180"
Pwr;270                               // Set the Text orientation to 270
Wt ;500 ;250 ;0 ;50 ;270              // // Write the text "270"
Se                                    // Sequence eject

Pr;ymcko                              // Parameter ribbon ymcko
Pc;a;=;10                             // Set the contrast to 10 for all panel
Pl;a;=;10                             // Set the luminosity to 10 for all panel
Ps;k;=;0                              // Set the Speed for black panel to 0
Ss                                    // Sequence start
Db;y;32;xxxxxxxxxxxxxxx               // Download the data for yellow pannel
Db;m;32;xxxxxxxxxxxxxx                // Download the data for magenta pannel
Db;c;32;xxxxxxxxxxxxxxx               // Download the data for cyan pannel
Db;o;32;xxxxxxxxxxxxxxx               // Download the data for overlay pannel
Se

Network administration

Escape sequence Syntax Arguments
Read the printer's IP address Rip  
Set the IP address or DHCP Rip;value IP address in xxx.yyy.ttt.uuu format or dhcp
Read Hostname Rehn  
Set Hostname Pehn;value Hostname (16 characters max.)
Read Subnet mask Renm  
Set Subnet mask Penm;value Subnet mask in xxx.yyy.ttt.uuu format
Read the gateway address Regw  
Set the gateway address Pegw;value Gateway address in xxx.yyy.ttt.uuu format
Read the WINS server address Rews  
Read the WINS server address Pews;value WINS server address in xxx.yyy.ttt.uuu format

Debian

apt-cache show evolisprinter

Package: evolisprinter
Status: install ok installed
Priority: extra
Section: checkinstall
Installed-Size: 160
Maintainer: root@klin
Architecture: i386
Version: 3.0-2
Provides: evolisprinter
Depends: cups
Description: New Pebble Card Printer CUPS driver

Compilation

apt-get install libcups2-dev libcupsimage2-dev
make
sudo checkinstall

dmesg

[88415.288187] usb 2-4.3: new full speed USB device using ehci_hcd and address 10
[88415.381054] usb 2-4.3: New USB device found, idVendor=058f, idProduct=9254
[88415.381058] usb 2-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[88415.381061] usb 2-4.3: Product: Generic USB Hub
[88415.381063] usb 2-4.3: Manufacturer: ALCOR
[88415.381149] usb 2-4.3: configuration #1 chosen from 1 choice
[88415.381333] hub 2-4.3:1.0: USB hub found
[88415.381555] hub 2-4.3:1.0: 4 ports detected
[88415.652178] usb 2-4.3.1: new full speed USB device using ehci_hcd and address 11
[88415.745545] usb 2-4.3.1: New USB device found, idVendor=0f49, idProduct=0400
[88415.745549] usb 2-4.3.1: New USB device strings: Mfr=4, Product=18, SerialNumber=0
[88415.745552] usb 2-4.3.1: Product: Evolis Dualys
[88415.745554] usb 2-4.3.1: Manufacturer: EVOLIS
[88415.745639] usb 2-4.3.1: configuration #1 chosen from 1 choice
[88415.747080] usblp0: USB Bidirectional printer dev 11 if 0 alt 0 proto 2 vid 0x0F49 pid 0x0400

[90082.139083] rastertoevolis[8692]: segfault at 0 ip b7ddf657 sp bfd60bc8 error 6 in libc-2.9.so[b7d67000+158000]
[90122.522505] usb 2-4.3.1: USB disconnect, address 11
[90122.522690] usblp0: removed
[90133.216207] usb 2-4.3.1: new full speed USB device using ehci_hcd and address 13
[90133.309579] usb 2-4.3.1: New USB device found, idVendor=0f49, idProduct=0400
[90133.309582] usb 2-4.3.1: New USB device strings: Mfr=4, Product=18, SerialNumber=0
[90133.309585] usb 2-4.3.1: Product: Evolis Dualys
[90133.309587] usb 2-4.3.1: Manufacturer: EVOLIS
[90133.309676] usb 2-4.3.1: configuration #1 chosen from 1 choice
[90133.311236] usblp0: USB Bidirectional printer dev 13 if 0 alt 0 proto 2 vid 0x0F49 pid 0x0400
[94350.140355] gs[27363]: segfault at 197 ip b79fb9a6 sp bf9bf070 error 6 in libgs.so.8.70[b790d000+3fc000]
[94393.919251] gs[27502]: segfault at 197 ip b79be9a6 sp bfefe230 error 6 in libgs.so.8.70[b78d0000+3fc000]
[94459.139970] gs[27726]: segfault at 197 ip b78459a6 sp bfdbcb90 error 6 in libgs.so.8.70[b7757000+3fc000]

lsusb

Bus 002 Device 013: ID 0f49:0400  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0f49 
  idProduct          0x0400 
  bcdDevice            6.02
  iManufacturer           4 EVOLIS
  iProduct               18 Evolis Dualys
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration         52 Standard Configuration
    bmAttributes         0x40
      (Missing must-be-set bit!)
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         7 Printer
      bInterfaceSubClass      1 Printer
      bInterfaceProtocol      2 Bidirectional
      iInterface             98 Printer Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0001
  Self Powered

CUPS

printer options

dpavlin@klin:~$ lpoptions -p EVOLIS_Dualys -l
ColorModel/Output Mode: *RGB
PageSize/Media Size: *Card
Collate/Collate: *True False
MediaType/Media Type: *Blank
InkType/Ink Type: YMCKO YMCKOS YMCKOK KO *Black Blue Gold Green Red Silver White Scratch BlackWax Hologram
Duplex/Two-sided Printing: None *DuplexNoTumble
Brightness/Luminosity: 0 1 2 3 4 5 6 7 8 9 *10 11 12 13 14 15 16 17 18 19 20
Contrast/Contrast: 0 1 2 3 4 5 6 7 8 9 *10 11 12 13 14 15 16 17 18 19 20
BlackIn/Black Panel : *N Y
TreatementK/Effect: *G L
SensibilityK/Intensity black panel: 0 1 2 3 4 5 6 7 8 9 *10 11 12 13 14 15 16 17 18 19 20
OverlayPannel/Define : *FO SCI SCA MS NO
SensibilityO/Intensity overlay panel: 0 1 2 3 4 5 6 7 8 9 *10 11 12 13 14 15 16 17 18 19 20
BrightnessV/Luminosity: 0 1 2 3 4 5 6 7 8 9 *10 11 12 13 14 15 16 17 18 19 20
ContrastV/Contrast: 0 1 2 3 4 5 6 7 8 9 *10 11 12 13 14 15 16 17 18 19 20
BlackInV/Black Back Panel : *N Y
TreatementKV/Effect: *G L
SensibilityKV/Intensity black panel: 0 1 2 3 4 5 6 7 8 9 *10 11 12 13 14 15 16 17 18 19 20
OverlayBackPannel/Define : FO SCI SCA MS NO
SensibilityOV/Intensity Overlay Back Panel: 0 1 2 3 4 5 6 7 8 9 *10 11 12 13 14 15 16 17 18 19 20
EjectCard/Specific Action : *None iSmart iCtless Eject Reject Test TestTech Clean
Coercivity/Coercivity: *None Hico Loco JIS
Track1/Track1 : *1 2 3 4 5 8 6 7
Track2/Track2 : 1 *2 3 4 5 8 6 7
Track3/Track3 : 1 2 *3 4 5 8 6 7

duplex printing

dpavlin@klin:~$ lpoptions -p EVOLIS_Dualys -l | grep Duplex
Duplex/Two-sided Printing: None *DuplexNoTumble

dpavlin@klin:~/klin/evolis-dualys-3$ lpr  -Pdualys3 -o Duplex=DuplexNoTumble out/200900000042.print-duplex.pdf 

cups raster

sudo apt-get install libfltk1.1-dev libcups2-dev libcupsimage2-dev


gs cups rasterizator

/usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -I/usr/share/cups/fonts -sMediaColor=k -sMediaType=Card -r300x300 -dDEVICEWIDTHPOINTS=243 -dDEVICEHEIGHTPOINTS=155 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=1 -scupsPageSizeName=Card -c -f -

evolis rasterizator

/usr/lib/cups/filter/rastertoevolis 42 dpavlin foobar 0 Duplex=DuplexNoTumble duplex.ras > foo.evolis

permalink
Koha performance

Ova stranica dokumentira naša podešavanja (i pokušaje) za što bržom Koha instalacijom.



Apache deflate kompresija

Smanjuje veličinu stranice koja se isporučije browersu.

  • apache2

    deflate-test.sh

    apache2/deflate-test.sh
    #!/bin/sh
    
    if [ -z "$1" ] ; then
    	echo "Usage: $0 http://www.example.com/"
    	exit 1
    else
    	url=$1
    fi
    
    time wget $url -O /tmp/foo
    echo
    time wget --header="Accept-Encoding: gzip" $url -O /tmp/foo.gz
    echo
    
    orig_size=`ls -al /tmp/foo    | awk '{ print $5 }'`
    comp_size=`ls -al /tmp/foo.gz | awk '{ print $5 }'`
    
    if [ $comp_size -lt $orig_size ] ; then
    	echo "OK $comp_size < $orig_size";
    else
    	echo "ERROR: no visible compression benefits"
    fi
    
    #ls -al /tmp/foo /tmp/foo.gz

    deflate.conf

    apache2/deflate.conf
    # /etc/apache2/conf.d/deflate.conf
    
    <IfModule mod_deflate.c>
    	AddOutputFilterByType DEFLATE text/html text/plain text/xml
    
    	SetOutputFilter DEFLATE
    	SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ 			no-gzip dont-vary
    	SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$	no-gzip dont-vary
    	SetEnvIfNoCase Request_URI \.pdf$							no-gzip dont-vary
    
    	BrowserMatch ^Mozilla/4 gzip-only-text/html
    	BrowserMatch ^Mozilla/4\.0[678] no-gzip
    	BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    
    	DeflateFilterNote Input input_info
    	DeflateFilterNote Output output_info
    	DeflateFilterNote Ratio ratio_info
    	LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
    	CustomLog /var/log/apache2/deflate.log deflate
    </IfModule>

    server-status.conf

    apache2/server-status.conf
    <IfModule mod_status.c>
    
    # munin needs ExtededStatus
    ExtendedStatus On
    
    <Location /server-status>
    	SetHandler server-status
    	Order deny,allow
    	Deny from all
    #	Allow from all
    	Allow from 127.0.0.1
    	Allow from .ffzg.hr
    </Location>
    
    </IfModule>



Session

dpavlin@koha:~$ sudo ./mk-query-digest /var/log/mysql/mysql-slow.log

# Profile
# Rank Query ID           Response time    Calls R/Call   Item
# ==== ================== ================ ===== ======== ================
#    1 0xC7A803CDD4FE9A36 30517.0000 45.5%   349  87.4413 INSERT UPDATE sessions
#    2 0xB4F2B316DFE865C8  8027.0000 12.0%   119  67.4538 SELECT sessions
#    3 0x6019E0D94A244FF5  3952.0000  5.9%   275  14.3709 SELECT opac_news
#    4 0x1F809CA9753CDEE7  2753.0000  4.1%    23 119.6957 SELECT biblio
#    5 0x27CE7D5D2BC5F598  2305.0000  3.4%   206  11.1893 SELECT fieldmapping
#    6 0xB0F504DD073A49CB  2192.0000  3.3%    30  73.0667 SELECT issues items biblio biblioitems
#    7 0x8ED635CB153D27A5  2146.0000  3.2% 19313   0.1111 SELECT reserves reserveconstraints
#    8 0xDB6DC1962741AB10  1978.0000  3.0%     7 282.5714 SELECT biblio biblioitems itemtypes
#    9 0x32783383AEA5AD49  1642.0000  2.4%    10 164.2000 SELECT items
#   10 0x6DD9F09DA2455228  1361.0000  2.0%     8 170.1250 DELETE sessions

Promjeniti SessionStorage u "as temporary files" i opcionalno pomaknuti ih u /dev/shm umjesti o u /tmp/:

dpavlin@koha:~$ diff -urw /srv/koha/C4/Auth.pm /usr/share/koha/lib/C4/Auth.pm
--- /srv/koha/C4/Auth.pm        2010-02-20 21:41:34.000000000 +0100
+++ /usr/share/koha/lib/C4/Auth.pm      2010-04-26 16:03:17.671211497 +0200
@@ -1341,7 +1341,7 @@
     }
     else {
         # catch all defaults to tmp should work on all systems
-        $session = new CGI::Session("driver:File;serializer:yaml;id:md5", $sessionID, {Directory=>'/tmp'});
+        $session = new CGI::Session("driver:File;serializer:yaml;id:md5", $sessionID, {Directory=>

Profile

Devel::NYTProf

instalacija:

root@koha-dev-git-reorg:~# cpan Devel::NYTProf

profile search query:

root@koha-dev-git-reorg:/usr/share/koha/opac/cgi-bin/opac# time perl -d:NYTProf -I/usr/share/koha/lib/ opac-search.pl q=human | wc
   1553    3259   58648

real    0m4.001s
user    0m3.152s
sys     0m0.560s

generate html report:

root@koha-dev-git-reorg:/usr/share/koha/opac/cgi-bin/opac# nytprofhtml 
Generating report...
Reading nytprof.out
Writing report to nytprof directory

koha-240

First run

dpavlin@koha-240:/tmp$ time perl -d:NYTProf -I/usr/share/koha/lib/ /usr/share/koha/opac/cgi-bin/opac/opac-search.pl q=human | wc
Use of uninitialized value $borrowernumber in string eq at /usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 483.
Use of uninitialized value in string eq at /usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 486.
   1962    3177   64512

real    0m8.561s
user    0m5.708s
sys     0m0.724s

Second run

dpavlin@koha-240:/tmp$ time perl -d:NYTProf -I/usr/share/koha/lib/ /usr/share/koha/opac/cgi-bin/opac/opac-search.pl q=human | wc
Use of uninitialized value $borrowernumber in string eq at /usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 483.
Use of uninitialized value in string eq at /usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 486.
   1962    3177   64512

real    0m6.664s
user    0m5.636s
sys     0m0.816s

Drop caches and run profile:

dpavlin@koha-240:/tmp$ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'

Zebra reindex

dpavlin@koha-240:/srv/koha$ sudo -u koha ./misc/migration_tools/rebuild_zebra.pl -b -v -r -d /tmp/indexing -k -x -nosanitize

permalink
Backup i restore


MySQL baza iz komandne linije

Backup

$ mysqldump --add-drop-table --single-transaction -u _kohauser_ -p koha > 2008-11-11_koha.sql
$ mysqldump --add-drop-table -u _kohauser_ -p koha issues > 2008-11-11_koha.issues.sql

http://www.nabble.com/Backing-up-3.0-to21076508.html

Restore

$ mysql -u _kohauser_ -p koha < 2008-11-11_koha.sql
$ mysql -u _kohauser_ -p koha.issues < 2008-11-11_koha.issues.sql

Restore sa zfs

opr - zfs backup server

# Find backup snapshot to restore
dpavlin@opl:~$ ./veid2hostname.sh 
212052 koha-dev.rot13.org
212056 webpac2.rot13.org
212226 koha.ffzg.hr
dpavlin@opl:~$ sudo zfs list | grep 212226 | tail -3
opl/backup/212226@2010-01-05   662M      -  25.4G  -
opl/backup/212226@2010-01-06    28K      -  25.4G  -
opl/clone/212226-mlin         30.0M  24.5G  25.4G  /opl/clone/212226-mlin

# make clone to access files
dpavlin@opl:~$ sudo zfs clone opl/backup/212226@2010-01-06 opl/clone/koha-2010-01-06
dpavlin@opl:~$ df -h /opl/clone/koha-2010-01-06
Filesystem            Size  Used Avail Use% Mounted on
opl/clone/koha-2010-01-06
                       50G   26G   25G  51% /opl/clone/koha-2010-01-06

cpio file transfer

  • mlin - hardware which provide resources
  • opl - machine with backup files
root@mlin:/virtual.clone# mkdir koha-2010-01-06
root@mlin:/virtual.clone# cd koha-2010-01-06/

# start listener for cpio data transfer
root@mlin:/virtual.clone/koha-2010-01-06# nc -l -p 8888 | pv | cpio --extract --make-directories --preserve-modification-time --numeric-uid-gid --sparse

dpavlin@opl:~$ sudo bash
root@opl:~# cd /opl/clone/koha-2010-01-06
root@opl:/opl/clone/koha-2010-01-06# find . | cpio --create | pv | nc 10.60.0.93 8888

rsync file update

dpavlin@mlin:~$ sudo rsync -ravH --numeric-ids --sparse --delete --exclude 'backup*' \
  10.60.0.90:/opl/clone/koha-2010-01-06/ /virtual.clone/koha-2010-01-06/

real    24m48.767s
user    5m0.027s
sys     2m3.656s

Kopiranje postojeće virtualne mašine prije rsync-a da bi se smanjilo broj promjena koje treba prenjeti rsync-om:

dpavlin@mlin:/virtual.clone/koha.ffzg.hr$ time sudo cp -ar * ../koha-2010-01-06/

real    14m59.742s
user    0m0.932s
sys     0m38.278s

Virtualna mašina

Nakon restora sa zfs-a treba napraviti sljedeća podešavanja:

Pokrenuti screen u kojem će biti virtualna mašina

dpavlin@mlin:~$ screen -S koha-upgrade

Filesystem

lvcreate -s /dev/vg/koha -L 80G -n koha-upgrade

root@mlin:~# mount /dev/vg/koha-upgrade /virtual.clone/koha-upgrade/
root@mlin:~# df /virtual.clone/koha-upgrade/
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg-koha--upgrade
                      82569904  56551456  26018448  69% /virtual.clone/koha-upgrade

Start LXC

root@mlin:~# cd /srv/sysadmin-cookbook/recepies/lxc/
root@mlin:/srv/sysadmin-cookbook/recepies/lxc# ./ve2lxc.sh /virtual.clone/koha-upgrade/ 10.60.0.253 koha-upgrade

Setup inside LXC

  • ugasiti monit apt-get remove monit
  • provjeriti IP adrese u /etc/apache2/sites-enabled/

BTRFS

root@opl:~# zfs clone opl/backup/212226@2010-03-06 opl/clone/koha-2010-03-06

root@prod:/virtual# time rsync -rav --exclude 'backup/*' --delete 10.60.0.90::clone/koha-2010-03-06/ /virtual/koha/
receiving incremental file list
...

sent 3297036 bytes  received 4392640729 bytes  6527004.85 bytes/sec
total size is 23473104677  speedup is 5.34

real    11m13.873s
user    1m15.985s
sys     0m39.890s

root@prod:/virtual# btrfsctl -s /virtual/koha@2010-03-06 /virtual/koha
operation complete
Btrfs Btrfs v0.19

root@prod:/virtual# btrfsctl -s /virtual/koha-242 /virtual/koha
operation complete
Btrfs Btrfs v0.19

dpavlin@prod:~$ sudo bash ve2lxc.sh /virtual/koha-242 10.60.0.242 koha-242

permalink
WebPAC2

Korisne bilješke za korištenje WebPAC2 sa Kohom.

Indeksiranje podataka iz Kohe

root@koha-hw:~# mount --bind /vz/root/212052/var/run/mysqld/ \
      /vz/root/212056/var/run/mysqld/

dpavlin@webpac2:/srv/webpac2$ export KOHA_USER=kohaadmin
dpavlin@webpac2:/srv/webpac2$ export KOHA_PASSWD=password
dpavlin@webpac2:/srv/webpac2$ ./run.pl --config vhost/koha/config.yml 

Drugi način je korištenje DBD::Gofer DBI_AUTOPROXY='dbi:Gofer:transport=stream;url=ssh:dpavlin@koha.ffzg.hr' ali za to cijeli resultset mora stati u memoriju

permalink
Koha virtual LDAP

Za detalje pogledajte LDAP

Virtualni LDAP omogućava Kohi da isporučuje podatke preko LDAP-a drugim sustavima, u našem slučaju, kopirkama, vidi SafeQ integration.

Drugi dio sustava je LDAP rewrite koji omogućava korištenje login@ffzg.hr bez modifikacija kohe.



upgrade

Upgrade na r61 koji ima podršku za novu koha konfiguraciju i logine bez modifikacije kohe:

# tunnel
dpavlin@llin:~$ ssh -R 8022:localhost:22 10.60.0.252

dpavlin@koha-2010-01-06:~$ cd /srv/virtual-ldap/
dpavlin@koha-2010-01-06:/srv/virtual-ldap$ svn update
A    sql
A    sql/organizationalunit.sql
A    sql/group.sql
A    sql/hreduperson.sql
U    lib/LDAP/Virtual.pm
U    lib/LDAP/Koha.pm
U    bin/ldap-rewrite.pl
Updated to revision 61.

start server process

dpavlin@koha-upgrade:~$ screen -S virtual-ldap

Pokrenuti server (inače to radi monit, ali on je deinstaliran da ne gnjavi)

dpavlin@koha-upgrade:~$ cd /srv/virtual-ldap/
dpavlin@koha-upgrade:/srv/virtual-ldap$ ./bin/virtual-ldap.pl 
LDAP server listening on port 1389

Čudan depdendency koji ne bi trebao postojati (kako radi na produkciji?)

dpavlin@koha-upgrade:/srv/virtual-ldap$ ./bin/virtual-ldap.pl 
Can't locate Net/LDAP/Server.pm in @INC (@INC contains: lib /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at lib/LDAP/Virtual.pm line 12, <DATA> line 96.
BEGIN failed--compilation aborted at lib/LDAP/Virtual.pm line 12, <DATA> line 96.
Compilation failed in require at ./bin/virtual-ldap.pl line 7, <DATA> line 96.
BEGIN failed--compilation aborted at ./bin/virtual-ldap.pl line 7, <DATA> line 96.


dpavlin@koha-upgrade:/srv/virtual-ldap$ sudo apt-get install libnet-ldap-server-perl
permalink
Zotero WebDAV server

Zotero is a free, easy-to-use Firefox extension
to help you collect, manage, and cite your research sources. It lives right where you do
your work—in the web browser itself.

Izazov

Problem (err, izazov) je u tome da želimo imati Zotero koji se autorizira WebDAV-om koristeći račune iz Kohe. Jedna od mogućnosti je koristiti jednostavno AAIEdu LDAP server ali onda nemamo korisnike koji su samo u Kohi.

Druga ideja je bila koristiti libapache2-mod-auth-mysql za autorizaciju direktno na Koha bazu, ali nažalost izgleda da se neda konfigurirati za isti oblik md5 hash-a passworda koji koristi koha (sigh)

Ostatak uputa je strgan (i/ili star) dok ne rješim problem!

http://bugs.rot13.org/rt/Ticket/Display.html?id=397



Za korisnike Zotera

Install Zotero Firefox plugin 2.0

install

Podešavanje servera

Apache kao SSL proxy

dpavlin@koha-dev:~$ sudo a2enmod proxy_http
Considering dependency proxy for proxy_http:
Enabling module proxy.
Enabling module proxy_http.
Run '/etc/init.d/apache2 restart' to activate new configuration!

    <Proxy *>
        Order deny,allow
#       Deny from all
#       Allow from localhost
        Allow from all
    </Proxy>

    ProxyRequests       on
    ProxyPass           /zotero http://localhost:4242/zotero
    ProxyPassReverse    /zotero http://localhost:4242/zotero

Apache WebDAV

dpavlin@koha-dev:~$ sudo a2enmod dav_fs dav
Considering dependency dav for dav_fs:
Enabling module dav.
Enabling module dav_fs.
Module dav already enabled
Run '/etc/init.d/apache2 restart' to activate new configuration!
dpavlin@koha-dev:~$ sudo /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting.

Apache auth

dpavlin@koha-dev:~$ sudo apt-get install libapache2-mod-auth-mysql

dpavlin@koha-dev:~$ sudo a2enmod auth_mysql
Enabling module auth_mysql.
Run '/etc/init.d/apache2 restart' to activate new configuration!
dpavlin@koha-dev:~$ sudo /etc/init.d/apache2 restart

Directory

dpavlin@koha-dev:~$ sudo mkdir /srv/zotero

Apache vhost

dpavlin@koha-dev:~$ cat /etc/apache2/sites-available/zotero-dev.vzb.ffzg.hr 
<VirtualHost *>
        ServerName zotero-dev.vbz.ffzg.hr
        DocumentRoot /srv/zotero
        <Directory /home/srw/example.com>
                Options Indexes MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

                Auth_MySQL_Info localhost LOGIN PASSWORD

        <Location />

                Auth_MYSQL on

                Auth_MySQL_Password_Table borrowers
                Auth_MySQL_Username_Field userid
                Auth_MySQL_Password_Field password
                Auth_MySQL_Empty_Passwords off
                Auth_MySQL_Encryption_Types Crypt_MD5
                #PHP_MD5

                DAV On
                AuthType Basic
                AuthName "Zotero WebDAV server - use Koha login and password"
                Require valid-user

        </Location>

</VirtualHost>

dpavlin@koha-dev:/etc/apache2/sites-enabled$ sudo a2ensite zotero-dev.vzb.ffzg.hr

Test

dpavlin@koha-dev:~$ sudo apt-get install cadaver

dpavlin@koha-dev:~$ cadaver http://zotero-dev.rot13.org
permalink
Računala za pretraživanje kataloga
racunala-za-pretrazivanje-kataloga.JPG

Koristi Webconverger distribuciju za kreiranje web kioska



Dodatno instalirani paketi

Lokalne Webconverger modifikacije

instalacija

root@opr:/srv/pxelator# apt-get install squashfs-tools aufs-tools aufs-modules-`uname -r`

promjene

dpavlin@opr:/srv/pxelator$ ./bin/webc-overlay.sh 
+ mount+ egrep /tmp/(base|export|changes)

+ sudo mount /srv/pxelator/tftp/webconverger/iso/live/filesystem.squashfs /tmp/base/ -o loop
+ mkdir /tmp/changes /tmp/base /tmp/export
mkdir: cannot create directory `/tmp/changes': File exists
mkdir: cannot create directory `/tmp/base': File exists
mkdir: cannot create directory `/tmp/export': File exists
+ sudo mount -t aufs -o br:/tmp/changes/:/tmp/base/ none /tmp/export/
+ sudo chroot /tmp/export
root@opr:/# 

Nakon Ctrl+D rebuildati će se /srv/pxelator/tftp/webconverger/custom.squashfs koji koriste katalozi za boot.

permalink
Instalacija i nadogradnja

u /srv/koha direktoriju

$ git pull
$ perl Makefile.PL
$ make
$ make test
$ sudo make install
$ git log

Git

Korisne git komande

$ git diff --cached # difference between HEAD and the index; what
                    # would be committed if you ran "commit" now.
$ git diff          # difference between the index file and your
                    # working directory; changes that would not
                    # be included if you ran "commit" now.
$ git diff HEAD     # difference between HEAD and working tree; what
                    # would be committed if you ran "commit -a" now.
$ git status        # a brief per-file summary of the above.

Instalacija perl modula

pr. Test::More

$ apt-get install libtest-more-perl
ili
$ sudo cpan Test::More

Nakon nadogradnje na produkciji

  • editirati SIPconfig.xml - u tagu service dodati odgovarajuću IP adresu
  • restore LDAP setinga

How to Reset the Koha 3 Database

http://wiki.koha.org/doku.php?id=resetdatabasekoha3

Tutorial for Updating Database Files

http://wiki.koha.org/doku.php?id=en:documentation:tutorials:dbupdatetutorial

permalink
Lokane promjene

Repozitorij: koha-ffzg.git



Promijenjene datoteke:

C4/Circulation.pm
C4/Search.pm
cataloguing/additem.pl
koha-tmpl/intranet-tmpl/ffzg/en/includes/biblio-view-menu.inc
koha-tmpl/intranet-tmpl/ffzg/en/modules/cataloguing/additem.tmpl
koha-tmpl/intranet-tmpl/ffzg/en/modules/cataloguing/results.tmpl

Dodane datoteke

dla_interface/downloadLog.log
dla_interface/download.pl
dla_interface/output.txt
dla_interface/search.pl
catalogue/passhistory.pl
koha-tmpl/intranet-tmpl/ffzg/img/rfidPosition1.jpg
koha-tmpl/intranet-tmpl/ffzg/img/rfidPosition2.jpg
koha-tmpl/intranet-tmpl/ffzg/img/rfidPosition3.jpg
koha-tmpl/intranet-tmpl/ffzg/en/modules/catalogue/passhistory.tmpl
koha-tmpl/intranet-tmpl/ffzg/en/modules/dla_interface/search.tmpl

Promjene na bazi

Veličina polja

Potrebno je povećati broj znakova u nekim poljima u koha.items i koha.biblioitems

polje stara vrijednost nova vrijednost
items.itemcallnumber varchar(30) varchar(255)
items.cn_sort varchar(30) varchar(100)
biblioitems.cn_class varchar(30) varchar(100)
biblioitems.cn_item varchar(10) varchar(100)
biblioitems.cn_sort varchar(30) varchar(100)
biblioitems.isbn varchar(14) varchar(255)
biblioitems.issn varchar(9) varchar(20)

mysql> alter table items modify itemcallnumber varchar(255);


Opis potrebnih promjena

Prikaz bibliografskih podataka u normal view

Marijana:
koha-tmpl/intranet-tmpl/ffzg/en/modules/cataloguing/results.tmpl

Prikaz starog inventarnog broja u rezultatima pretraživanja

Sučelje je prilagođeno tako da je sa stranice s rezultatima odmah moguće doći na stranicu za uređivanje podataka o primjercima.
Budući da su podaci o primjercima generirani na temelju inventarnog broja, svaki zapis o primjerku ima taj broj u trenutku konverzije.
Inv. brojevi ispisuju se na stranici s rezultatima i klikom na pojedini inv. broj dolazi se na sučelje za editiranje primjerka s tim inventarnim brojem.

Dobrica:
C4/Search.pm
koha-tmpl/intranet-tmpl/ffzg/en/modules/cataloguing/results.tmpl

Potrebno je još:

  • vizualno istaknuti podatak o lokaciji i signaturi na stranici s rezultatima pretraživanja
  • omogućiti ograničavanje pretraživanja na podatak o signaturi - staroj i novoj - da li u istom kriteriju ili ne?
  • vizualno istaknuti, različitim bojama naslove: Add item (crveno) i Edit item (zeleno)
  • pored naslova Add Item i Edit item ispisati inv. broj
  • pofarbati polje za signaturu u crveno

Unos podataka o primjercima

Indikator za poziciju RFID naljepnice

Dodane su slike s brojevima 1, 2 ili 3 koji ukazuju na pozicijamu RFID naljepnice na knjizi.
Za prvi primjerak broj se genira po slučaju, ostali primjerci istog naslova idu cirkularno.

Hrvoje Matasić, Vivainfo:
cataloguing/additem.pl
koha-tmpl/intranet-tmpl/ffzg/en/modules/cataloguing/additem.tmpl
koha-tmpl/intranet-tmpl/ffzg/img/rfidPosition1.jpg
koha-tmpl/intranet-tmpl/ffzg/img/rfidPosition2.jpg
koha-tmpl/intranet-tmpl/ffzg/img/rfidPosition3.jpg

Prikaz barkod broja u <title>

Barkod iz naslova se koristi kod čipiranja.

Hrvoje Matasić, Vivainfo:
cataloguing/additem.pl
koha-tmpl/intranet-tmpl/ffzg/en/modules/cataloguing/additem.tmpl

Statistika prolazaka kroz vrata

(ovo je nemoguće implementirati jer vrata ne mogu pročitati oznaku primjerka s čipa)

Hrvoje Matasić, Vivainfo:
koha-tmpl/intranet-tmpl/ffzg/en/modules/catalogue/passhistory.tmpl
catalogue/passhistory.pl
C4/Circulation.pm
koha-tmpl/intranet-tmpl/ffzg/en/includes/biblio-view-menu.inc

Sučelje za DLA

opis funkcionalnosti

Hrvoje Matasić, Vivainfo:
dla_interface/downloadLog.log
dla_interface/download.pl
dla_interface/output.txt
dla_interface/search.pl
koha-tmpl/intranet-tmpl/ffzg/en/modules/dla_interface/search.tmpl

permalink
potrebna podrška
  • instalacija i održavanje (uključujući i održavanje servera)
  • edukacija o konfiguraciji sustava
  • razvoj nove funkcionalnosti
permalink
Weblog Navigation
Loading...
Weblog Archives
  • Loading...