GNU Health/Operating System-Specific Notes

From Wikibooks, open books for an open world
< GNU Health
Jump to: navigation, search

Arch Linux[edit]

Symbol version newer.svg

This chapter applies to version 3.2 of GNU Health.

Install dependencies[edit]

Install Python 3.6 , PIP (for Python3), PostgreSQL server, wget, patch and lsb-release

pacman -S python3 python-pip postgresql wget patch lsb-release

Initialize the DB cluster[edit]

su - postgres
initdb --encoding=unicode --locale=C --pgdata="/var/lib/postgres/data/"
exit

Start and enable the PostgreSQL service[edit]

systemctl start postgresql
systemctl enable postgresql

For detailed information, please refer to the Arch Linux PostgreSQL documentation

Continue with the GNU Health Installation

Debian[edit]

Symbol version newer.svg

This chapter applies to version 3.2 of GNU Health.

Installation done on Debian 9. The following recommendations apply :

  • Use the text installation
  • Remove desktop environment from the installation options
  • Install SSH server
  • Create the gnuhealth user at OS installation time

Activate Python 3 as default interpreter[edit]

cd /usr/bin
ln -si python3 python


Install requirements[edit]

apt-get install postgresql python3-pip


Continue with the GNU Health Installation


FreeBSD[edit]

Symbol version newer.svg

This chapter applies to version 3.2 of GNU Health.

At Operating System installation[edit]

  • Select SSHD
  • Create the gnuhealth user at installation time

Install requirements[edit]

pkg install python36 postgresql96-server py36-pip wget bash py36-lxml py36-pillow patch

Make symlinks on Python3, pip and 2to3

cd /usr/local/bin
ln -si python3.6 python
ln -si 2to3-3.6 2to3
ln -si pip3-6 pip


Init PostgreSQL cluster[edit]

service postgresql oneinitdb

Apply Security Patches using GNU Patch[edit]

The current GNU Health setup installation procedure uses GNU patch (instead of FreeBSD patch). Please apply the patch after the executing "gnuhealth-setup install" as follows.

source .gnuhealthrc
cdexe
cd ../trytond/res
gpatch -p2 < $HOME/gnuhealth-3.2.0/patches/security/GNUHEALTH32-SA-2017-1.trytond.patch.asc

The next gnuhealth-setup program will take this into account and apply the patch in FreeBSD automatically.


Continue with the GNU Health Installation

Symbol version newer.svg

This chapter applies to version 3.2 of GNU Health.

OpenSUSE[edit]

There are two ways of installing GNU Health on OpenSUSE:

  • Method A : Installing GNU Health vanilla version on Leap 42.3

OR

  • Method B: Installing GNU Health using the Leap 42.3 packages


Method A: Installing GNU Health vanilla version on Leap 42.3[edit]

Choose the method you like most, but please use only one, don't install both :)

We have done the installation using the following scenario. This provides a very light, yet functional environment for running the GNU Health server :

  • Download the OpenSUSE Leap 42.3 Network CD image
  • Check the standard partitioning and FS options (note that Leap 42.3 uses by default BTRFS)
  • Select SERVER (text only) installation
  • Enable SSHD server
  • Create the user "gnuhealth" when prompted at installation time.


Install the requirements

zypper install python3 python3-devel python3-pip patch postgresql-server postgresql postgresql-devel gcc libxml2-devel libxslt-devel lsb-release libjpeg8-devel libffi48-devel

Make the link to use python as the default interpreter

ln -si /usr/bin/python3 /usr/bin/python

Initialize the PostgreSQL environment. The next systemctl start command will generate the initial pg cluster.

systemctl start postgresql

Method B: Installing GNU Health using the Leap 42.3 packages[edit]



NOTE : If you used Method A please DO NOT use this method ! They are mutually exclusive !

GNU Health is shipped with the openSUSE Leap 42.3, providing a very simple way setting things up, and getting the latest GNU Health 3.2 patch level.

zypper install gnuhealth

See the official announcement or watch the installation video - same procedure for Leap and Tumbleweed.

For all other openSUSE Releases you can install from packages as well, please check the Community pages

Continue with the GNU Health Installation

Ubuntu[edit]

Symbol version newer.svg

This chapter applies to version 3.2 of GNU Health.

  • These instructions apply to Ubuntu 16.04 Server version
  • Create the gnuhealth user at installation time

Select PostgreSQL and SSH server during the installation

  • PostgreSQL database
  • OpenSSH server

Install requirements[edit]

apt-get install python3-pip
If you have problems with the previous step, please check this link -> https://packages.ubuntu.com/xenial/all/python3-pip/download

Make the links to Python3 and 2to3[edit]

login as gnuhealth user

Change to root

sudo bash
cd /usr/bin
ln -si python3 python
ln -si 2to3-3.5 2to3
exit



Continue with the GNU Health Installation

Installation