Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 761c4f285d3afa353219933c4b5717e0 > files > 78

gnumed-doc-1.2.9-1.fc18.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
	<title> GmManualServerInstall &lt; Gnumed &lt; Foswiki</title>
		  
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="robots" content="noindex" /> <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="WebRss.html" />
	<link rel="icon" href="../rsrc/System/ProjectLogos/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="../rsrc/System/ProjectLogos/favicon.ico" type="image/x-icon" />
	<link rel="alternate" href="http://wiki.gnumed.de/bin/edit/Gnumed/GmManualServerInstall?t=1362919418" type="application/x-wiki" title="edit GmManualServerInstall" />
	<meta name="description" content="GmManualServerInstall" />
	 <!--[if IE]></base><![endif]-->
	
	<style type="text/css" media="all">
@import url('../rsrc/System/SkinTemplates/base.css');
</style>
<style type="text/css" media="all">
@import url('../rsrc/System/SkinTemplates/default.css');
</style>
<!--[if IE]><style type="text/css" media="screen">
pre {
	overflow-x:auto;
	padding-bottom:expression(this.scrollWidth > this.offsetWidth ? 16 : 0);
}
</style>
<![endif]-->

<meta name="foswiki.PUBURL" content="http://wiki.gnumed.de/pub" /> <!-- PUBURL -->
<meta name="foswiki.PUBURLPATH" content="/pub" /> <!-- PUBURLPATH -->
<meta name="foswiki.SCRIPTSUFFIX" content="" /> <!-- SCRIPTSUFFIX -->
<meta name="foswiki.SCRIPTURL" content="http://wiki.gnumed.de/bin" /> <!-- SCRIPTURL -->
<meta name="foswiki.SCRIPTURLPATH" content="/bin" /> <!-- SCRIPTURLPATH -->
<meta name="foswiki.SERVERTIME" content="10%20Mar%202013%20-%2013:43" /> <!-- SERVERTIME -->
<meta name="foswiki.SKIN" content="twikinet%2c%20pattern" /> <!-- SKIN -->
<meta name="foswiki.SYSTEMWEB" content="System" /> <!-- SYSTEMWEB -->
<meta name="foswiki.TOPIC" content="GmManualServerInstall" /> <!-- TOPIC -->
<meta name="foswiki.USERNAME" content="KarstenHilbert" /> <!-- USERNAME -->
<meta name="foswiki.USERSWEB" content="Main" /> <!-- USERSWEB -->
<meta name="foswiki.WEB" content="Gnumed" /> <!-- WEB -->
<meta name="foswiki.WIKINAME" content="KarstenHilbert" /> <!-- WIKINAME -->
<meta name="foswiki.WIKIUSERNAME" content="Main.KarstenHilbert" /> <!-- WIKIUSERNAME -->
<meta name="foswiki.NAMEFILTER" content="%5b%5cs%5c*%3f~%5e%5c%24%40%25%60%22'%26%3b%7c%3c%3e%5c%5b%5c%5d%23%5cx00-%5cx1f%5d" /> <!-- NAMEFILTER --><!--JQUERYPLUGIN::FOSWIKI::META-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/jquery-1.4.3.js'></script><!--JQUERYPLUGIN-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/plugins/livequery/jquery.livequery.js'></script><!--JQUERYPLUGIN::LIVEQUERY-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.js'></script><!--JQUERYPLUGIN::FOSWIKI-->
<script type='text/javascript' src='../rsrc/System/JSTreeContrib/jquery.jstree.js'></script><!--JQUERYPLUGIN::JSTREE-->
</head>
<body class=""><div class="foswikiPage">
<a name="PageTop"></a> 
<p></p>
<p></p>
<h1><a name="GNUmed_Server_Installation"></a>  GNUmed Server Installation </h1>
<p></p>
Whereas the public server does permit basic (if slow) access to GNUmed for a "first feel", the following steps are for the purpose of installing a <strong>local</strong> database, meaning one on the computer that you are operating. While a local database is both faster and more usable than the public server, it requires some work to set up.
<p></p>
Before you attempt to install a GNUmed database, you will need to:
<p></p>
1) <a href="ConfigurePostgreSQL.html">ConfigurePostgreSQL</a>
<p></p>
2) Download a server package, or a server tarball from the <a href="http://www.gnumed.de/downloads/server/" target="_top">official ftp</a> . It's been suggested (Sebastian, July 1 2010) that the files should be in /tmp to help avoid some unhlndled exceptions
<p></p>
<p></p>
Now that your system is ready, let's get to the fun stuff. 
<p></p>
<a name="foswikiTOC"></a><div class="foswikiToc"> <ul>
<li> <a href="#Install_a_new_GNUmed_database_63"> Install a new GNUmed database? </a> <ul>
<li> <a href="#Be_root_or_postgres"> Be root or postgres </a>
</li> <li> <a href="#About_the_bootstrapper_script"> About the bootstrapper script </a>
</li> <li> <a href="#Erase_any_existing_GNUmed_databases_44_and_their_data"> Erase any existing GNUmed databases, and their data </a>
</li> <li> <a href="#Debian_40Stable_124_Testing_124_Unstable_41:_deb_packages"> Debian (Stable | Testing | Unstable): deb packages </a>
</li> <li> <a href="#Ubuntu_40Hardy_124_Intrepid_124_Jaunty_124_Karmic_41:_deb_packages"> Ubuntu (Hardy | Intrepid | Jaunty | Karmic): deb packages </a>
</li> <li> <a href="#Debian_44_40_42_41buntu_44_Mandriva:_net_install"> Debian, (*)buntu, Mandriva: net install </a>
</li> <li> <a href="#Mandriva"> Mandriva </a>
</li> <li> <a href="#A_33openSuSE:_rpm_packages"> openSuSE: rpm packages </a>
</li> <li> <a href="#PCLinuxOS"> PCLinuxOS </a>
</li> <li> <a href="#generic_Linux_and_MacOSX:_local_install"> generic Linux and MacOSX: local install </a>
</li> <li> <a href="#Windows"> Windows </a>
</li> <li> <a href="#After_bootstrapping..."> After bootstrapping... </a>
</li></ul> 
</li> <li> <a href="#Troubleshooting_and_specific_notes"> Troubleshooting and specific notes </a>
</li> <li> <a href="#Inside_the_Bootstrapper"> Inside the Bootstrapper </a>
</li></ul> 
</div>
<p></p>
<h2><a name="Install_a_new_GNUmed_database_63"></a>  Install a new GNUmed database? </h2>
<p></p>
Apply the methods on this page if you have never yet installed a GNUmed database on the target machine, or if you are totally certain that <strong>any existing GNUmed data</strong> is experimental-only, and can <strong>be permanently destroyed</strong>. If what you wish to do is to <em>upgrade</em> a GNUmed database <em>without</em> losing data, first backup your data using the <a href="GmManualDatabaseBackupRestore.html">Data Backup and Restore procedures</a>, and proceed to <a href="GmManualServerUpgrade.html">GmManualServerUpgrade</a>.
<p></p>
<h3><a name="Be_root_or_postgres"></a>  Be root or postgres </h3>
<p></p>
The GNUmed database installation is typically done by user <code>root</code> or by a user who was able to become (using <code>su</code>) <code>postgres</code>. Success of the script under <code>some_other_user</code> is only otherwise possible when <code>some_other_user</code> had been explicitly granted the required access rights. The one exception is the "net install" option, which is run as a regular user&#8230; see below.
<p></p>
<h3><a name="About_the_bootstrapper_script"></a>  About the bootstrapper script </h3>
<p></p>
Whichever method below is used to obtain the server software, you will need to run the bootstrapper script.
<p></p>
When it is run, it will <ul>
<li> prompt for a password for the database owner gm-dbo (unless the .conf files already contain a password, even if blank) <ul>
<li> if this password is lost, it can be reset by <ul>
<li> user postgres running the psql command <br>  <code>ALTER ROLE "gm-dbo" ENCRYPTED PASSWORD 'a secret string';</code>
</li> <li> running, as root, the (July 2010) server script: <br> server/gm-set_gm-dbo_password <NEW_PASSWORD>
</li></ul> 
</li></ul> 
</li> <li> the bootstrapper will then <ul>
<li> bootstrap (set up) the baseline <code>v2</code> database
</li> <li> apply successive upgrades to get the database up to the latest version
</li> <li> note: this approach was adopted to ensure a reliable upgrade path to the latest database.
</li></ul> 
</li></ul> 
<p></p>
Caveats: <ul>
<li> using pre-made packages (from Debian 'testing' or newer) will result in the latest officially-released server, known by its database "version"
</li> <li> servers (databases) that you may bootstrap from CVS, snapshot tarballs, or server "release candidates" are for <strong>testing only</strong> and <strong>must not</strong> be used in production as the database schema might stil change. Moreover, while installing from the CVS tree will result in the latest in-development version, beware that sometimes the CVS is buggy and/or not runnable.
</li></ul> 
<p></p>
The bootstrapper depends on your already having installed a minimum Postgres version of 8.1. For maximum satisfaction (especially when searching for patients with diacritics or umlauts in their name), we recommend running on the <strong>PostgreSQL 8.3</strong> included in Debian 'Lenny' and many other recent Linuxes and likewise available for Mac OS, Windows, Unix. See our <a href="PostgreSQL.html">PostgreSQL</a> wiki page for an issue about Postgres 8.4.
<p></p>
The bootstrapper assumes that, on the target machine on which the bootstrapper would be run: <ul>
<li> <a href="ConfigurePostgreSQL.html">ConfigurePostgreSQL</a> has already been done
</li> <li> the <a href="PostgreSQL.html">PostgreSQL</a> server itself is running
</li> <li> any existing GNUmed database is non-production (as re-running the script will destroy the data)
</li> <li> any existing GNUmed clients are logged out of any target machine GNUmed
</li></ul> 
<p></p>
More about the boostrapper is appended (see Inside the Bootstrapper).
<p></p>
<h3><a name="Erase_any_existing_GNUmed_databases_44_and_their_data"></a>  <em>Erase</em> any existing GNUmed databases, and their data </h3>
<p></p>
Are you reading this? Truly? The installation process will <strong>erase (destroy) existing GNUmed databases</strong> up to and including the version specified in the bootstrapper.
<p></p>
<h3><a name="Debian_40Stable_124_Testing_124_Unstable_41:_deb_packages"></a>  Debian (Stable | Testing | Unstable): deb packages </h3>
<p></p>
The default OS in development of GNUmed is Debian <strong>testing</strong>, so <strong>stable</strong> and <strong>unstable</strong> should be supported as long as a sufficiently-current PostgreSQL is installed, configured and working properly. 
<p></p>
Normally, it would be enough for those evaluating gnumed to do, as <em>root</em> or with <code>sudo</code>, <br>
   <code>apt-get -t testing install gnumed-server</code> <br>
or, if already using a Debian 'testing' distribution, a GUI tool like 'Synaptic package manager'.
<p></p>
The server package moves the files necessary for bootstrapping/upgrading databases into /var/lib/gnumed/server/ and also installs a
few man pages and commands:
<p></p> <ul>
<li> run (as <em>root</em> or with <code>sudo</code>) the system-wide command <code>gm-bootstrap_server</code>
</li> <li> optionally see <ul>
<li> <code>man -k gnumed</code>
</li> <li> <code>man gm-bootstrap_server</code>
</li> <li> <code>man gm-upgrade_server</code>
</li> <li> <code>/usr/share/doc/gnumed-server/README.Debian</code>
</li></ul> 
</li></ul> 
<p></p>
<h3><a name="Ubuntu_40Hardy_124_Intrepid_124_Jaunty_124_Karmic_41:_deb_packages"></a>  Ubuntu (Hardy | Intrepid | Jaunty | Karmic): deb packages </h3>
<p></p>
Ubuntu packages for the GNUmed server part are available through the GNUmed team's personal package. To get the 'gnumed-server' package one needs to add the software repository 'GNUmed PPA' to the list of sources. This can be achieved through tools like 'Synaptic package manager'.
<p></p> <ul>
<li> The line to add manually is referenced in the <a href="https://launchpad.net/~gnumed/+archive/ppa" target="_top">GNUmed team's PPA</a>
</li></ul> 
<p></p>
The server package moves the files necessary for bootstrapping/upgrading databases into /var/lib/gnumed/server/ and also installs a
few man pages and commands:
<p></p> <ul>
<li> run (as <em>root</em> or with <code>sudo</code>) the system-wide command <code>gm-bootstrap_server</code>
</li> <li> optionally see <ul>
<li> <code>man -k gnumed</code>
</li> <li> <code>man gm-bootstrap_server</code>
</li> <li> <code>man gm-upgrade_server</code>
</li> <li> <code>/usr/share/doc/gnumed-server/README.Debian</code>
</li></ul> 
</li></ul> 
<p></p>
<h3><a name="Debian_44_40_42_41buntu_44_Mandriva:_net_install"></a>  Debian, (*)buntu, Mandriva: net install </h3>
<p></p> <ul>
<li> download the <a href="http://cvs.savannah.gnu.org/viewvc/gnumed/gnumed/server/bootstrap/net_install-gnumed_server.sh?root=gnumed&amp;view=markup" target="_top">network-based install script</a> which will download the lastest server release and will take care of installing any packages the server needs, if necessary.
</li> <li> make sure the file is <a href="http://oreilly.com/pub/a/mac/2005/09/09/terminal4.html?page=3" target="_top">executable</a>
</li> <li> as <em>a regular user</em>, run <code>./</code> the file <code>net_install-gnumed_server.sh</code> <ul>
<li> at some place(s) in the script, you will need to supply the <em>root</em> password
</li> <li> you may want to inspect the file for bugs, before running it
</li></ul> 
</li></ul> 
<p></p>
<h3><a name="Mandriva"></a>  Mandriva </h3>
<p></p> <ul>
<li> there are prepackaged <a href="MandrivaGuideShort.html">server RPMs</a> available, thanks go to Michael Schuett and florian/doktor5000
</li> <li> some <a href="MandrivaLinux.html">more info</a>
</li></ul> 
<p></p>
<h3><a name="openSuSE:_rpm_packages"></a> openSuSE: rpm packages </h3>
<p></p>
Prepackaged RPM packages are available for installation of the GNUmed server. 
<p></p>
Either use the 1-click installers from <a href="InstallerGuideHomeShort.html#opensuseone">the download page</a>
<p></p>
<strong>or</strong> use GUI tool like 'Yast package manager' <strong>or</strong>, as <em>root</em> or with <em>sudo</em>, run=zypper install gnumed-server=
<p></p>
The server package moves the files necessary for bootstrapping/upgrading databases into /usr/lib/gnumed/server/ and also installs a
few man pages and commands:
<p></p> <ul>
<li> run (as <em>root</em> or with <code>sudo</code>) the system-wide command <code>gm-bootstrap_server</code>
</li> <li> optionally see <ul>
<li> <code>man -k gnumed</code>
</li> <li> <code>man gm-bootstrap_server</code>
</li> <li> <code>man gm-upgrade_server</code>
</li> <li> <code>/usr/share/doc/gnumed-server/README.Debian</code>
</li></ul> 
</li></ul> 
<p></p>
<h3><a name="PCLinuxOS"></a> PCLinuxOS </h3>
<p></p> <ul>
<li> prepackaged <a href="PCLinuxOSGuideShort.html">server RPMs</a> are available thanks to Paul Grinberg
</li></ul> 
<p></p>
<h3><a name="generic_Linux_and_MacOSX:_local_install"></a>  generic Linux and MacOSX: local install </h3>
<p></p> <ul>
<li> setup a directory <ul>
<li> <code>mkdir gnumed-server</code>
</li> <li> <code>cd gnumed-server</code>
</li></ul> 
</li></ul> 
<p></p> <ul>
<li> if you want to install an official release <ul>
<li> download the <a href="http://www.gnumed.de/downloads/server/GNUmed-server.latest.tgz" target="_top">latest server release</a> <ul>
<li> <code>wget http://www.gnumed.de/downloads/server/GNUmed-server.latest.tgz</code>
</li> <li> <code>tar -xvzf GNUmed-server.latest.tgz</code>
</li></ul> 
</li> <li> you now have a versioned subdirectory, for example <em>GNUmed-v9</em> <ul>
<li> <code>cd GNUmed-v9/server/bootstrap/</code>
</li></ul> 
</li></ul> 
</li></ul> 
<p></p> <ul>
<li> if you want the bleeding edge <ul>
<li> checkout the CVS tree
</li> <li> you can use <a href="http://www.gnumed.de/~ncq/gnumed/cvs-access/get-gnumed-anon.sh" target="_top">this script</a>
</li></ul> 
</li></ul> 
<p></p> <ul>
<li> if your PostgreSQL server is listening on a port other than 5432: <ul>
<li> set the environment variable <code>GM_DB_PORT</code>
</li></ul> 
</li></ul> 
<p></p> <ul>
<li> go to <code>server/bootstrap/</code>
</li> <li> run (as <strong>root</strong> or with <em>sudo</em>) <code>bootstrap-latest.sh</code> <ul>
<li> NOTE: Mac OS and Ubuntu do not support the <code>su -c</code> command... without which are disabled one check and one cleanup routine or in other words non-fatal
</li></ul> 
</li></ul> 
<p></p>
You will need to have taken care of installing any required packages yourself. While you can find the full list of packages <a href="http://cvs.savannah.gnu.org/viewvc/gnumed/gnumed/server/bootstrap/net_install-gnumed_server.sh?root=gnumed&amp;view=markup" target="_top">here</a>, Mac users who simply want to get a copy of Postgres and a GNUmed server running locally on their Machine may like to view <a href="http://lists.gnu.org/archive/html/gnumed-devel/2008-01/msg00023.html" target="_top">this post</a> to the gnumed-devel list.
<p></p>
<h3><a name="Windows"></a>  Windows </h3>
<p></p> <ul>
<li> see <a href="DatabaseOnWindows.html">here</a>
</li></ul> 
<p></p>
<h3><a name="After_bootstrapping..."></a>  After bootstrapping... </h3>
<p></p> <ol>
<li> Were there problems during attempted bootstrap, or with users trying to connect to the database? Here are signs that you must recheck proper postgres configuration as per <a href="ConfigurePostgreSQL.html">ConfigurePostgreSQL</a>:
</li>  </ol><ul>
<li> you had hoped to bootstrap as any system user other than <code>root</code> or <code>postgres</code> but cannot
</li> <li> (after bootstrapping) your GNUmed client software cannot connect to a GNUmed server installed on your local machine
</li> <li> clients cannot connect from any machine, other than from your own
</li>  </ul><ol>
<li> Next, restart your <a href="http://www.postgresql.org/" target="_top">PostgreSQL</a> server to let any changes take effect. On Linux / Unix including MacOS X the methods are, in decreasing order of advisability:
</li>  </ol><ul>
<li> <code>/etc/init.d/postgresql-8.3 restart</code>
</li> <li> <code>pg_ctlcluster 8.3 main restart</code>
</li> <li> or reboot your machine (think "Windows")
</li></ul> 
<p></p>
From here, you can proceed to <a href="GmManualStartingGnumed.html#LoggingIn">Starting GNUmed</a> for which you may need to modify the <code>gnumed.conf</code> file of the GNUmed client to enable it to find your newly created backend.The easiest way to do this is - as <strong>root</strong> - copy the file <code>/etc/gnumed/gnumed-client.conf</code> (or, for client versions below 0.4x, the file <code>/etc/gnumed/gnumed.conf</code>) over to <code>/home/userid/.gnumed/</code>. Then log in as that <strong>user</strong> and start GNUmed. 
<p></p>
By default, the bootstrap inserts a logon banner into one of the tables, warning users that the database to which they are connecting is <strong>not</strong> a production database. This is kept in a single row in the table <code>cfg.db_logon_banner</code> (there can only be one row in that table at any given time). A screenshot can be viewed, attached to <a href="http://lists.gnu.org/archive/html/gnumed-devel/2005-12/msg00263.html" target="_top">this archive message</a>. For deactivation, delete the row from the table or, alternatively, replace it with your own logon banner. The latter is especially recommended for anyone who would want to have a remote server, to leave no question as to which database server (clinic, hospital, home, etc.) a client is connecting.
<p></p>
Make sure to remove test accounts (<em>any-doc</em>, etc) and to possibly set up your own client config file(s) when you go into production.
<p></p>
<h2><a name="Troubleshooting_and_specific_notes"></a>  Troubleshooting and specific notes </h2>
<p></p> <ul>
<li> if you see the error message <code>ERROR_STACK_DEPTH exceeded</code> during bootstrapping <ul>
<li> set <code>lc_messages</code> to <code>'C'</code> in <code>postgresql.conf</code>
</li> <li> in recent versions this is done by the bootstrapper automatically
</li></ul> 
</li> <li> more is at <a href="TroubleshootPostgreSQL.html">Troubleshoot PostgreSQL</a>
</li></ul> 
<p></p>
<h2><a name="Inside_the_Bootstrapper"></a>  Inside the Bootstrapper </h2>
<p></p>
This section explains how the bootstrapping works conceptually so that you can derive how to run it on your OS.
<p></p>
The process roughly goes like this:
<p></p> <ul>
<li> create baseline v2 database
</li> <li> import all the necessary tables
</li> <li> import any necessary translation files for the languages you wish to support
</li> <li> grant appropriate access rights
</li> <li> upgrade the v2 baseline database iteratively to produce the latest revision
</li></ul> 
<p></p>
On GNU/Linux, once Postgres has been installed, and database accounts (e.g. <em>gm-dbo</em>) <a href="ConfigurePostgreSQL.html">configured</a>, <em>and</em> the GNUmed program files have been <a href="SourcesFromVcsOnGnuLinux.html">installed from CVS</a> or from <a href="InstallerGuideLin.html">tarball snapshot</a>, the database installation steps can all be handled automatically by the Python script <em>bootstrap_gm_db_system.py</em> living in <em>gnumed/server/bootstrap/</em>. Several config files for bootstrapping are supplied in that same directory.
<p></p>
The process is further simplified, as described above, by the use of provided shell scripts. These will themselves call the bootstrap script, and will supply the needed command line options by issuing calls like:
<p></p>
<pre>
    ./bootstrap&#95;gm&#95;db&#95;system.py --conf-file&#61;&#60;a config file&#62;
</pre>
<p></p>
If you want to tweak things by hand read the config files and the source of the bootstrapping scripts. All the config file parameters are documented in <code>bootstrap-standard.conf.template</code>.
<p></p>
<a name="TopicEnd"></a>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
</body></html>