Cette conversation, sur le forum d'Andesi, est consacrée à cette page.
Veuillez vous y rendre pour y placer et lire toutes les remarques.
Merci
L'auteur
Installation d'OpenERP
Objectif
Je souhaite pouvoir disposer d'un ERP, libre, pour moi et peut-être le mettre à disposition de futurs clients.
J'ai choisi OpenERP parce que c'est comme ça !!
Pré-requis
Open ERP nécessite l'emploi d'un SGBD PostgreSQL dont l'installation, très simple et d'un ensemble de paquets Pyhton qui sont : python-xml python-libxml2 python-libxslt1 python-psycopg python-tz python-imaging python-pyparsing python-reportlab graphviz python-matplotlib qui, chez moi, souhaitent installer aussi :
atlas3-base blt cpp cpp-4.1 dvipng gcc-3.4-base gs-common gs-gpl gsfonts gsfonts-x11 gv lesstif2 libcompress-zlib-perl libfont-afm-perl libfontenc1 libfs6 libg2c0 libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libice6 libkpathsea4 libmailtools-perl libpaper-utils libpaper1 libperl5.8 libpoppler0c2 libsm6 libtimedate-perl liburi-perl libwww-perl libxaw7 libxext6 libxfont1 libxft2 libxml-parser-perl libxmu6 libxp6 libxrender1 libxslt1.1 libxt6 perl-tk psfontmgr psutils python-dateutil python-dev python-egenix-mxdatetime python-egenix-mxtools python-gd python-matplotlib-data python-numpy python-tk python2.4-dev tcl8.4 tetex-base tetex-bin tetex-doc tex-common tk8.4 xaw3dg xbitmaps xfonts-encodings xfonts-utils xpdf xpdf-common xpdf-reader xpdf-utils xterm xutils xutils-dev
Création d'un compte "applicatif"
Je vais faire comme les grands , je sépare les applications en leur créant des comptes spécifique
Ce compte sera utilisé pour lancer le serveur et serveur Web d'OpenERP
# adduser openerp Ajout de l'utilisateur « openerp »... Ajout du nouveau groupe « openerp » (1001)... Ajout du nouvel utilisateur « openerp » (1001) avec le groupe « openerp »... Création du répertoire personnel « /home/openerp »... Copie des fichiers depuis « /etc/skel »... Enter new UNIX password: Retype new UNIX password: passwd : le mot de passe a été mis à jour avec succès Modification des informations relatives à l'utilisateur openerp Entrez la nouvelle valeur ou « Entrée » pour conserver la valeur proposée Nom complet []: Compte de l'application OpenERP N° de bureau []: Téléphone professionnel []: Téléphone personnel []: Autre []: Ces informations sont-elles correctes ? [o/N] o
Téléchargement des sources
Télécharger les sources du serveur, ici
Du client ici
Je crée un répertoire contenant tous les fichiers ainsi télécharger
$ mkdir OpenERP
Je m'y place
$ cd OpenERP
Puis télécharge les 3 fichiers :
$ wget http://openerp.com/download/stable/source/openerp-server-5.0.0-3.tar.gz $ wget http://openerp.com/download/stable/source/openerp-client-5.0.0-3.tar.gz $ wget http://openerp.com/download/stable/source/openerp-web-5.0.0-3.1.tar.gz
J'ai donc cela :
$ ls openerp-client-5.0.0-3.tar.gz openerp-server-5.0.0-3.tar.gz openerp-web-5.0.0-3.1.tar.gz
Le serveur OpenERP
Construction du serveur
Je commence par le serveur d'OpenERP.
$ tar zxvf openerp-server-5.0.0-3.tar.gz
décompresse le gz et extrait le tar. Ce tar décompressé est maintenant dans le sous répertoire openerp-server-5.0.0-3.
$ cd openerp-server-5.0.0-3 openerp-server-5.0.0-3$ python setup.py build
me donne
Error: python module psycopg2 (PostgreSQL module) is required Error: python module pychart (pychart module) is required Error: python module pydot (pydot module) is required
Je m'en vais donc chercher et installer ce qui me manque :
$ aptitude search psycopg2 pychart pydot p python-psycopg2 - Python module for PostgreSQL p python-psycopg2da - Zope database adapter based on python-psycopg2 -- zope3 version p python-pychart - Python library for creating high quality charts p python-pydot - Python interface to Graphviz's dot
Installation en root
# aptitude install python-psycopg2 python-pychart python-pydot
Nouvelle tentative, tant que simple utilisateur :
$ python setup.py build /usr/lib/python2.4/distutils/dist.py:236: UserWarning: Unknown distribution option: 'console' warnings.warn(msg) running build running build_py creating build creating build/lib creating build/lib/openerp-server copying bin/netsvc.py -> build/lib/openerp-server copying bin/pooler.py -> build/lib/openerp-server copying bin/tiny_socket.py -> build/lib/openerp-server [...] running build_scripts creating build/scripts-2.4 copying openerp-server -> build/scripts-2.4 changing mode of build/scripts-2.4/openerp-server from 644 to 755
J'ai maintenant cela
openerp-server-5.0.0-3# ls -la total 68 drwxr-xr-x 6 xx xx 4096 2009-03-22 19:51 . drwxr-xr-x 3 xx xx 4096 2009-03-22 19:35 .. drwxr-xr-x 10 xx xx 4096 2009-02-13 11:10 bin drwxr-xr-x 4 xx xx 4096 2009-03-22 19:51 build drwxr-xr-x 4 xx xx 4096 2009-02-13 11:10 doc drwxr-xr-x 2 xx xx 4096 2009-02-13 11:10 man -rw-r--r-- 1 xx xx 400 2009-01-03 01:56 MANIFEST.in -rw-r--r-- 1 xx xx 93 2009-03-22 19:51 openerp-server -rw-r--r-- 1 xx xx 785 2009-02-13 11:10 PKG-INFO -rw-r--r-- 1 xx xx 1120 2009-01-03 01:56 README -rw-r--r-- 1 xx xx 673 2009-01-30 16:18 rpminstall_sh.txt -rw-r--r-- 1 xx xx 335 2009-02-13 00:20 setup.cfg -rw-r--r-- 1 xx xx 9859 2009-01-03 01:56 setup.nsi -rwxr-xr-x 1 xx xx 7511 2009-02-13 00:16 setup.py
Installation du serveur
En tant que super-utilisateur root,
openerp-server-5.0.0-3# python setup.py install
Dans un autre terminal, toujours en tant que root, entrez cette commande
su openerp -c openerp-server
qui si elle retourne cela
ERROR: pythonic binding for the libxml2 and libxslt libraries is missing ERROR: Try to install python-lxml package
indique que le paquet python-lxml est manquant. Donc
# aptitude install python-lxml
résout le problème.
Deuxième tentative :
su openerp -c openerp-server
ou
/usr/bin/openerp-server
en tant que openerp retourne cela :
[2009-03-22 20:47:13,946] INFO:server:version - 5.0.0 [2009-03-22 20:47:13,947] INFO:server:addons_path - /usr/lib/python2.4/site-packages/openerp-server/addons [2009-03-22 20:47:13,948] INFO:server:database hostname - localhost [2009-03-22 20:47:13,950] INFO:server:database port - 5432 [2009-03-22 20:47:13,951] INFO:server:database user - openerp [2009-03-22 20:47:13,952] INFO:objects:initialising distributed objects services [2009-03-22 20:47:15,513] INFO:web-services:starting XML-RPC services, port 8069 [2009-03-22 20:47:15,516] INFO:web-services:starting NET-RPC service, port 8070 [2009-03-22 20:47:15,517] INFO:web-services:the server is running, waiting for connections...
Ça a l'air bon !
Le Client lourd OpenERP
Construction du client
Le client nécessite la présence de xpdf déjà installé lors de l'installation des pré-requis du serveur.
Décompression et extraction du tar par
$ tar zxvf openerp-client-5.0.0-3.tar.gz
J'obtiens :
/srv/applis/openerp-client-5.0.0-3$ ls -la total 72 drwxr-xr-x 5 xx xx 4096 2009-02-13 11:08 . drwxr-xr-x 4 xx xx 4096 2009-03-22 21:19 .. drwxr-xr-x 16 xx xx 4096 2009-02-13 11:08 bin drwxr-xr-x 2 xx xx 4096 2009-02-13 11:08 doc -rw-r--r-- 1 xx xx 642 2009-01-28 01:38 Makefile drwxr-xr-x 2 xx xx 4096 2009-02-13 11:08 man -rw-r--r-- 1 xx xx 166 2009-01-03 01:47 MANIFEST.in -rw-r--r-- 1 xx xx 6181 2008-12-20 11:24 msgfmt.py -rw-r--r-- 1 xx xx 5885 2008-12-20 11:24 mydistutils.py -rw-r--r-- 1 xx xx 92 2009-02-13 11:08 openerp-client -rw-r--r-- 1 xx xx 794 2009-02-13 11:08 PKG-INFO -rw-r--r-- 1 xx xx 450 2009-01-28 01:38 rpminstall_sh.txt -rw-r--r-- 1 xx xx 411 2009-02-13 00:20 setup.cfg -rwxr-xr-x 1 xx xx 8244 2009-01-28 01:38 setup.py
La construction, dans le répertoire fraîchement créé, est faite par
openerp-client-5.0.0-3$ python setup.py build
me retourne
Error: Can not find dsextras or gtk.dsextras
J'installe donc les paquets gtk de python
# aptitude install python-gtk2
qui va installer
fontconfig hicolor-icon-theme libatk1.0-0 libatk1.0-data libcairo2 libglib2.0-0 libglib2.0-data libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libpango1.0-0 libpango1.0-common libtiff4 libxinerama1 python-cairo python-numeric x-ttcidfont-conf
Deuxième tentative :
openerp-client-5.0.0-3$ python setup.py build Traceback (most recent call last): File "setup.py", line 133, in ? check_modules() File "setup.py", line 71, in check_modules exec('import %s' % modname) File "<string>", line 1, in ? File "/var/lib/python-support/python2.4/gtk-2.0/gtk/__init__.py", line 45, in ? from _gtk import * RuntimeError: could not open display
L'erreur vient du fait que je me suis connecté à mon serveur sans faire d'export display
Il m'est donc nécessaire de me déconnecter de mon serveur OpenERP, puis depuis ma machine qui a l'écran :
$ xhost + access control disabled, clients can connect from any host $ ssh -X xx@IP_SERVEUR_OpenERP xx@IP_SERVEUR_OpenERP's password: Linux lisa 2.6.18-6-686 #1 SMP Sat Dec 27 09:31:05 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. No mail. Last login: Sun Mar 22 21:05:57 2009 from 192.168.0.10
Pour vérifier la possibilité d'avoir les applications lancées depuis mon serveur OpenERP
$ echo $DISPLAY localhost:10.0
Test d'une application bidon xclock, présente dans le paquet xbase-clients
$ xclock
affiche bien une petite horloge. Troisième tentative :
openerp-client-5.0.0-3$ python setup.py build Error: python module gtk.glade (glade python bindings) is required
maintenant c'est le paquet python-glade2 qui manque
# aptitude install python-glade2
va corriger le problème et installer libglade2-0
Quatrième tentative :
$ python setup.py build /usr/lib/python2.4/distutils/dist.py:236: UserWarning: Unknown distribution option: 'windows' warnings.warn(msg) running build running build_conf running build_py package init file 'bin/__init__.py' not found (or not a regular file) creating build creating build/lib creating build/lib/openerp-client copying bin/rpc.py -> build/lib/openerp-client copying bin/observator.py -> build/lib/openerp-client copying bin/openerp-client.py -> build/lib/openerp-client [...]
Ouf !
Installation du client
En tant que root
# python setup.py install Traceback (most recent call last): File "setup.py", line 133, in ? check_modules() File "setup.py", line 71, in check_modules exec('import %s' % modname) File "<string>", line 1, in ? File "/var/lib/python-support/python2.4/gtk-2.0/gtk/__init__.py", line 45, in ? from _gtk import * RuntimeError: could not open display
là encore c'est un problème de DISPLAY, même si ce n'est pas très bien le passage par un ssh -X et root est nécessaire :
# python setup.py install /usr/lib/python2.4/distutils/dist.py:236: UserWarning: Unknown distribution option: 'windows' warnings.warn(msg) running install running build running build_conf running build_py package init file 'bin/__init__.py' not found (or not a regular file) package init file 'bin/__init__.py' not found (or not a regular file) running build_scripts copying openerp-client -> build/scripts-2.4 changing mode of build/scripts-2.4/openerp-client from 644 to 755 running build_mo running install_lib creating /usr/lib/python2.4/site-packages/openerp-client copying build/lib/openerp-client/rpc.py -> /usr/lib/python2.4/site-packages/openerp-client creating /usr/lib/python2.4/site-packages/openerp-client/plugins copying build/lib/openerp-client/plugins/__init__.py -> /usr/lib/python2.4/site-packages/openerp-client/plugin[...]
C'est mieux, non ?
Tests de l'ensemble et mise en route du serveur OpenERP
En tant que simple utilisateur,
openerp-client
lance le client. La fenêtre qui s'affiche maintenant commence par vous demander les informations sur votre activité.
Mais je propose de faire la vérification du bouquin “Open ERP Gestion d'entreprise” ISBN :978-2-212-12267-9
Vérification du SGBD
PostgreSQL est nécessaire, donc le service doit tourner :
# ps -fu postgres UID PID PPID C STIME TTY TIME CMD postgres 8916 1 0 20:38 ? 00:00:02 /usr/lib/postgresql/8.1/bin/postmaster -D /var/lib/postgresql/8.1/main -c config_file=/etc/postgresql/8.1/main/postgresql.conf postgres 8918 8916 0 20:38 ? 00:00:00 postgres: writer process postgres 8919 8916 0 20:38 ? 00:00:00 postgres: stats buffer process postgres 8920 8919 0 20:38 ? 00:00:00 postgres: stats collector process
Ok Le port d'écoute du service PostgreSQL est le 5432
# netstat -anpt| grep 5432 tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 8916/postmaster
postmaster est bien le service de PostgreSQL puisque
# dpkg -S postmaster postgresql-8.1: /usr/lib/postgresql/8.1/bin/postmaster postgresql-8.1: /usr/share/postgresql/8.1/man/man1/postmaster.1.gz
confirme que postmaster est dans le paquet postgresql-8.1.
Le compte DBA de PostgreSQL est postgres car
cat /etc/passwd| grep post postgres:x:105:106:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
Depuis le compte root, je peux me connecter sur le SGBD par
# su - postgres -c psql
Donc
# su - postgres -c psql Bienvenue dans psql 8.1.15, l'interface interactive de PostgreSQL. Saisissez: \copyright pour les termes de distribution \h pour l'aide-mémoire des commandes SQL \? pour l'aide-mémoire des commandes psql \g ou point-virgule en fin d'instruction pour exécuter la requête \q pour quitter postgres=#
et \q pour en sortir. Les tests semblent Ok. Toujours en tant que root, pour lancer le service OpenERP, lancer la commande
# su - openerp -c /usr/bin/openerp-server
qui doit retourner cela :
[2009-03-22 22:28:30,162] INFO:server:version - 5.0.0 [2009-03-22 22:28:30,163] INFO:server:addons_path - /usr/lib/python2.4/site-packages/openerp-server/addons [2009-03-22 22:28:30,165] INFO:server:database hostname - localhost [2009-03-22 22:28:30,166] INFO:server:database port - 5432 [2009-03-22 22:28:30,167] INFO:server:database user - openerp [2009-03-22 22:28:30,169] INFO:objects:initialising distributed objects services [2009-03-22 22:28:31,639] INFO:web-services:starting XML-RPC services, port 8069 [2009-03-22 22:28:31,641] INFO:web-services:starting NET-RPC service, port 8070 [2009-03-22 22:28:31,642] INFO:web-services:the server is running, waiting for connections...
Le serveur est en attente de connexion d'avec le client.
Si vous avez cela
[2009-03-22 22:31:27,595] CRITICAL:xml-rpc:Error occur when starting the server daemon: (98, 'Adresse d\xc3\xa9j\xc3\xa0 utilis\xc3\xa9e')
Un autre service est déjà en cours.
Configuration du service serveur (suite et fin)
Après un arrêt du serveur physique, le service OpenERP ne sera pas relancé, il faut donc le configurer en tant que service. Je vous propose de créer les fichier d'initialisation de ce service.
Pour cela il nous faut disposer d'un squelette de script disponible dans /etc/init.d, ce fichier est skeleton
# cp /etc/init.d/skeleton /etc/init.d/openerp-server
Le modifier ainsi, les lignes à modifier sont à gauche du tableau, en gras dans la colonne de droite sont les modifications :
lignes | /etc/init.d/skeleton | /etc/init.d/openerp-server |
---|---|---|
3 | # Provides: skeleton | # Provides: openerp-server |
4 | # Required-Start: $local_fs $remote_fs | # Required-Start: $syslog |
5 | # Required-Stop: $local_fs $remote_fs | # Required-Stop: $network |
8 | # Short-Description: Example initscript | # Short-Description: OpenERP Server - the Server of the OpenERP |
9 | # Description: This file should be used to construct scripts to be | # Description: OpenERP is a complete ERP and CRM software. |
10 | # placed in /etc/init.d. | |
22 | DESC=“Description of the service” | DESC=“OpenERP server service“ |
23 | NAME=daemonexecutablename | NAME=openerp-server |
24 | DAEMON=/usr/sbin/$NAME | DAEMON=/usr/bin/$NAME |
25 | DAEMON_ARGS=”–options args” | DAEMON_ARGS=”“ |
28 | USER_SERVICE=“openerp” | |
51 | start-stop-daemon –start –quiet –pidfile $PIDFILE –exec $DAEMON –test > /dev/null | start-stop-daemon –start –quiet –pidfile $PIDFILE –chuid ${USER_SERVICE} –exec $DAEMON –test > /dev/null |
53 | start-stop-daemon –start –quiet –pidfile $PIDFILE –exec $DAEMON – \ | start-stop-daemon –start –quiet –pidfile $PIDFILE –chuid ${USER} –exec $DAEMON –background – \ |
70 | start-stop-daemon –stop –quiet –retry=TERM/30/KILL/5 –pidfile $PIDFILE –name $NAME | start-stop-daemon –stop –quiet –pidfile $PIDFILE |
en ligne 63 de /etc/init.d/openerp-server ajouter
ps -fu ${USER_SERVICE} | awk '$(NF-1) ~/python$/ && $NF ~/openerp-server.py$/ {print $2}' > $PIDFILE
Un petit changement de droit pour le rendre exécutable :
chmod 755 /etc/init.d/openerp-server -rwxr-xr-x 1 root root 4066 2009-03-26 21:46 openerp-server
Puis, pour lancer le service :
# /etc/init.d/openerp-server start
lance le service et un
# /etc/init.d/openerp-server stop
l'arrête
Modification des "rc files"
Tout comme le serveur web d'OpenERP, il nous faut modifier les rc flies\\
# update-rc.d openerp-server defaults Adding system startup for /etc/init.d/openerp-server ... /etc/rc0.d/K20openerp-server -> ../init.d/openerp-server /etc/rc1.d/K20openerp-server -> ../init.d/openerp-server /etc/rc6.d/K20openerp-server -> ../init.d/openerp-server /etc/rc2.d/S20openerp-server -> ../init.d/openerp-server /etc/rc3.d/S20openerp-server -> ../init.d/openerp-server /etc/rc4.d/S20openerp-server -> ../init.d/openerp-server /etc/rc5.d/S20openerp-server -> ../init.d/openerp-server
Maintenant le service serveur d'OpenERP est opérationnel.
Création de la base de données
La connexion se fait depuis n'importe quel compte et pas forcément celui de postgreSQL.
Je me connecte avec
/usr/bin/openerp-client
j'obtiens cet écran
Les informations rentrées seront stockées dans le fichier ~/.openerp_serverrc, une fois les informations saisies j'ai cela
Après avoir cliqué sur “valider”, je refuse la demande de connexion à la base, mais dans :
Fichier → Bases de données → Nouvelle base de données via l'option Modifier, parce que le client et le serveur sont sur la même machine, il faut choisir NET-RPC (faster)
Comme proposé dans le livre, je crée une base de tests. Sachant que le compte d'administration est admin et que son mot de passe est admin.
J'ai maintenant l'affichage de la bonne fin de la création ainsi que les comptes / mot de passe, comme cela
Le client lourd est maintenant installé, je passe à l'installation du client Web.
Le Client WEB OpenERP
La documentation officielle |ici demande d'installer python-setuptoolsdonc
# aptitude install python-setuptools
puis demande de faire cela
easy_install TurboGears==1.0.8
en tant que root
# easy_install TurboGears==1.0.8 Searching for TurboGears==1.0.8 Reading http://www.python.org/pypi/TurboGears/ Reading http://www.turbogears.org/ Reading http://www.turbogears.org/download/filelist.html Reading http://www.python.org/pypi/TurboGears/1.1b3 Best match: TurboGears 1.0.8 Downloading http://files.turbogears.org/eggs/TurboGears-1.0.8.tar.gz Processing TurboGears-1.0.8.tar.gz Running TurboGears-1.0.8/setup.py -q bdist_egg --dist-dir /tmp/easy_install-oPP8Po/TurboGears-1.0.8/egg-dist-tmp-xXEqDl The required version of setuptools (>=0.6c9) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U setuptools'. (Currently using setuptools 0.6c3 (/usr/lib/python2.4/site-packages)) error: Setup script exited with 2
La solution est proposée :
# easy_install -U setuptools Searching for setuptools Reading http://www.python.org/pypi/setuptools/ Reading http://pypi.python.org/pypi/setuptools Reading http://www.python.org/pypi/setuptools/0.6c9 Best match: setuptools 0.6c9 Downloading http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c9-py2.4.egg#md5=260a2be2e5388d66bdaee06abec6342a Processing setuptools-0.6c9-py2.4.egg creating /usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg Extracting setuptools-0.6c9-py2.4.egg to /usr/lib/python2.4/site-packages Adding setuptools 0.6c9 to easy-install.pth file Installing easy_install script to /usr/bin Installing easy_install-2.4 script to /usr/bin Installed /usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg Processing dependencies for setuptools
Je retente l'installation de TurboGears par
# easy_install TurboGears==1.0.8
qui semble se terminer correctement.\\Je termine par un
# easy_install -U openerp-web
Le serveur est maintenant installé.
Son lancement se fait par un
start-openerp-web
et le test se fait via un navigateur internet à l'adresse http://IP_SERVEUR_OpenERP:8080/ et vous aurez
Créer son service
La connexion via le navigateur n'est possible qu'après avoir lancé
start-openerp-web
, en son absence vous n'obtiendrez qu'une erreur de chargement de la page. Il est donc conseillé d'en faire un service qui sera lancé au démarrage du serveur.
Toutes les actions suivantes seront à faire en tant que root (enlevez les moufles et ouvrez les yeux )
Recherche de mes sources
Je cherche le répertoire “openerp_web”, par un find
# find / -name "open*.egg" -type d /usr/lib/python2.4/site-packages/openerp_web-5.0.0_3.1-py2.4.egg
Copie de fichiers
Deux fichiers sont à copier
cp /usr/lib/python2.4/site-packages/openerp_web-5.0.0_3.1-py2.4.egg/scripts/openerp-web /etc/init.d cp /usr/lib/python2.4/site-packages/openerp_web-5.0.0_3.1-py2.4.egg/config/default.cfg /etc/openerp-web.cfg
Le fichier openerp-web est un exécutable qui a besoin des droits d'exécution, donc
# chmod 755 /etc/init.d/openerp-web
Configuration du service
Le fichier /etc/init.d/openerp-web est à modifier, la ligne 21 passe de
USER="terp"<code>à <code>USER="openerp"
Le fichier /etc/openerp-web.cfg, à la ligne 64, passe de
args="('server.log',)"
à
args="('/srv/applis/openerp/openerp-web.log',)"
pour placer les fichiers de traces dans /srv/applis/openerp/, sachant que ce répertoire doit exister
mkdir -p /srv/applis/openerp/
et être accessible au compte openerp
chown openerp:openerp /srv/applis/openerp/
puis, pour créer un fichier vide, en tant que openerp
$ touch /srv/applis/openerp/openerp-web.log
Vérification
$ ls -lart /srv/applis/openerp/openerp-web.log -rw-r--r-- 1 openerp openerp 0 2009-03-25 00:37 /srv/applis/openerp/openerp-web.log
Modification des "rc files"
Le service n'est pas complètement configuré puiqu'il n'est pas encore dans les répertoires rc*.d
# ls -la /etc/rc*.d/*openerp* ls: /etc/rc*.d/openerp*: Aucun fichier ou répertoire de ce type
la commande suivante, en tant que root va le faire
update-rc.d openerp-web defaults Adding system startup for /etc/init.d/openerp-web ... /etc/rc0.d/K20openerp-web -> ../init.d/openerp-web /etc/rc1.d/K20openerp-web -> ../init.d/openerp-web /etc/rc6.d/K20openerp-web -> ../init.d/openerp-web /etc/rc2.d/S20openerp-web -> ../init.d/openerp-web /etc/rc3.d/S20openerp-web -> ../init.d/openerp-web /etc/rc4.d/S20openerp-web -> ../init.d/openerp-web /etc/rc5.d/S20openerp-web -> ../init.d/openerp-web
Vérification
ls -la /etc/rc*.d/*openerp* lrwxrwxrwx 1 root root 21 2009-03-25 00:43 /etc/rc0.d/K20openerp-web -> ../init.d/openerp-web lrwxrwxrwx 1 root root 21 2009-03-25 00:43 /etc/rc1.d/K20openerp-web -> ../init.d/openerp-web lrwxrwxrwx 1 root root 21 2009-03-25 00:43 /etc/rc2.d/S20openerp-web -> ../init.d/openerp-web lrwxrwxrwx 1 root root 21 2009-03-25 00:43 /etc/rc3.d/S20openerp-web -> ../init.d/openerp-web lrwxrwxrwx 1 root root 21 2009-03-25 00:43 /etc/rc4.d/S20openerp-web -> ../init.d/openerp-web lrwxrwxrwx 1 root root 21 2009-03-25 00:43 /etc/rc5.d/S20openerp-web -> ../init.d/openerp-web lrwxrwxrwx 1 root root 21 2009-03-25 00:43 /etc/rc6.d/K20openerp-web -> ../init.d/openerp-web
Lancement du service
Le lancement va prochainement se faire au démarrage du serveur mais pour tester je le lance en ligne de commande, en tant que root
etc/init.d/openerp-web start
répond
Starting openerp-web: done.
L'ouverture de l'application via votre navigateur internet est maintenant possible et ce sans action manuelle de la main de l'homme.