FreeMED Installation Instructions on a SuSE 10 Server
These installation instructions were kindly contributed by Philipp Meng.
FreeMED and Remitt on a SuSE 10 Server
difficulty: medium
This HowTo is written for people who know how to set up a linux-server and know what the console is. I think this installation is a little difficult because the installation of the Remitt-Server involves manual configuration. This HowTo is GUI based. It is based on the FreeMED-Installation-Instructions for Debian from Jeff and the HowTo found on the SuSEWiki.
Used System-Configuration:
1. Base Configuration
I suppose you already set up SuSE 10 correctly. You don't even need a window manager to be installed - but it's easier.
Please make sure that SuSE 10 is running correctly and there are no hardware errors which could harm the system in any way.
2. Dependencies
To get the basic dependencies, you can do it two ways - GUI based or Console based.
GUI: Start YaST2 and install the following packages:
perl
perl-Text-Iconv
perl-XML-Parser
perl-CGI-Application
perl-libxml-perl
perl-libwww-perl
perl-XML-LibXML
perl-XLM-XSLT
perl-Crypt-SSLeay
perl-XML-Simple
perl-Config-IniFiles
perl-IO-Socket-SSL
perl-DBD-SQLite
perl-Compress-Zlib
perl-SOAP-Lite
perl-RPC-XML
perl-Apache-Session
perl-XML-LibXML-Common
subversion
mysql
phhp4-mysql
php4-session
php4-pear
php4
apache2
apache2-mod_php4
apache2-prefork
djvulibre
netpbm
ImageMagick
tetex
cups
cups-client
ghostscript-library
pdf
bind
lynx
ncftp
Console: Log in as root and then type:
yast -i <package1> <package2> <packagen> ..>
(Take all packages from above)
This list doesn't include all of the dependencies. We need the CGI::Session Module for perl. Unfortunately there is no such .rpm package for SuSE, so we have to obtain it from CPAN. Do this with the following command:
perl -MCPAN -e 'install CGI::Session'
Now follow the instructions of this program carefully! When the program finishes without errors then the CGI::Session module should be installed correctly.
php-webtools is the one package that is still missing. Download the noarch.rpm from sourceforge at:
http://sourceforge.net/project/showfiles.php?group_id=8420
Select a mirror site near you and click on Download. After the file is downloaded, go to the directory where it is and type:
yast -i <exact filename>
This will install php-webtools on your SuSE-system.
3. Install FreeMED and ReMitt
Now that we have all of the required packages, we can download and install FreeMED and Remitt from subversion.
On the console, as root, type:
subversion co http://svn.freemedsoftware.org/freemed/branches/0.8.x freemed
to install FreeMED.
To install Remitt type:
subversion co http://svn.freemedsoftware.org/remitt/trunk remitt
4. Configure Apache2 and MySQL
Now configure Apache2 and MySQL to function properly with FreeMED.
Change the ownership of apache2, while still in the /usr/share directory, with the command:
chown -Rf wwwrun:www freemed
Now create a freemed.conf file in /etc/apache2/vhost.d which contains the following:
AddType application/x-httpd-php .php .phtml .php3
Alias /tmp /bills
<Directory "/usr/share/freemed">
DirectoryIndex index.php
Options Indexes Includes ExecCGI Multiviews FollowSymLinks
AllowOverride All
Order allow, deny
allow from all
</Directory>
Now edit the /etc/sysconfig/apache2 file and set
APACHE_SERVERNAME="127.0.0.1"
Finally, edit the /etc/apache2/listen.conf by uncommenting the line:
NameVirtualHost *
This completes the Apache2 configuration. Now MySQL has to be configured.
It is suggested that you make MySQL more secure by setting a root password and adding several restrictions.
Start the MySQL daemon by typing:
rcmysql start
(if you get an error message, add the parameter -p and enter your mysql-root password)
You can now administer MySQL. Type the following commands and after each command press Enter:
CREATE DATABASE freemed;
GRANT ALL ON freemed.* TO arbitrary_user_name@localhost IDENTIFIED BY 'your_password';
(Please type the username and password you would like FreeMED to use to connect to the database).
Now set up a mysql account that has full access to the database. Reload the priviledges table and exit.
FLUSH PRIVILEDGES;
EXIT;
Now open YAST -> System -> Runlevel-Editor, click on the radiobutton "expert-mode', choose mysql from the list and put checks in front of 3 and 5. Finally, go to "start-stop" and select "Start this Service". A new window should now open and write the output of the mysql-start script. Just click on OK.
5. Configure FreeMED
Tell FreeMED the database user and database password by editing the /usr/share/freemed/settings.php file.
Insert the username and password in the lines:
define ('DB_USER' "username");
define ('DB_PASSWORD' "password");
6. Configure Remitt
Remitt has to start at boot up and has to respond in specific ways.
Make a symbolic link to the init.script:
ln -s /usr/share/remitt/debian/init.d/ /etc/init.d/remitt
Now open YAST -> System -> Runlevel-Editor, click on the radiobutton "expert-mode', choose remitt from the list and put checks in front of 3 and 5. Finally, go to "start-stop" and select "Start this Service". A new window should now open and write the output of the Remitt-startup script.
Now set up the Remitt-user and Remitt-password.
cd /usr/share/remitt
./bin/sqlite_user_admin.pl create remitt_username remitt_password
(Replace the remitt_username and remitt_password with the settings that you have chosen).
Finished!
If the installation was successful, you can access FreeMED by entering the following URL in your browser: http://localhost/freemed
Once you have logged in, go to Main ->Administration Menu ->System Configuration ->Remitt Billing System to add the Remitt-username, the Remitt-password, the host (127.0.0.1) and the port on which the server runs(7688).
Suggestions
Please don't forget to secure every application you have running on you system. Remember that FreeMED contains medical data that should not be seen by third parties.
Use a web search engine to learn how to secure your system, particulary MySQL and Apache2.
FreeMED can only be as secure as the applications running on a particular server!
Please feel free to email me with suggestions and notify me of errors that have found here.
Troubleshooting
If some errors occur, please send an email to:
freemed-ger@gmx.at
I hope that I will be able to help you.
I hope that this HowTo was useful and that your FreeMED installation is working!
Philipp Meng
(last edited March 2 nd, 2006)






Hello,
I've followed the instructions on this page for installing Remitt. I am at the stage now when I am trying to create a user by running the
"./bin/sqlite_user_admin.pl create freemed some_pass" command
I am getting the following error:
DBI connect('dbname=/usr/share/remitt/spool/auth.db','',...) failed: unable to open database file(1) at dbdimp.c line 94 at /usr/share/remitt/bin/../lib/Remitt/Plugin/Authentication/SQLite.pm line 136
Can't call method "do" on an undefined value at /usr/share/remitt/bin/../lib/Remitt/Plugin/Authentication/SQLite.pm line 137.
I checked and the file auth.db does not exist in the spool directory. Is this a file I have to download somewhere or create? Where can I get it from or how do I create it? Thanks.