FreeMed under Windows XP Installation Guide (For developer)

FreeMed under Windows XP Installation Guide (For developer) Alberz Akrawi, [email protected] 1 Table of contents 1. FreeMed installation under windows...
Author: Austin Gray
6 downloads 0 Views 880KB Size
FreeMed under Windows XP Installation Guide (For developer)

Alberz Akrawi, [email protected]

1

Table of contents 1. FreeMed installation under windows XP………………………………………3 1.1 overview…………………………………………………………………...3 1.1.1 What we’ll need?.................................................................................3 1.1.2 Programs Used and There Versions…………………………………3 1.1 Apache……………………………………………………………………..4 1.2 MySQL………………………………………………………………………6 1.3 Php…………………………………………………………………………10 1.4 PhpMyAdmin……………………………………………………………...13 1.5 Make PHP works with Apache…………………………………………….14 1.6 PEAR……………………………………………………………………....15 1.7 Freemed…………………………………………………………………....16 2. Ipath installation……………………………………………………………….19

2

1 FreeMed Installation under Windows XP 1.1 Overview 1.1.1 What we’ll need? •

Apache HTTPD Web Server (Win32 Binary) – This is the web server we’ll be installed for this project. o Apache HTTPD Web Server Download Page: http://httpd.apache.org/download.cgi



PHP Windows Binaries – This will be used to develop under the PHP programming language. o PHP Download Page: http://www.php.net/downloads.php



MySQL Database Server – This will be used to run our MySQL databases. o MySQL Download Page: http://dev.mysql.com/downloads/mysql/4.1.html



PhpMyAdmin Database Manager – This will be used to manager our MySQL databases(voluntary installation). o phpMyAdmin Download Page: http://www.phpmyadmin.net/home_page/downloads.php



FreeMed software – This is the main program. o FreeMed Download Page: http://sourceforge.net/project/showfiles.php?group_id=1428

1.1.2 Programs Used and Their Versions • • • • •

Apache - apache_1.3.34-win32-x86-no_src.exe, Win32 Binary (Self extracting) PHP - PHP 4.4.2 zip package MySQL - mysql-4.1.18-win32.zip, Windows (x86) PhpMyAdmin - phpMyAdmin 2.7.0-pl2 FreeMed - freemed-0.8.1.1.tar.gz

Start off by downloading each of the applications and scripts and save them to a folder on your desktop or somewhere that will be easily accessible through out this tutorial. We’ll use the desktop for this project and work from it. Now that we have everything we’ll need to download, downloaded we’ll start one by one installing each of these applications and/or scripts.

3

1.1 Apache

I’ve downloaded all the proper releases and packages we’re need and saved them in a folder on my desktop.

!"

#"$%&"

$ '' (

)$

2. Select “I accept the terms in the license agreement” >> Click Next 3. When you see this one:

This is just basic configurations for the server. Network Domain (e.g. somenet.com): localhost Server Name (e.g. www.somenet.com): localhost

4

Administrator’s Email Address: Your email address

Click >> Next 4. Here you have the selection of how we’d like to install it. Most users would simple use the default selection which is Complete. Select Custom if you want to install apache in another location as I’d like to.

In that case select Custom and click >> Next. I install apache under C:\apache. Click >> OK >> Next >> Install. The installation takes a few minutes. Click >> Finish. Apache is now installed in the location we provided and is configured using the settings we specified during installation. Now we can test to see if Apache is installed and running correctly. Open a browser client (for example Internet Explorer) and type in http://localhost/ as the URL and hit enter. If you get for example this message: “Apache is downloaded” or something similar to this, then everything went just fine and Apache is now installed and working correctly.

5

1.2 MySQL

We’ll go ahead and get MySQL installed. MySQL isn’t dependant on anything other then Apache. 1. Double click mysql-4.1.18-win32.zip and extract it. Click Next 2. Now you can select the setup type for your installation. I am going to select Custom sense we have a few custom requests for the installer to perform. Click >> Next 3. In the next screen we will be allow to select the features we’d like to install in this session. We’ll leave this alone as its all setup correctly for what we’re trying to do.

Click >> Next. 4. Here you can simply type the location for MySQL >> OK >> Install. 5. Now we’ll get a screen that look similar to this:

Select Skip Sign-Up >> Next >> Finish. 6. The next screen is the start page for the Server Instance Configuration Wizard.

6

Click Next >> Select Standard Configuration and click >> Next. 7. Select “Install As Windows Service”. This will insure the MySQL server is started if it ever shuts down, or the system ever restarts.

Notice: Maybe you fail with installation and get this screen:

In that case Click Back to the last screen and select MySQL5 for example. There are many people with same problem. 7

Click >> Next. 8. Next we’ll need to select a root password, We don’t need a password for root here because of FreeMed’s configuration. If you select a password then you can change it with some mysql commands from your DOS-prompt. Click Next >> Execute and you get this screen:

Once we’ve finished the install we can check to make sure that MySQL is installed and working properly. Find the folder in the start menu where MySQL is located and launch the “MySQL Command Line Client”.

Once this is open simply enter the password. Just click “Enter” because we have opted any password or click Start >> Run >> write “cmd” and ok. You get this screen:

8

Write this MySQL command: • mysql –u root –p >> Enter If you have opted a password run this one: • mysql –u root –p and then click Enter. Freemed don’t except a password and you need to change it when you want to run Freemed. To change the password: 1. Issue the following statements in the mysql client: 2. mysql> Update mysql.user SET Password=PASSWORD('newpwd') 3. -> WHERE User='root'; 4. mysql> FLUSH PRIVILEGES; Replace “newpwd” with the actual root password that you want to use. In that case PASSWORD(‘').

9

1.3 PHP

The next thing we’ll need to get installed is PHP, as this will be the language we’re going to use to develop with, and well we can’t use PHP without having a PHP engine phrasing all our code. 1. Double click php-4.4.2-Win32.zip and extract it under C:\ and change the name to php.

2. Move all files located in the dll and sapi folders to the main folder C:\php. 3. You have to make sure that this file: php4ts.dll can be found by your PHP installation. • Copy this file to the same directory you have php.exe (C:\php) or under C:\WINDOWS • Add C:\php to Windows PATH environment variable. Start >> Control Panel >> System >> double click on PATH >> write ;C:\php >> ok 4. Under C:\php you have two valid configuration files: • •

Php.ini-dist Php.ini-recommended

Copy php.ini-recommended to a directory that PHP is able to find (C:\WINDOWS) and rename it to php.ini. 5. Open php.ini and edit it: doc_root = c:\apache\htdocs // for Apache

10

6. You can add extensions to your configuration of php. See the picture above. 7. We have to check if php works. We create a file in the htdocs folder located in C:\Apache. This is where all of our web documents are going to be stored. Create a new file in this folder can name it info.php. Once the info.php file has been created, open it up and place the following code within it. Save it close the file and then open your browser and type this in the location bar. http://localhost/info.php If you see the following page, then PHP is installed and setup correctly on your server.

11

12

1.4 PhpMyAdmin

It’s easy to install phpMyAdmin. We don’t need it to make FreeMed work. I’m not going to explain how you can install it here. But remember install it under C:\apache\htdocs And you can find a good installation guide here: C:\apache\htdocs\phpMyAdmin\ Documentation.txt or C:\apache\htdocs\phpMyAdmin\ Documentation.html With ophpMyAdmin server tools we can better manage our MySQL database. Check if you have installed phpMyAdmin correctly. Open your browser and type this in the location bar. http://localhost/phpMyAdmin/

13

1.5 Make PHP work with Apache 1. Open http.conf under:

C:\apache\Apache\conf and edit it: Copy and paste this information to the end of httpd.conf: ScriptAlias /php/ "C:/php/" AddType application/x-httpd-php .php # For PHP 4 Action application/x-httpd-php "/php/php.exe" # specify the directory where php.ini is SetEnv PHPRC C:/php

14

1.6 PEAR

1. Click Start >> Run >> and write cmd to start your WINDOWS DOS PROMPT. 2. Go to C:\php. 2. Write PHP PEAR\go-pear.php local

3. Agree with everything it ask you with yes/no otherwise just click “Return”. 4. Go to C:\PHP and double click on the PEAR_ENV.REG file.

15

1.7 FreeMed

1. Extract freemed-0.8.1.1.tar.gz. 2. Move all files (folder freemed-0.8.1.1) to: C:\apache\htdocs And change the folder name to freemed. 3. Go to C:\apache\htdocs\freemed\lib and open settings.php to edit these rows.

define (' INSTALLATION' , "Stock FreeMED Install"); // installation name define (' DB_HOST' , "localhost"); // database (SQL) host location define (' DB_NAME' , "freemed"); // database name define (' DB_USER' , "root"); // SQL server username define (' DB_PASSWORD' , ""); // SQL server password define (' PHYSICAL_LOCATION' , "c:/apache/htdocs/freemed"); In some cases you maybe can’t work with mysql. To create “freemed” database go to “data” folder under your mysql folder(there you have installed mysql). Create a new folder and name it “freemed”. 4. PHP needs more memory for starting this application. Go to php-configuration file under php folder. And change memory_limit from 8M to 64M.

16

5. Open your browser and write: http://localhost/freemed/index.php 6. First time you have to register yourself. Database Username: root Database Password : Admin Account Password: admin Confirm Admin Account Password : 7. After that every time you want to access freemed you have to write your account information. In my case: Username: Password:

17

18

2. Ipath installation

If you have ipath server installed on your desktop. You only need do stage 1.8.

19