| AMMAN-JORDAN

How to install Gnuhealth 3.6 with trytond 5.0 on ubuntu 18.04 server

By

Gnuhealth 3.6 software with trytond 5.0 on ubuntu 18.04 server

how to install Gnuhealth on ubuntu 18.04 server.
Gnuhealth 3.6 software Installation with trytond on ubuntu 18.04
By

Gnuhealth is a free, open source medical system developed in python with postgresql database

it has health and hospital information system.

To Install Gnuhealth 3.6 with trytond on ubuntu 18.04 follow these steps :

First Open Terminal on your ubuntu-18.04 server :

Needed Packages for Software

  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install python3-pip

install postgresql database, gunicorn which is wsgi http server for unix :-

  • sudo apt-get install python3-dev libpq-dev postgresql postgresql-contrib
  • pip3 install psycopg2 gunicorn flask

Here we will start working on database configuration

  • sudo nano /etc/postgresql/10/main/pg_hba.conf
  • change (host all all all md5) record to (local all all trust)
  • Here we want to create a gnuhealth user 
     
    su - postgres
    psql
    create user gnuhealth with CREATEDB;
    \q
    exit
     
  • systemctl restart postgresql
  • sudo adduser gnuhealth
  • sudo adduser gnuhealth sudo
  • su - gnuhealth
  • Using terminal run these commands
  • gpg --recv-key 0xC015E1AE00989199
    
    gpg --with-fingerprint --list-keys 0xC015E1AE00989199
    
    wget https://ftp.gnu.org/gnu/health/gnuhealth-3.6.2.tar.gz.sig
    
    gpg --verify gnuhealth-3.6.2.tar.gz.sig gnuhealth-latest.tar.gz
    
    tar xzf gnuhealth-latest.tar.gz
    
    cd gnuhealth-3.6.2
    
    wget -qO- https://ftp.gnu.org/gnu/health/gnuhealth-setup-latest.tar.gz | tar -xzvf -
    bash ./gnuhealth-setup install
    pip3 uninstall Werkzeug
    pip3 install Werkzeug ==0.15.6
    source ${HOME}/.gnuhealthrc
    cd 
    createdb health
    cdexe
    python3 ./trytond-admin —all —database=health
     
  • Add UserName and Password for database
  • cd
  • sudo nano /etc/systemd/system/gnuhealth.service
     
  • Add these information inside gnuhealth.service file
  • [Unit]
    Description=GNU Health Server
    After=network.target
    [Service]
    Type=simple
    User=gnuhealth
    WorkingDirectory=/home/gnuhealth
    ExecStart=/home/gnuhealth/start_gnuhealth.sh
    logconf=/home/gnuhealth/gnuhealth/tryton/server/config/gnuhealth_log.conf
    Restart=on-abort
    [Install]
    WantedBy=multi-user.target
     
  • cd
  • If you want to use Sao (so you can open software throw web-browser) for gnuhealth system then use this link to install sao now after installing soa add this lines for trytond.conf to configure sao, But in this article we will be using tryton-client
  • cd /home/gnuhealth/gnuhealth/tryton/server/config
     
  • sudo nano trytond.conf
  • [web] # These Lines for Soa
    # Path for the web-frontend
    listen = 0.0.0.0:8000
    root = /home/gnuhealth/sao # but the directory depends on where did you installed sao
     
  • Finally
  • sudo systemctl enable gnuhealth
  • sudo systemctl start gnuhealth
  • Now install tryton client on your client pc throw :-
  • And install tryton-5.0.14 version
    • tryton-5.0.14.exe
  • Run tryton5.0 client and put your IP:port, database, username, password as you see in the below image.

tryton5.0 client configuration. host:port, database, username and password

  • Done !!

© 2020 PyOdoo.

TOPICS:  Tryton