2.2. Linux Installation

2.2.1. Distrubutions 'supported'

GnuMed is known being actively developed on:

Table 2-1. "Supported" Distributions

DistributionVersionURLFunctional?
Debianunstablewww.debian.orgYes
RedHat???www.redhat.comyes
Suse???www.suse.com 
Mandrake8.2 (2.4.18-6mdk kernel)www.mandrake.comYes
MicrosoftWin98www.microsoft.comyes
Gentoo???www.gentoo.orgYes
Solaris???www.sun.comSporadically
BSD???www.freebsd.orgSporadically
w-smith???www.e-smith.orgserver side only
Mac OS X???www.apple.comUnknown
WinME???www.microsoft.comDoes not work with authentication type "crypt" in pg_hba.conf. Must be "password"

2.2.2. Requirements

GNUMed has run successfully on Linux. It requires a number of packages to be installed before it can be run.

GNUMed requires the following packages:

Table 2-2. Requirements

PackageURLVersion
Python Scripting Languagepython.org2.2
GTK librariesgtk.org1.2
mx extension librariesmxmx
PostgreSQL Database serverpostgresql.org [a] 7.2
wxWindows windowing library wxwindows web site 2.4
wxPython wxpython.org 2.4
PyPgSQLwww.pypgsql.sourceforge.net2.3
Notes:
a. Don't forget to include the Python interface libraries.

This list looks daunting, but Python and GTK libraries are almost invariably installed, and PostgreSQL, if not installed, will be on your Linux CDs somewhere.

Note that the packages should be installed in the listed order, as some depend upon others. Also, if using RPM, you must install the libraries (postgresql-lib), then the main package (postgresql), then the others, including postgresql-python.

On some distros, some of the Python libraries get installed in funny places. So Python can find them, add this line to your .profile:
export PYTHONPATH=/usr/lib/python1.5/site-packages:/usr/local/lib/python2.1/site-packages

NOTE: on some the later distros (Mandrake is where I have seen this), wxGTK does not install as it requires a version of libpng older than what's installed. This old library is vanishing off the web. Here is a mirror

2.2.3. Postgresql

2.2.3.1. Configuring PostgreSQL (quoting Steven Duffy)

Usually PostgresSQL should be started automatically at bootup. Most modern distributions configure PostgresSQL correctly to do so. If you installed the package from sources, some steps may be required to get the PostgreSQL database system running.

First, make sure you have the PostgreSQL server daemon running. Just enter the following lines on the command line:

$ ps ax | grep "postmaster"

 this should print something like 

 212  ?  S    0:00 /usr/local/pgsql/bin/postmaster -i -o -F -D/usr/local/pgsql/...
		

You might as well check under /etc/rc.d/, or run Linuxconf or whatever your distribution offers.

If postmaster isn't running you can set it up with these commands as root:
su - postgres
initdb -D ~postgres/data
postmaster [-i] -D ~postgres/data >logfile 2>&1 &
		

You should enable TCP/IP access to the database. In order to do this you can either add the '-i' option when starting postmaster (see above and below) or do the following:

  1. find and open /etc/postgresql/postgresql.conf

  2. change tcpip_socket = false to tcpip_socket = on

  3. save changes and restart PostgreSQL

If you'd rather like to add the '-i' option and don't know where postmaster is started:

If your distribution uses as postgresql script to start the server, it is likely the pg_ctl is used to run postmaster. In this case, find where pg_ctl is executed and add insert -o \"-i\" as one of the options to pg_ctl. Otherwise, find the script from which postmaster is executed and simply add -i as an argument.

Once PostgreSQL is set up, go to the section on setting up the database (SQL Setup.)

2.2.4. Running GnuMed

To start Gnumed you must go the the client/wxpython directory of the gnumed-CVS tree. If you installed gnumed in your homedir this should be:
cd ~/gnumed/gnumed/client/wxpython

Now type
python gnumed.py

Do not be surprised with a multitude of [WARN} and [INFO] the the python interpreter will spew out. With any luck you will see a login gui

When running from the client/wxpython/ directory of a normal CVS tree it shouldn't be necessary at all to set GNUMED_DIR. Actually, the combination of _setting_ GNUMED_DIR and a subsequent failure on import of GnuMed modules hints towards an incorrectly set GNUMED_DIR. If at all it needs to be set to the directory where your python-common/ subdir resides in the tree.

2.2.4.1. Logging in

You will then be faced with login parameters. If you have set up the postgresql correctly, you only need to fill in the following parameters.

Enter 'test-doc' for login and password as those are the predefined test accounts.

Pressing the button 'options' you can change the parameters used to connect to the database. These should normally be set up correctly so you usually don't have to change anything there.

After pressing the 'Ok' button there should appear a progress bar showing the modules being loaded. Finally the gnumed-GUI will appear.