Installation Gnuhealth sur Ubuntu 16.04

GNU Health est un progiciel dans le domaine de la santé dont les fonctionnalités couvrent le dossier médical du patient, le système d’information hospitalier et l’informatique médicale.

0 verifier locale

nano /etc/environment

LC_ALL=fr_FR.UTF-8
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR.UTF-8


1/ Installer les dépendances de gnuhealth

sudo -s

#apt-get update

#apt-get install build-essential python-dev python-pip libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev python-ldap bsdtar python-imaging python2.7-cracklib postgresql postgresql-server-dev-all libjpeg-dev
#update-alternatives --install /usr/bin/python python /usr/bin/python3.5 10
# apt install python3-pip



2/ créer l utilisateur gnuhealth

#adduser gnuhealth

3/ Verifier la methode d'authentication PostgreSQL

chercher l'endroit du fichier pg_hba.conf


avec la commande

 #su - postgres -c "psql -t -P format=unaligned -c 'show hba_file'"

éditer le fichier en tant que postgres :
#su postgres

postgres@GNUHEALTHSERVER:/$nano /etc/postgresql/9.5/main/pg_hba.conf





# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5



remplacer par


# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local   all             postgres                                trust

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5


et le fichier postgresql.conf

nano /etc/postgresql/9.3/main/postgresql.conf

remplacer

listen_addresses = 'localhost'

par

listen_addresses = '*'


4/créer l'utilisateur de la base de donnée :

en tant que root

#su - postgres -c "createuser --createdb --no-createrole --no-superuser gnuhealth"

5/ Télécharger et installer gnuhealth en tant que utilisateur gnuhealth

#su - gnuhealth

gnuhealth@GNUHEALTHSERVER:~$cd $HOME

gnuhealth@GNUHEALTHSERVER:~$wget https://ftp.gnu.org/gnu/health/gnuhealth-latest.tar.gz


6/ décompresser l'archive

tar xvf gnuhealth-latest.tar.gz

gnuhealth@GNUHEALTHSERVER:~/$cd  gnuhealth-3.0.8/


gnuhealth@GNUHEALTHSERVER:~/gnuhealth-3.0.8 $./gnuhealth-setup install

gnuhealth@GNUHEALTHSERVER:~/gnuhealth-3.0.8 $source "$HOME"/.gnuhealthrc

7/Activater Network Devices pour  JSON-RPC Protocol


editer le fichier trytond.conf

root@GNUHEALTHSERVER:#nano /home/gnuhealth/gnuhealth/tryton/server/config/trytond.conf

ajouter

[jsonrpc]
listen = *:8000

la gestion des attachments est déja définit ici:

[database]
uri = postgresql://localhost:5432
path = /home/gnuhealth/attach

8/ Démarrer gnuhealth

se positionner dans le répertoire avec l alias cdexe en tant que gnuhealth

#su - gnuhealth

gnuhealth@GNUHEALTHSERVER:$cdexe

creer une base de donnee ex HEALTHDB :

createdb HEALTHDEMO --encoding=unicode --locale=C --template=template0

Definier le mot de passe admin :

./trytond-admin --all --database=HEALTHDEMO

et démarrer avec la commande

gnuhealth@GNUHEALTHSRV:~/gnuhealth/tryton/server/trytond-3.8.12/bin $./trytond --verbose

controler la langue

wget https://ftp.gnu.org/gnu/health/gnuhealth-control-latest.tar.gz

tar xvf gnuhealth-control-latest.tar.gz

su gnuhealth

mettre a jour de langue fr


./gnuhealth-control getlang fr_FR

Tester le serveur en installant le client sur une autre machine


Installation du client tryton

Installer les dependances

#pip2 install --user python-dateutil


wget http://downloads.tryton.org/3.8/tryton-3.8.12.tar.gz

tar xvf tryton-3.8.12.tar.gz

cd tryton-3.8.12/bin

source : https://en.wikibooks.org/wiki/GNU_Health/Installation

Commentaires

Ce commentaire a été supprimé par l'auteur.
s2dar a dit…
avant la CMD /gnuhealth-setup install
J'ai changé la version de python du V2 à V3 via la commande :
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 10
puis j'ai installé pip3
sudo apt install python3-pip
s2dar a dit…
Pour le cas du client :

- Installation des dépendances de python
pip2 install --user python-dateutil

- Télécharger le client:
wget https://ftp.gnu.org/gnu/health/gnuhealth-client-latest.tar.gz

- Untar le client:
tar -xzvf gnuhealth-client-latest.tar.gz

- Lancer le client:
cd gnuhealth-client-3.2.5/bin
./gnuhealth-client