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 libyaz-dev php-dev php-pear libapache2-mod-php(maybe you already have some packages)pecl install yazPHPVERSION=$(dpkg -s libapache2-mod-php | grep -e '^Depends:' | grep -o '[0-9.]\+$')- create new file
/etc/php/${PHPVERSION}/mods-available/yaz.iniand add
; configuration for php YAZ module
; priority=20
extension=yaz.so- enable the YAZ module
phpenmod yaz- restart Apache2 server
systemctl restart apache2You need the php library yaz on the server.
UBUNTU 18.04 LTS:
sudo apt-get install yaz libyaz5-dev php-dev php-pear libapache2-mod-php(maybe you already have some packages)
UBUNTU 20.04 LTS (libyaz5-dev is no longer supported):
sudo apt-get install yaz libyaz-dev php-dev php-pear libapache2-mod-php(maybe you already have some packages)
Since the php-pear package installed via the APT Package-Management is to old (1.10.9) 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 PEARNow, you can nearly follow the description for Debian 10 / PHP 7.3
sudo pecl install yaz- create new file
/etc/php/7.4/mods-available/yaz.iniand add
; configuration for php YAZ module
; priority=20
extension=yaz.so- enable the YAZ module
sudo phpenmod yaz- restart Apache2 server
sudo systemctl restart apache2Some steps have to be performed after the server configuration and before the first start:
- Clone the repository or download all files
- Download jQuery and clipboard.js into
isbndirectory - Copy
isbn/conf.example.phptoisbn/conf.phpand customize the values - Copy
isbn/paketinfo.example.jstoisbn/paketinfo.jsand customize 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 php /var/www/html/malibu/bnb/getBNBData.php /var/www/html/malibu/bnb/BNBDatenThe 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