<<<<<< Instructions for gnumed installation on a RedHat 8.0 system >>>>>>> =================== Author: Yudhvir Singh Sidhu, address@hidden Date Created: 4 Nov 03 Modified by: Modified on: Disclaimer: No guarantees if these instructions will work or cause any damage. Purpose: I hope these instructions make it easier and are sufficiently explicit. Help: Refinement is needed, so please send me your suggestions. I'll make changes and send it to the listserv. Since I do not have any other Linux flavor, I am limited to RedHat. =================== I divided gnumed installation in two parts: client-only and client + server. The division is important because the client install is relatively easier and you can use it to connect to a remote database and play with the screens. As you can tell, the database part is being called the server. Both installs require cvs download of the module "gnumed." 1. PREPARATION Download these files. If you have the RH 8.0 set of 5 cds, many of these files are on cds under the RPM directory. Get them together first, the order in which they are installed is important. I'll list that later. NOTE: RedHat's GUI rpm "Package" GUI utility works and is simpler to use than the command line because it figures out dependencies and installs them also. However, it sometimes hangs. Maybe "hangs" is not the right description, it hides so you don't see it on your screen and won't let you install the rpm package. You have to logout and log back in or kill the process. NOTE: It is important that you get the right versions of all these rpms that match your RedHat release. gnumed.org's cvs download directories show which versions belong to which RedHat release. 1.1 PREPARE for CLIENT a. Python Scripting Language from python.org, version 2.2. I used version 2.2.1 installed via the Red Hat "Packages" GUI under "System Settings." The GUI prompts you to put in the right cd, so you don't have to know which one the software is on. gnumed.org reminds us to "Don't forget to include the Python interface libraries." I have no idea what rpm these files are in or what their names are, but apparently they are loaded as part of the python package by the gui install of python. b. GTK libraries from gtk.org, version 1.2, If you have a Gnome windows manager, you probably have these libraries installed. Please keep in mind that KDE uses QT instead of GTK. So, if you have a KDE-only setup, you will have to install these from the rpms on cd or the net. My RedHat setup includes both KDE and GNOME - so I did not have to install these. c. mx extension libraries from mx, no version given from lemburg.com/files/python/eGenix-mx-Extensions.html . I used egenix-mx-base-2.0.5-py2.2_1.i386.rpm. RedHat 8.0 cd contains the mx-2.0.3-6.i386.rpm. d. wxWindows windowing library from wxwindows web site, version 2.4. I used wxGTK-static-2.4.2-1.i386.rpm e. wxPython from wxpython.org, version 2.4. I used wxPythonGTK-py2.2-2.4.2.4-1.i386.rpm 1.2 PREPARE for SERVER a. I used postgresql-libs-7.2.2-1.i386.rpm from the RH 8.0 install cds b. I used postgresql-7.2.2-1.i386.rpm from the RH 8.0 install cds c. PostgreSQL Database server from postgresql.org, version 7.2. I used postgresql-server-7.2.2-1.i386.rpm from the RH 8.0 install cds d. PyPgSQL from www.pypgsql.sourceforge.net, version 2.3. I used pyPgSQL-2.3-1.rh80.i386.rpm 2. CREATE gnumed ACCOUNT CREATE gnudb user ACCOUNT - log in as root and create the user account. 3. GET gnumed via CVS You need not know anything about cvs, just run these commands as user gnumed: a. mkdir gnumed [NOTE: you really do not need to create this directory. I did and all my examples follow that path.] b. cvs -d:pserver:address@hidden:/cvsroot/gnumed login c. cvs -z3 -d:pserver:address@hidden:/cvsroot/gnumed co gnumed This takes some time and brings down all the software and puts it into a directory called gnumed. You will end up with two or three gnumed directories. One created for the user account, the second that you created in 3a above, and cvs creates the third. 4. INSTALL If you are doing a clinet+server install the software should be loaded in the following order. THAT IS THE ORDER THAT I FOLLOWED SUCCESSFULLY. - python - I assume the libraries are loaded at the same time. - GTK libraries - mx extension libraries - PostgreSQL Database server - load the libs first, then the database and lastly the server: a. postgressql-libs b. postgresql database c. postgresql server - wxWindows windowing library - wxPython - PyPgSQL However, if all that you are doing is a client install, I think you can get away with going with the following: 4.1 INSTALL CLIENT - Install the rpms in this order: a. Python and the libraries [This should already be installed. If not, use the RH package manager GUI.] b. GTK libraries [This should already be installed. If not, use the RH package manager GUI.] c. mx d. wxWindows windowing library e. wxPython 4.2 INSTALL SERVER Most people would not install just the server and I did not do that. I am guessing that if you wanted to do that, you would load: a. postgressql-libs b. postgresql database c. postgresql server d. PyPgSQL 5. CONFIGURE FILES and SETUP ENVIRONMENT PARAMETERS 5.1 PYTHONPATH and GNUMED_DIR a. as root: find / -name site-packages b. Copy that full path down c. as user gnumed: vi ~/.bashrc - I am assuming you are running the bash script. It is okay if this file does not exist, vi will create it. Put that directory name in using the export command as below. My lines are: export PYTHONPATH=/usr/lib/python2.2/site-packages export GNUMED_DIR=/home/gnumed/gnumed/gnumed/client d. source ~/.bashrc [this will make that an environment variable. You can check it by typing env|grep PYTHONPATH] 5.2 pg_clog, postgres.conf and PGDATA [NOTE: you can skip this part for a client-only install] a. su - postgres - This should put you in the postgres home directory b. cd data - the actual path on my machine is: /var/lib/pgsql/data c. vi pg_hba.conf - uncomment the "local all" and the "host all" lines towards the bottom of the file. d. vi postgresql.conf and uncomment tcpip_socket line and edit it to read: tcip_socket = on e. uncomment the line: port = 5432 f. exit out of user postgres and come back to user gnumed g. vi ~/.bashrc and add this line: export PGDATA=/var/lib/pgsql/data 5.3 SHORTCUT SCRIPTS mono, check_log, set password and CONFIGURE FILES [NOTE: you can skip this part for a client-only install] a. as user gnumed, cd to the server/bootstrap directory. Mine is cd /home/gnumed/gnumed/gnumed/server/bootstrap b. vi mono and put this line in it: python bootstrap-gm_db_system.py --conf-file=bootstrap-monolithic_core.conf c. exit and type: chmod 744 mono d. vi check_log and put this line in it: tail -100 /home/gnumed/.bootstrap-gm_db_system/bootstrap-gm_db_system.log [NOTE: If your logfile is somewhere else, su - root and do a find / -name "*log*"] e. exit and type: chmod 744 check_log f. as user gnumed and in the bootstrap directory, run ./make-links.sh g. su to root and type passwd postgres and set the password h. in the bootstrap directory vi bootstrap-monolithic_core.conf and uncomment BOTH password lines for gm-dbowner and postgres and type in the passwords. Select a password for gm-dbowner. I selected the same one I use for the gnumed user account. i. While you are in that file, change all the postgres version number lines to reflect your setup. There are about half a dozen such entries. I changed mine to 7.2 6. RUN CLIENT a. as user gnumed, cd to the ....client/wxpython directory. Mine is cd /home/gnumed/gnumed/gnumed/client/wxpython b. ./gnumed.sh - this should bring up a login GUI. If the GUI comes up, you have successfully installed the client. c. Write an e mail to "karsten" and request a hostname, a username, and a password and input them into the GUI. Under the "options" button, select "gnumed-public" and put in the hostname and leave the port as 5432. In the main GUI, input username and pasword. [NOTE: If Karsten gives you "anydoc" as the username and password, he actually means any-doc for both fields. Also NOTE: You should be logged onto the net when you do this, I was user gnumed when I did it.] d. If the GUI does not come up: - lookup the logfile - mine is created at: /home/gnumed/.gnumed/gnumed.log -- gnumed.sh tells you where it is creating one - input the error into google and see what comes up e. If your error lists files "gmCLI" and "gmLog" - the error actually means files "gmCLI.py" and "gmLog.py" These files are on your system. f. This error means that your GNUMED_DIR environment variable is not set to ".....client" directory. Do an env| grep GNUMED_DIR or do an echo $GNUMED_DIR to see if it is set correctly. See section 5.1 above. 7. RUN SERVER a. log out of the gnumed account and log back in for all the environment variables to take affect b. su - postgres and type pg_ctl restart c. exit out of user postgres and back into user gnumed d. in the bootstrap directory, type ./mono e. A loooooooong list will start scrolling by - LEAVE IT ALONE. It will list errors, many of them. Let it run. It should give you a satisfying message: "Done bootstrapping: We probably succeeded." f. su - postgres and do pg_ctl restart - just for good measure. g. Click on the redhat logo and bring up the services GUI - it is under Server Settings. Check the postgres box for the service to load upon bootup. h. Now you can start your client - see 6b above. Except you will not be connecting to a remote server. Your database is gnumed and your host is localhost. Use the gnumed password and the application should come up. i. When you create the database once and stop it with a control-c like I did thinking the long scrolling list is not what I should be seeing. You have to drop it and re-run mono again. I have no clue how to drop a database in postgresql. Since I have "webmin" running, I used that. j. There are other instructions in the gnumed.org installation writeup about how to create a real life instance. I have not reached that far - so I cannot say anything about it. -----------end--------------