Installation koha arabe Debian Squeeze
Nous supposons que nous avons une installation stable de Debian Squeeze …
Nous allons installer apache2 et Mysql puis créer un user koha avec les droits full sudo.
Mise à jour des sources d’apt
Afin d’installer les paquets les plus récents, il est nécessaire de mettre à jour la liste des paquets de l’outil apt
. Identifiez vous en root dans un terminal à l’aide de la commande su. Tapez ensuite
apt-get update
Une fois le téléchargement terminé, vous disposez de la liste des paquets les plus récents.
Installation du serveur Apache 2
Il s’agit du serveur Web seul. Sans documentation, sans langage coté serveur, sans base de données.
apt-get install apache2
Vous pouvez vérifier que le serveur fonctionne en tapant http://127.0.0.1/ dans votre navigateur favori.
Installation de la documentation d’Apache 2
Cette documentation est visible depuis un dossier virtuel du serveur.
apt-get install apache2-doc
Cette documentation est visible en tapant http://127.0.0.1/manual/ dans un navigateur après avoir redémarré le serveur à l’aide de la commande /etc/init.d/apache2 restart.
Installation d’un serveur MySQL
La célèbre base de données gratuite très performante. La version 4.1 gère les requêtes imbriquées, alors pourquoi s’en priver ?
apt-get install mysql-server-5.1
Votre base de données est opérationnelle, il faut maintenant définir un mot de passe pour le super utilisateur root afin d’éviter tout problème de sécurité.
Dans le terminal tapez mysql -u root vous êtes alors directement connecté en root sur le serveur MySQL. La première chose à faire est de créer un mot de passe.
mysql> USE mysql; mysql> UPDATE user -> SET password = PASSWORD('motdepasse')
-> WHERE user = 'root';
mysql> flush privileges;
Déconnectez vous avec le commande exit; puis reconnectez vous mysql -u root -p, MySQL vous demande alors votre mot de passe.
Installation de phpMyAdmin
Cet outil développé en PHP vous sera très utile pour administrer et gérer vos bases de données.
apt-get install phpmyadmin
Ensuite vous aurez accès à phpMyAdmin en tapant dans la barre d’adresse http://127.0.0.1/phpmyadmin/ après avoir redémarré le serveur Apache.
/etc/init.d/apache2 restart
Connectez vous en tant que root.
Avec l’ utilisateur koha procédez aux étapes suivantes :
su - koha
Software Dependencies
Update the apt sources to include “Indexdata”
sudo nano /etc/apt/sources.list
add the lines:
# Index Data deb http://ftp.indexdata.dk/debian squeeze main deb-src http://ftp.indexdata.dk/debian squeeze main
The Index Data packages are signed with a key you can install as follows;
file is downloaded and installed to roots home directory for cleanliness in this example :
sudo wget http://ftp.indexdata.dk/debian/indexdata.asc --directory-prefix=/root sudo apt-key add indexdata.asc
Installer les dependencies via un fichier bash :
#!/bin/sh sudo aptitude update sudo aptitude install at sudo aptitude install apache2 sudo aptitude install build-essential make daemon gcc gettext sudo aptitude install git-core git-email cvs sudo aptitude install idzebra-2.0 idzebra-2.0-common idzebra-2.0-doc idzebra-2.0-utils sudo aptitude install libalgorithm-checkdigits-perl libauthen-cas-client-perl libbarcode-code128-perl libbiblio-endnotestyle-perl sudo aptitude install libbusiness-isbn-data-perl libbusiness-isbn-perl libbusiness-issn-perl sudo aptitude install libcgi-session-perl libcgi-session-serialize-yaml-perl sudo aptitude install libclass-accessor-perl libclass-factory-util-perl sudo aptitude install libdata-ical-perl sudo aptitude install libdate-calc-perl libdate-ical-perl libdate-manip-perl sudo aptitude install libdatetime-format-mail-perl libdatetime-format-strptime-perl libdatetime-format-w3cdtf-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl sudo aptitude install libdbd-mysql-perl libdbd-mysql-perl libdbd-sqlite2-perl libdbi-perl libdbi-perl sudo aptitude install libdigest-sha1-perl libdublincore-record-perl libmarc-crosswalk-dublincore-perl libemail-date-perl sudo aptitude install libgcrypt11 libgcrypt11-dev sudo aptitude install libgd-barcode-perl libgd-gd2-perl sudo aptitude install libhtml-scrubber-perl libhtml-tagset-perl libhtml-template-pro-perl libhttp-oai-perl sudo aptitude install libidzebra-2.0 libidzebra-2.0-dev libidzebra-2.0-mod-alvis libidzebra-2.0-mod-grs-marc libidzebra-2.0-mod-grs-regx libidzebra-2.0-mod-grs-xml libidzebra-2.0-mod-text libidzebra-2.0-modules sudo aptitude install libimage-magick-perl libgraphics-magick-perl libjson-perl sudo aptitude install liblingua-ispell-perl liblingua-stem-perl liblingua-stem-snowball-perl sudo aptitude install liblist-moreutils-perl sudo aptitude install liblocale-currency-format-perl liblocale-gettext-perl liblocale-po-perl sudo aptitude install libmail-sendmail-perl sudo aptitude install libmarc-charset-perl libmarc-record-perl libmarc-xml-perl sudo aptitude install libmemoize-memcached-perl libmime-lite-perl libmodule-install-perl libmysqlclient15-dev sudo aptitude install libnet-ldap-filterbuilder-perl libnet-ldap-perl libnet-server-perl libnet-z3950-zoom-perl sudo aptitude install libnumber-format-perl sudo aptitude install libpdf-api2-perl libpdf-api2-simple-perl libpdf-reuse-barcode-perl libpdf-reuse-perl libpdf-table-perl sudo aptitude install libpoe-perl libschedule-at-perl libsms-send-perl libstorable-perl libtemplate-perl sudo aptitude install libtext-charwidth-perl libtext-csv-encoded-perl libtext-csv-perl libtext-csv-xs-perl libtext-iconv-perl libtext-iconv-perl libtext-wrapi18n-perl sudo aptitude install libtimedate-perl libtime-duration-perl libtime-format-perl libtime-piece-perl sudo aptitude install libuniversal-require-perl libunix-syslog-perl liburi-perl sudo aptitude install libxml2 libxml2-dev libxml2-utils sudo aptitude install libxml-dom-perl libxml-dumper-perl libxml-libxml-perl libxml-libxslt-perl libxml-namespacesupport-perl libxml-parser-perl libxml-perl libxml-regexp-perl libxml-rss-perl libxml-sax-writer-perl libxml-simple-perl libxml-simple-perl libxml-xslt-perl sudo aptitude install libxslt1.1 libxslt1-dev sudo aptitude install libyaml-perl libyaml-syck-perl libyaml-syck-perl sudo aptitude install yaz yaz-doc libyaz libyaz-dev yaz-icu
Configure the cpan to enable installation of remaining perl module dependencies :
cpan
This will take you through cpan configuration script, accepting the defaults is fine. Once complete, run;
install Bundle::CPAN
This installs the latest CPAN module and lots of helper modules and is a good test that cpan is working correctly.
Now install Perl Dependency Modules via CPAN: example script
Installing and Configuring MySQL
Ensureing the correct character encoding for koha;
sudo cp /usr/share/mysql/config.medium.ini /etc/my.cnf
Then add the following lines to the my.cnf;
[client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] default-character-set=utf8 default-collation=utf8_unicode_ci
Restart mysql for changes to take effect:
sudo /etc/init.d/mysql restart
Creating the koha database (replace **** by your chosen kohaadmin password);
mysql -uroot -p'******' mysql> CREATE DATABASE koha CHARACTER SET utf8 COLLATE utf8_bin; mysql> GRANT ALL ON koha.* TO 'kohaadmin'@'localhost' IDENTIFIED BY '****'; mysql> FLUSH PRIVILEGES;
Koha
Download
Change to Koha home directory and download Koha source via git.
cd /home/koha git clone git://git.koha-community.org/koha.git kohaclone
To keep things clean, create a new release tracking branch. (replace INSTALLNAME with whatever you want to call your install);
cd kohaclone git checkout -b INSTALLNAME --track tag/v3.04.00
Installation
This follows the standard perl conventions. From within the kohaclone repository:
perl Makefile.PL make make install
To run from the git clone select a dev install. See the Koha INSTALL documentation for more info.
Fix any Dependancy issues mentioned after running Makefile.PL using instructions How_to_install_missing_Perl_modules_on_Debian and re-run Makefile.PL until no issues are flagged.
Setting Environment Variable
Add environment variables to ~/.bashrc (the actual values will differ depending on the answers to Makefile.PL) For a dev install:
export KOHA_CONF=/home/koha/koha-dev/etc/koha-conf.xml export PERL5LIB=/home/koha/kohaclone
Configuring Apache2
Link /home/koha/koha-dev/etc/koha/koha-httpd.conf to /etc/apache2/sites-available/koha
sudo ln -s /home/koha/koha-dev/etc/koha-httpd.conf /etc/apache2/sites-available/koha
Add “Listen” on port 8080 directive to /etc/apache2/ports.conf;
sudo nano /etc/apache2/ports.conf
Configure final apache2 Settings, link the Koha site and Restart service to make settings stick;
sudo a2enmod rewrite sudo a2ensite koha sudo apache2ctl restart
You should now find the Koha on-line setup page at YOURHOST:8080.