GnuMed Install Instructions for Mandrake Linux 9.1 by Michael Bonert
Wed Apr 2 00:17:07 EST 2003
Install CVS (from the Mandrake CDs): cvs-1.11.5-1mdk
Install postgresql (from the Mandrake CDs): [1]
Install Postgresql-7.3:
postgresql-7.3.2-5mdk
postgresql-devel-7.3.2-5mdk
postgresql-python-7.3.2-5mdk
postgresql-server-7.3.2-5mdk
postgresql-pl-7.3.2-5mdk
pgaccess-0.98.8.20030117-2mdk # nice to have
postgresql-docs-7.3.2-5mdk # nice to have
Install wxPython -- (version used: wxPythonGTK-py2.2-2.4.0.1-1.i386.rpm)
Install mx extenstion libraries -- (egenix-mx-base-2.0.4-py2.2_1.i386.rpm)
Install pyPgSQL
This package can be installed either from source or from a RPM. Email me (bonerti AT mie DOT utoronto DOT ca) for the RPM.
If you install the RMP:
Before installing pyPgSQL make sure you have the following (from the Mandrake CDs):
libpython2.2-devel-2.2.2-6mdk
Install the rpm and check that everything went right:
$ su root # su postgres # trick to avoid having to know the postgres passwd $ cd /usr/share/doc/pyPgSQL-2.3/test $ python PgSQLTestCases.py this should print: .................................................................. ---------------------------------------------------------------------- Ran 66 tests in 1.090s OK |
IMPORTANT NOTE:
A database user with your user name has to exist for the test to work properly if you are testing as a normal user. See step #10 for how to create database users.
If you would like to install from sources:
Before building and installing pyPgSQL make sure you have the following (from the Mandrake CDs): libpython2.2-devel-2.2.2-6mdk
$ tar zxvf pyPgSQL-2.3.tar.gz[2] $ cd pypgsql |
Set include and library directories in "setup.py" with your favourite editor:
# Set this to 1 if you need to use your own settings USE_CUSTOM = 1 [3] ... if USE_CUSTOM: include_dirs = ["/usr/include/pgsql"] library_dirs = ["/usr/lib/pgsql"] |
Now build pyPgSQL and install it:
$ python setup.py build $ python setup.py install [4] |
Testing pyPgSQL:
$ cd test[5] $ python PgSQLTestCases.py this should print: .................................................................. ---------------------------------------------------------------------- Ran 66 tests in 1.090s OK |
RECOMMENDATION: install gnumed in "/home/your_user_name/" -- where 'your_user_name' is your favourite normal user - e.g. 'michael'
$ export CVS_RSH="ssh" $ cvs -z3 -d:ext:anoncvs@subversions.gnu.org:/cvsroot/gnumed checkout gnumed |
$ su # cd /var/lib/pgsql/data # vi postgresql.conf[6] |
# vi pg_hba.conf |
last part of our "pg_hba.conf" should look like this:
# Using sockets credentials for improved security. Not available everywhere, # but works on Linux, *BSD (and probably some others) #local all all ident sameuser local all all trust host all all 127.0.0.1 255.255.255.255 trust |
(see -- http://mail.gnu.org/archive/html/gnumed-devel/2003-02/msg00079.html)
$ su root # passwd postgres[7] |
# you'll need this password later so remember it. |
If you wish to create a user for gnumed please change sql/gmTestAccounts.sql. Creating them at the command line is not recommended.
Now change back to your normal account and bootstrap the gnumed database.
$ cd /home/your_user_name/gnumed/gnumed/server/bootstrap $ cp bootstrap-standard-AU.conf.sample your_user_name-db.conf $ ln -s /home/your_user_name/gnumed/gnumed/client/python-common modules $ ln -s /home/your_user_name/gnumed/gnumed/server/sql/ sql |
At this point you may want to confirm that postgresql is running:
$ mcc |
click on 'System'
click on 'DrakXServices...'
'postgresql' should say 'running'
$ python bootstrap_gm_db_system.py --conf-file=your_user_name-db.conf |
When prompted:
- yes
- give password
- give another password
NOTE: If you have problems the log file is in: "/home/your_user_name/.bootstrap_gm_db_system"
$ cd # cd to home $ vi .bash_profile # or your favourite text editor |
Add the following:
GNUMED_DIR=$GNUMED_DIR/home/your_user_name/gnumed/gnumed/client |
$ cd /home/your_user_name/gnumed/gnumed/client/wxpython $ python gnumed.py --debug |
[1] | NOTE: If the packages all show up when you do a 'remove software packages' (in 'mcc') they are all installed. |
[2] | gunzip + untar 'pyPgSQL-2.3.tar.gz' |
[3] | Don't forget to change this line!!! |
[4] | NOTE: If the directory settings in 'setup.py' are wrong you will get a misleading error about 'gcc' |
[5] | install directory: ../pypgsql/test |
[6] | change '#tcpip_socket=false' to 'tcpip_socket=on' |
[7] | # change password (I don't know what the default is |