CDS Invenio 0.99.3 Installation et configuration de base Installation Pour une installation d Invenio sur serveur Linux Debian Lenny, nous nous inspirons des instructions de la page : http://invenio-software.org/wiki/installation/invenioondebian Le fichier «INSTALL» contenu dans l archive d Invenio donne également une procédure à suivre. Installation des paquetages Debian nécessaires aptitude install python-dev apache2-mpm-prefork mysql-server mysql-client pythonmysqldb python-4suite-xml python-simplejson python-xml python-libxml2 pythonlibxslt1 gnuplot poppler-utils gs-common antiword catdoc wv html2text ppthtml xlhtml clisp gettext libapache2-mod-wsgi unzip python-numpy python-rdflib python-gnuplot python-magic pdftk html2text giflib-tools pstotext make sudo Lors de l installation du serveur Mysql, le mot de passe de l utilisateur «root» de la base de données est fixé. aptitude install python-psyco sbcl cmucl pylint pychecker pyflakes python-profiler pythonepydoc libapache2-mod-xsendfile netpbm python-pypdf aptitude install postfix L installation du serveur de messagerie Postfix entre en conflit avec le serveur Exim déjà installé sur le serveur. Nous acceptons la proposition du système : désinstallation du serveur de messagerie Exim qui est remplacé par Postfix. L installation de Postfix nécessite de préciser le type de serveur de messagerie. Nous choisissons la configuration «Système satellite» qui permettra à notre serveur Debian de soumettre les messages email au serveur SMTP local (smtp.obs-vlfr.fr). Quelques derniers paquetages sont nécessaires pour assembler Invenio : aptitude install automake1.9 autoconf aptitude install git-core git-gui giggle git-buildpackage zip Des paquetages optionnels sont également installés : aptitude install rxp python-psyco sbcl cmucl pylint pychecker pyflakes python-profiler python-epydoc libapache2-mod-xsendfile openoffice.org Récupération d Invenio et copie sur le serveur Nous téléchargeons l archive cds-invenio-0.99.3.tar.gz et déplions l archive dans un répertoire temporaire: cd /tmp wget http://invenio-software.org/download/cds-invenio-0.99.3.tar.gz tar xvzf cds-invenio-0.99.3.tar.gz cd /tmp/cds-invenio-0.99.3 Le fichier «INSTALL» indique le procedure à suivre pour continuer l installation.
Configuration de Mysql Nous vérifions certains paramètres dans le fichier de configuration /etc/mysql/my.cnf au niveau de la section [mysqld]. Le paramètre «max_allowed_packet» doit être supérieur à 4M. max_allowed_packet = 16M default-character-set=utf8 Préparation d Invenio cd /tmp/cds-invenio-0.99.3./configure make make install ln -s /opt/cds-invenio/lib/python/invenio /usr/lib/python2.5/site-packages/invenio ln -s /opt/cds-invenio/lib/python/invenio /usr/local/lib/python2.5/site-packages/invenio make install make install-jsmath-plugin Configuration d Invenio Invenio est maintenant installé sur le serveur Edition du fichier /opt/cds-invenio/etc/invenio.conf (voir annexe) Edition du fichier /opt/cds-invenio/etc/invenio-local.conf [Invenio] CFG_SITE_URL = http://entrepot.obs-vlfr.fr CFG_SITE_SECURE_URL = https://entrepot.obs-vlfr.fr CFG_DATABASE_HOST = localhost CFG_DATABASE_NAME = cdsinvenio CFG_DATABASE_USER = cdsinvenio CFG_DATABASE_PASS = mot de passe CFG_SITE_NAME = Entrepot OOV CFG_SITE_NAME_INTL_en = OOV repository CFG_SITE_NAME_INTL_fr = Entrepot OOV CFG_SITE_NAME_INTL_de = OOV repository CFG_SITE_NAME_INTL_es = OOV repository CFG_SITE_LANG = fr CFG_SITE_LANGS = de,en,es,fr CFG_SITE_SUPPORT_EMAIL = Olivier.Boebion@obs-vlfr.fr CFG_SITE_ADMIN_EMAIL = invenio@obs-vlfr.fr CFG_WEBSEARCH_USE_JSMATH_FOR_FORMATS = Lancement de la configuration du site à partir des fichiers de configuration /opt/cds-invenio/bin/inveniocfg --update-all
Création de la base de données cdsinvenio dans MySQL mysql -h localhost -u root -p mysql mysql> CREATE DATABASE cdsinvenio DEFAULT CHARACTER SET utf8; mysql> GRANT ALL PRIVILEGES ON cdsinvenio.* TO root@localhost IDENTIFIED BY 'motdepasse'; mysql> QUIT Création des tables de la base de données cdsinvenio dans MySQL /opt/cds-invenio/bin/inveniocfg --create-tables Création des fichiers de configuration pour le serveur Web Apache /opt/cds-invenio/bin/inveniocfg --create-apache-conf Les 2 fichiers suivants sont créés : Fichier /opt/cds-invenio/etc/apache/invenio-apache-vhost-ssl.conf AddDefaultCharset UTF-8 ServerSignature Off ServerTokens Prod NameVirtualHost *:80 Listen 80 <Files *.pyc> <Files *~> <VirtualHost *:80> ServerName entrepot.obs-vlfr.fr ServerAlias entrepot ServerAdmin invenio@obs-vlfr.fr DocumentRoot /opt/cds-invenio/var/www Options FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all ErrorLog /opt/cds-invenio/var/log/apache.err LogLevel warn CustomLog /opt/cds-invenio/var/log/apache.log combined DirectoryIndex index.en.html index.html <LocationMatch "^(/+$ /index /collection /record /author /search /browse /youraccount /youralerts /yourbaskets /y ourmessages /yourgroups /submit /getfile /comments /error /oai2d /rss /help /journal /openurl /stats)"> SetHandler python-program PythonHandler invenio.webinterface_layout </LocationMatch> AddHandler python-program.py PythonHandler mod_python.publisher </VirtualHost>
Fichier /opt/cds-invenio/etc/apache/invenio-apache-vhost-ssl.conf ServerSignature Off ServerTokens Prod #Listen 443 #NameVirtualHost *:443 #SSLCertificateFile /etc/apache2/ssl/apache.pem #SSLCertificateFile /etc/apache2/ssl/server.crt #SSLCertificateKeyFile /etc/apache2/ssl/server.key <Files *.pyc> <Files *~> <VirtualHost *:443> ServerName entrepot.obs-vlfr.fr ServerAlias entrepot ServerAdmin invenio@obs-vlfr.fr SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.pem DocumentRoot /opt/cds-invenio/var/www Options FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all ErrorLog /opt/cds-invenio/var/log/apache-ssl.err LogLevel warn CustomLog /opt/cds-invenio/var/log/apache-ssl.log combined DirectoryIndex index.en.html index.html <LocationMatch "^(/+$ /index /collection /record /author /search /browse /youraccount /youralerts /yourbaskets /y ourmessages /yourgroups /submit /getfile /comments /error /oai2d /rss /help /journal /openurl /stats)"> SetHandler python-program PythonHandler invenio.webinterface_layout </LocationMatch> AddHandler python-program.py PythonHandler mod_python.publisher </VirtualHost> Correction du fichier de configuration /opt/cds invenio/etc/apache/invenio apache vhost.conf en commentant les 2 lignes suivantes : #NameVirtualHost *:80 #Listen 80 Correction du fichier de configuration /opt/cds invenio/etc/apache/invenio apache vhostssl.conf avec les 3 lignes suivantes : SSLCertificateFile /etc/apache2/ssl/apache.pem #SSLCertificateFile /etc/apache2/ssl/server.crt #SSLCertificateKeyFile /etc/apache2/ssl/server.key
Configuration d Apache aptitude install ssl-cert mkdir /etc/apache2/ssl /usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem chown -R www-data.www-data /opt/cds-invenio ln -s /opt/cds-invenio/etc/apache/invenio-apache-vhost.conf /etc/apache2/sitesavailable/invenio ln -s /opt/cds-invenio/etc/apache/invenio-apache-vhost-ssl.conf /etc/apache2/sitesavailable/invenio-ssl /usr/sbin/a2dissite default /usr/sbin/a2ensite invenio /usr/sbin/a2ensite invenio-ssl /usr/sbin/a2enmod ssl Redémarrage du serveur Web Apache /etc/init.d/apache2 restart Le site http://entrepot.obs-vlfr.fr répond