The easiest way should be to use the docker container as it is already described in the README.md. This can be used for testing also for production. However, there are alternatives ways to set it up on Debian without docker and how you can set up a an environment for code development.
You need the php library yaz on the server.
apt-get install yaz libyaz4-dev php5-dev php-pear
(maybe you have already some packages)pecl install yaz
- Open
/etc/php5/apache2/php.ini
, goto sectionDynamic Extensions
and addextension=yaz.so
Maybe, the file yaz.so
is not located in the directory
which is configured by extension_dir
in
/etc/alternatives/php-config
and you have to copy it therefore.
(e.g. cp /usr/lib/php5/20090626/yaz.so /usr/lib/php5/20100525/yaz.so
in our case).
You need the php library yaz on the server.
apt-get install yaz libyaz4-dev php5-dev php-pear
(maybe you have already some packages)pecl install yaz
- create new file
/etc/php5/mods-available/yaz.ini
and add
; configuration for php YAZ module
; priority=20
extension=yaz.so
- create a symbolic link
cd /etc/php5/apache2/conf.d
ln -s ../../mods-available/yaz.ini 20-yaz.ini
- restart Apache2
service apache2 restart
You need the php library yaz on the server.
apt-get install yaz libyaz4-dev php-dev php-pear libapache2-mod-php
(maybe you already have some packages)pecl install yaz
- create new file
/etc/php/7.0/mods-available/yaz.ini
and add
; configuration for php YAZ module
; priority=20
extension=yaz.so
- enable the YAZ module
phpenmod yaz
- restart Apache2 server
systemctl restart apache2
You need the php library yaz on the server.
apt-get install yaz libyaz-dev php-dev php-pear libapache2-mod-php
(maybe you already have some packages)pecl install yaz
- create new file
/etc/php/7.3/mods-available/yaz.ini
and add
; configuration for php YAZ module
; priority=20
extension=yaz.so
- enable the YAZ module
phpenmod yaz
- restart Apache2 server
systemctl restart apache2
You need the php library yaz on the server.
apt-get install yaz libyaz5-dev php-dev php-pear libapache2-mod-php
(maybe you already have some packages)
Since the php-pear package installed via apt-get is to old (1.10.8) and an upgrade "pear upgrade PEAR" will fail, you should follow these additional steps to force an upgrade to pear 1.10.11, which is essential for compiling the Yaz-Module (yaz.so) for PHP 7.4 via pecl:
sudo pear channel-update pear.php.net
sudo pecl channel-update pecl.php.net
sudo pear upgrade --force channel://pear.php.net/Archive_Tar-1.4.9 PEAR
Now, you can nearly follow the description for Debian 10 / PHP 7.3
pecl install yaz
- create new file
/etc/php/7.4/mods-available/yaz.ini
and add
; configuration for php YAZ module
; priority=20
extension=yaz.so
- enable the YAZ module
phpenmod yaz
- restart Apache2 server
systemctl restart apache2
Some steps have to be performed after the server configuration and before the first start:
- Clone the repository or download all files
- Download jQuery 3.2.1 and clipboard.js 1.7.1 into
isbn
directory - Copy
isbn/conf.example.php
toisbn/conf.php
and costumize the values - Copy
isbn/paketinfo.example.js
toisbn/paketinfo.js
and costumize the values
Moreover, for the retrieval of data from the British National Library, you should set up CRON to run the script bnb/getBNBData
regularly:
# Update British National Library RDF files for malibu
0 10 * * 6 /var/www/html/malibu/bnb/getBNBData /var/www/html/malibu/bnb/BNBDaten
The easiest way for developing/changing code on linux or windows is to use the same docker image from Dockerhub and additionally mount the current malibu directory into docker:
docker run -d -p 12345:80 -v `pwd`:/var/www/html/malibu-dev ubma/malibu
The development version of malibu can then be accessed at http://localhost:12345/malibu-dev/isbn/suche.html (maybe you have to replace localhost with the docker ip).
The ./dist/dev-server.sh
script will install the dependencies of malibu system-wide and start
a server on port 8090
. The purpose is to create a working development
environment on a Debian/Ubuntu system in a single step.
To run the dev server:
bash ./dist/dev-server.sh
To rebuild the image or run a container with the current development version:
make -C dist docker
make -C dist docker-run