You are on page 1of 65

CMS3 Installation Guide

The CMS3.0 is an open-source clinic management system project jointly implemented by the Hong Kong Medical Association (HKMA) and the Information and software Industry Association (ISIA), with the funding support from the Office of the Government Chief Information Officer (OGCIO) under the Sector-specific Programme (SSP) for the Medical and Health Sector, and was developed by the Mobigator Technology Group.

CMS3 Installation Guide

Table of Contents
Part I Introduction Part II Get CMS 3.0 Part III CMS 3.0 Server Installation Part IV Configure CMS 3.0 Client after Installation 4 5 6 14
1 Requirement ................................................................................................................................... 4

1 Install CMS 3.0 Server ................................................................................................................................... 6

1 Login CMS 3 .0 Through HTTPS ................................................................................................................................... 14 2 Modify Clinic Setting ................................................................................................................................... 19 3 Create User ................................................................................................................................... 19

Part V CMS 3.0 Server Advanced Installation

22

1 Install Java ................................................................................................................................... 22 2 Install MySQL ................................................................................................................................... 22 3 Install CMS 3.0 ................................................................................................................................... 22 4 Create Server Certificate ................................................................................................................................... 24 5 Configure CMS 3.0 Database ................................................................................................................................... 25 6 Use cronolog (Optional) ................................................................................................................................... 25 7 Use swap in................................................................................................................................... 26 Linux (Optional)

Part VI Update CMS 3.0


2 War File

27

1 Update Installer ................................................................................................................................... 27 ................................................................................................................................... 30

Part VII Troubleshoot for Deployment

34

1 Install CMS 3.0 with MySQL Already Installed ................................................................................................................................... 34 2 Can't Startup MySQL Server ................................................................................................................................... 34 3 I can't connect to CMS 3.0 ................................................................................................................................... 40 4 Configure CMS 3.0 Database ................................................................................................................................... 42 5 Login CMS 3 .0 Through HTTP ................................................................................................................................... 43 6 Get Host IP and Host Name ................................................................................................................................... 44 7 Set Host IP and Host Name ................................................................................................................................... 46 8 Open Command Prompt or Terminal ................................................................................................................................... 53 9 Shut down Tomcat ................................................................................................................................... 55 10 Start up Tomcat ................................................................................................................................... 58 11 Disable UAC ................................................................................................................................... 62 12 Q & A ................................................................................................................................... 63

Part VIII Reference Link


2010 Mobigator Technology Group

65

Contents

2010 Mobigator Technology Group

CMS3 Installation Guide

1
1.1

Introduction
This document contains the installation instructions for CMS 3.0

Requirement
Server: #
1

Recommended Environment
Intel Core 2 Xeon Processor 3.0GHz, Intel Core 2 E7400 (2.8GHz), or equivalent

Minimal Requirement
Pentium 4 2.4GHz or above

2 3 4 5

3GB of DDR2 800MHz RAM SATA II 7.2K RPM 16MB Cache with 40GB free space 100Mbp Network Controller

1GB of Memory 6GB of disk space 100 Mbps Network Controller

Windows 2003 Server Standard / Linux Kernel 2.6 or above Windows XP Home

Client: #
1 2 3 4 5 6

Recommended Environment
Intel Core 2 Duo Processor E5200 (2.5GHz) or equivalent 2GB of Memory SATA II 7.2K RPM 16MB Cache, 10GB free space 100Mbp Network Controller Windows XP, Linux Kernel 2.6 or above 19" LCD supporting 1280x1024 resolution

Minimal Requirement
Pentium 4 2GHz or above 1GB of memory 6GB of disk space 100 Mbps Network Controller Windows XP Home Screen support 1024x768 resolution

Extra requirement for advanced installation


Java JDK 6 or above MySQL 5.0 or above Tomcat 6.0 or above Areca Backup 7.0.6 or above Cronolog version 1.6 or above 7-Zip 4.65 or above(Windows) / p7zip 4.65 or above(Linux)

2010 Mobigator Technology Group

Get CMS 3.0

Get CMS 3.0


The latest version can be downloaded from http://cms3.mobigator.com/

2010 Mobigator Technology Group

CMS3 Installation Guide

CMS 3.0 Server Installation


This part includes how to set up CMS 3.0 in your physical machine. It involves the installation guide for MySQL, Tomcat, etc.

3.1

Install CMS 3.0 Server


1. Enter http://cms3.mobigator.com/pages/index.asp?pg=user and download CMS 3.0 server package 2. Extract the zip file by 7-zip

Remark: You must use 7-zip to extract the files to avoid "File path too long" error while using other program to do.

3. Open CMS3 For Vista or Windows 7 user, please use one of the following method to install CMS 3.0 Method A: Right click on the CMS3.exe and select "Run as Administrator" Method B: Disable UAC

2010 Mobigator Technology Group

CMS 3.0 Server Installation

4. Click Next

5. Click I Agree

2010 Mobigator Technology Group

CMS3 Installation Guide

6. Click Next Notes: If you have installed MySQL previously, please uncheck "Install MySQL 5.1"

7. Click Install

2010 Mobigator Technology Group

CMS 3.0 Server Installation

8. Click Accept

9. Click Next

2010 Mobigator Technology Group

10

CMS3 Installation Guide

10. Click Next

11. Click Finish

2010 Mobigator Technology Group

CMS 3.0 Server Installation

11

12. Click Next

13. Type in your information and Certificate password, then click Next

2010 Mobigator Technology Group

12

CMS3 Installation Guide

14. Create a root password for MySQL, then click Next

15. when you see this windows, press any key on your keyboard to continue

2010 Mobigator Technology Group

CMS 3.0 Server Installation

13

16. Type in the root password you have created, then click Next Notes: If you have installed MySQL previously, please select a correct MySQL Folder e.g. C:\Program Files\MySQL\MySQL Server 5.1

17. Click Finish

18. Restart your PC

2010 Mobigator Technology Group

14

CMS3 Installation Guide

4
4.1

Configure CMS 3.0 Client after Installation


This part includes how to configure CMS 3.0 Client

Login CMS 3 .0 Through HTTPS


1. Enter CMS 3.0 Client folder

2. Enter server ip or hostname in "Hostname". If you are using our host server, enter the port we have given to you in "Port" Otherwise, enter 443 in "Port"

2010 Mobigator Technology Group

Configure CMS 3.0 Client after Installation

15

3. Setup document printer, label printer and card printer. Click "Save" and restart CMS3.exe

4. Click "Cancel"

2010 Mobigator Technology Group

16

CMS3 Installation Guide

5. Select "Security Setting" in the bottom right menu

6. In the "Servers" tab, click "Add Exception"

2010 Mobigator Technology Group

Configure CMS 3.0 Client after Installation

17

7. Enter the hostname and port in "Location", click "Get Certificate"

2010 Mobigator Technology Group

18

CMS3 Installation Guide

8. Click "Confirm Security Exception"

9. Restart CMS3.exe

2010 Mobigator Technology Group

Configure CMS 3.0 Client after Installation

19

4.2

Modify Clinic Setting


1. Admin -> Clinic Setting 2. Double click on the pre-set clinic

3. Modify the setting and click update

4.3

Create User
We will provide a administrator account for you at the beginning. You need to use this account to login CMS 3.0 and create other accounts. 1. Use the admin account to login CMS 3.0

2010 Mobigator Technology Group

20

CMS3 Installation Guide

2. Select "ADMIN" in the top menu bar

3. In the left menu, expand the "User" folder and select "User"

4. Click on "New" button to create a new user

2010 Mobigator Technology Group

Configure CMS 3.0 Client after Installation

21

5. Fill in the fields if necessary. Remember to check "Active" if you want to enable the account now.

6. Click "Create" button and complete the creation of user.

2010 Mobigator Technology Group

22

CMS3 Installation Guide

5
5.1

CMS 3.0 Server Advanced Installation


This part includes how to set up CMS 3.0 in your physical machine.

Install Java
Donwload Java (JDK Version): 1. Enter http://www.java.com 2. Click on the download button from the menu and follow the installation guide.

5.2

Install MySQL
Download MySQL: http://dev.mysql.com/downloads/ After installed MySQL, you need to create a user and database for CMS 3.0 server. 1. Open command prompt or terminal 2. Type "mysql -uroot -ppassword" root is the root user and password should be replaced by your root password 3. In mysql>, type "create database cms3 character set utf8;" 4. Type "GRANT ALL ON cms3.* TO cms3@'localhost' IDENTIFIED BY 'cms3';" Note that you MUST type the above steps identically. 5. Now, the cms3 database and user are created. Next, you need to install our CMS 3.0 server.

5.3

Install CMS 3.0


1. Enter http://cms3.mobigator.com/ and download CMS 3.0 tomcat package for your operating system 2. Unzip the zip into {Tomcat Home Directory}. For example, Linux: /usr/local/tomcat/ Windows: C:\Program File\Tomcat\ 3. Now, we need to set Tomcat server run as a service. Windows User a. Open command line and change the current directory to {Tomcat Home Directory}/bin Type service.bat install CMS3

Ubuntu User a. Open /etc/init.d/tomcat by typing


2010 Mobigator Technology Group

CMS 3.0 Server Advanced Installation

23

sudo vi /etc/init.d/tomcat b. Paste the following and save the script

# Tomcat auto-start # # description: Auto-starts tomcat # processname: tomcat # pidfile: /var/run/tomcat.pid export JAVA_HOME=/usr/lib/jvm/java-6-sun case $1 in start) sh /usr/local/tomcat/bin/startup.sh ;; stop) sh /usr/local/tomcat/bin/shutdown.sh ;; restart) sh /usr/local/tomcat/bin/shutdown.sh sh /usr/local/tomcat/bin/startup.sh ;; esac exit 0
c. You need to make the script executable by running sudo chmod 755 /etc/init.d/tomcat d. Type the following commands to add tomcat server run as service at startup

sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat


Fedora User a. Open /etc/init.d/tomcat by typing nano /etc/init.d/tomcat using root

2010 Mobigator Technology Group

24

CMS3 Installation Guide

b. Pasta the following and save the script

#!/bin/bash # chkconfig: 2345 10 90 # description: Start, Stop and Restart Tomcat Server # Tomcat auto-start # # processname: tomcat # pidfile: /var/run/tomcat.pid case $1 in start) sh /usr/local/tomcat/bin/startup.sh ;; stop) sh /usr/local/tomcat/bin/shutdown.sh ;; restart) sh /usr/local/tomcat/bin/shutdown.sh sh /usr/local/tomcat/bin/startup.sh ;; esac exit 0
c. You need to make the script executable by running chmod a+x tomcat in /etc/init.d/ folder d. Type the following command to add tomcat server run as service at startup chkconfig --add tomcat 4. Reboot your machine to apply the changes 5. The tomcat service should be run automatically after restarted

5.4

Create Server Certificate


To create server certificate, you need to install java first 1. Type the following keytool -genkey -alias cms3 -keyalg RSA -keystrore /usr/local/tomcat/conf/cms3.bin

2010 Mobigator Technology Group

CMS 3.0 Server Advanced Installation

25

2. Answer the questions and press enter

3. cms3.bin is now in the conf folder

4. Use editor to open server.conf in same folder, change keystorePass attribute to your keystore password

5. Save and restart tomcat

5.5

Configure CMS 3.0 Database


If you want to set the database on the other machine, you properly need to change the database setting. To change the it, you can modify the following file Tomcat\webapps\CMS3\WEB-INF\classes\datasource.properties

5.6

Use cronolog (Optional)


Cronolog is simple filter program that reads log file entries from standard input and writes each entry to the output file specified by a filename template and the current date and time. You can download cronolog from http://cronolog.org/ To use Cronolog, you need to replace this string in the catalina.sh org.apache.catalina.startup.Bootstrap "$@" start \ >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &

with this:
org.apache.catalina.startup.Bootstrap "$@" start 2>&1 \ | cronolog "$CATALINA_BASE"/logs/catalina.%Y-%m-%d >> /dev/null &

2010 Mobigator Technology Group

26

CMS3 Installation Guide

5.7

Use swap in Linux (Optional)


Swap is a Linux tool to allow using more memory than the physical one. 1. Type the following command in terminal to create a file the size you want. For example, 2GB. sudo dd if=/dev/zero of=/home/cms3/2GB.swap bs=4M count=512 2. Format the swap file to create a swapping device, type sudo mkswap /home/cms3/2GB.swap 3. Add the swap to the running system, type sudo swapon /home/cms3/2GB.swap 4. To make the change permanent for each reboot, you need to edit /etc/fstab sudo gedit /etc/fstab and add the following line at the end of the file /home/cms3/2GB.swap none swap sw 0 0 5. Save the file and reboot your machine to apply the changes

2010 Mobigator Technology Group

Update CMS 3.0

27

Update CMS 3.0


This part includes how to update CMS 3.0 through two methods: By update installer By war file

6.1

Update Installer
The update installer is for Windows user only. The installer will help you to stop and start the CMS 3.0 automatically. 1. Get the latest update installer from http://cms3.mobigator.com/

2. Extracts it and open the folder

3. Run CMS 3.0 Update installer, click Next

2010 Mobigator Technology Group

28

CMS3 Installation Guide

4. Click I Agree

5. Select the CMS 3.0 server folder and click Install

2010 Mobigator Technology Group

Update CMS 3.0

29

6. Wait the process to complete and click Finish

2010 Mobigator Technology Group

30

CMS3 Installation Guide

6.2

War File
For Windows user
1. Get the latest war file from http://cms3.mobigator.com/ 2. Shutdown tomcat 3. Place the war file into {Tomcat Home Directroy}/webapps folder

4. Rename it to CMS3.war if necessary.

5. Extract all files into CMS3 folder

2010 Mobigator Technology Group

Update CMS 3.0

31

6. Delete the war file. 7. Start up Tomcat Server

For Linux user


1. Get the latest war file from http://cms3.mobigator.com/

2010 Mobigator Technology Group

32

CMS3 Installation Guide

2. Shutdown tomcat 3. Put the CMS3.war file into {Tomcat Home Directory}/webapps

4. Rename the war file to CMS3.war if needed

2010 Mobigator Technology Group

Update CMS 3.0

33

5. Extract all files into {Tomcat Home Directory}/webapps/CMS3

6. Delete the war file. 7. Start up Tomcat Server

2010 Mobigator Technology Group

34

CMS3 Installation Guide

7
7.1 7.2

Troubleshoot for Deployment


Install CMS 3.0 with MySQL Already Installed
See the red color notes mentioned in "Install CMS 3.0 Server"

Can't Startup MySQL Server


Error in configuring the server
If you can't see or wait too long to see the following message, please follow below. MySQL Instance Configured... Service started...

All Windows Versions


1. Please keep the current window and click Start -> MySQL -> MySQL Server 5.x -> MySQL Server

2010 Mobigator Technology Group

Troubleshoot for Deployment

35

Config Wizard

2. Click Next

3. Click Remove Instance and Next

2010 Mobigator Technology Group

36

CMS3 Installation Guide

4.Click Execute

5. Back to MySQL Window and click Back Note: If you are not using our CMS 3.0 Installer, please rerun this configuration tool to set a

2010 Mobigator Technology Group

Troubleshoot for Deployment

37

new config

6. Click Next again, and you can pass the third step now.

2010 Mobigator Technology Group

38

CMS3 Installation Guide

Error in Apply security settings

2010 Mobigator Technology Group

Troubleshoot for Deployment

39

1. You may type a wrong password, click skip and back to previous page

2. Type your password again in "Current root password" field

2010 Mobigator Technology Group

40

CMS3 Installation Guide

3. You should be succeed now

7.3

I can't connect to CMS 3.0


If you can't connect CMS 3.0 through the CMS 3.0 client, you can do the followings. Note that you don't need to go through all the steps. If you can access CMS 3.0 by performing serval steps, you can stop doing the others. But you should perform the step in order. Method 1. Check if the server is started. Enter {Tomcat Home Directory}/logs. Search for the file beginning with "catalina". You need to open this file with today timestamp(e.g. Today is Mar 30, 2009, the file you should open is catalina.2009-03-30.log). If you can't see the startup info text, please restart your Tomcat server. (you need to shut down and start up tomcat)

Method 2. Set the hostname to the host ip address directly.

2010 Mobigator Technology Group

Troubleshoot for Deployment

41

Method 3. Try to ping host ip address by opening a terminal and type "ping hostip"(e.g. "ping 192.168.100.39"). If you can see the reply message, it should be ok.

Method 4. Open port 8080 in firewall. Step 1: Start -> Control Panel -> Windows Firewall -> Exceptions tab

Step 2: Click Add Port -> Name the port and type 8080 in Port Number -> click OK

2010 Mobigator Technology Group

42

CMS3 Installation Guide

If the problem still exists, please contact us.

7.4

Configure CMS 3.0 Database


If you want to set the database on the other machine, you properly need to change the database setting. To change the it, you can modify the following file Tomcat\webapps\CMS3\WEB-INF\classes\datasource.properties

2010 Mobigator Technology Group

Troubleshoot for Deployment

43

7.5

Login CMS 3 .0 Through HTTP


Note: This is disabled in our default package due to security reason. If you would like to use, please go through admin manual for how to enable this feature. Otherwise, you can skip this part and click here 1. Enter http://cms3.mobigator.com/pages/index.asp?pg=user and download CMS 3.0 client. Unzip it after downloaded

2. Enter CMS 3.0 Client folder and open

3. Open the CMS 3.0 client and you may see this page at first time. Fill up the information or set as default. Save the config. (Click here to know how to get hostname or ip)

2010 Mobigator Technology Group

44

CMS3 Installation Guide

4. You can now see the login page, type the admin account to login. The default account is Username: admin Password: admin If you can't get the access from other machine, please click here

5. Type your username and password to enter CMS 3.0. For how to create or modify account, please see the next session.

7.6

Get Host IP and Host Name


Get Host IP address Windows Type ipconfig in windows command prompt

Linux Type ifconfig in terminal


2010 Mobigator Technology Group

Troubleshoot for Deployment

45

Get the Host Name Windows Right click on My Computer and select "Properties". Change tab "Computer Name" and look for "Full computer name". Linux Type hostname in terminal

2010 Mobigator Technology Group

46

CMS3 Installation Guide

7.7

Set Host IP and Host Name


Before login to CMS 3.0, you need to configure the host ip first.

Set Host IP
For windows user
1. [Start] -> [Control Panel] -> [Network Connections]

2010 Mobigator Technology Group

Troubleshoot for Deployment

47

2. Right click on your connection ( Normally Local Area Connection ), and then select "Properties"

3. Select "Internet Protocol(TCP/IP)" and click "Properties"

2010 Mobigator Technology Group

48

CMS3 Installation Guide

4. Type your settings in ip, subnet mask, etc. Note that the following is just an example, and may not be worked in your machine.

5. Click ok and wait for a moment.

2010 Mobigator Technology Group

Troubleshoot for Deployment

49

6. Double click on the connection and change to "Support" tab to see if the settings have been applied. The IP in here will be used for accessing CMS 3.0.

6. Reboot the machine

For Ubuntu user


1. Use your favorite text editor to open "/etc/network/interfaces"

2. You can see your primary network interface in this file.

2010 Mobigator Technology Group

50

CMS3 Installation Guide

3. Now, you can add or modify with the following info auto eth%% iface eth%% inet static address [Your IP Address] netmask [Netmask] network [Network] broadcast [Broadcast] gateway [Gateway] Note: %% is a number. 4 for this example. 4. Save the changes and type "sudo /etc/init.d/networking restart" to reconfigure the IP

5. Reboot the machine

For Fedora user


1. Use your favorite text editor to open "/etc/sysconfig/network-scripts/ifcfg-eth0" 2. You can see your primary network interface in this file.

3. Now, you can add or modify with above setting.

2010 Mobigator Technology Group

Troubleshoot for Deployment

51

4. Save the changes and type "/etc/init.d/network restart" to reconfigure the IP

5. Reboot the machine

Set Host Name


For Windows user
1. Right click on my computer and select "Properties"

2. Choose tab "Computer Name" and click button "Change". Type your prefered host name in

2010 Mobigator Technology Group

52

CMS3 Installation Guide

computer name.

3. Click ok. You may need to reboot the machine to apply the changes.

For Ubuntu user


1. Open terminal and use your text editor to modify /etc/hostname 2. Change the host name in this file and save. 3. Reboot your machine to apply the changes.

For Fedora user


1. Open terminal and use your text editor to modify /etc/sysconfig/network 2. Change the host name in this file and save. 3. Reboot your machine to apply the changes.

2010 Mobigator Technology Group

Troubleshoot for Deployment

53

7.8

Open Command Prompt or Terminal


How to open command prompt or terminal Windows Type cmd in "Start"->"Run"

Ubuntu "Applications"->"Accessories"->"Terminal"

Fedora "Applications"->"System Tools"->"Terminal"

2010 Mobigator Technology Group

54

CMS3 Installation Guide

2010 Mobigator Technology Group

Troubleshoot for Deployment

55

7.9

Shut down Tomcat


For Windows user
There are two types of methods for shutting down Tomcat If the server is started up when machine is on or started in service manually 1. Click Start -> Right click on My Computer -> Manage

2. Expand Services and Applications -> Services -> Select Apache Tomcat CMS3

2010 Mobigator Technology Group

56

CMS3 Installation Guide

3. Double click on it or right click -> properties, click stop

If you start up the Tomcat Server by running startup.bat 1. Close the Tomcat window

2010 Mobigator Technology Group

Troubleshoot for Deployment

57

For Linux user


1. Open terminal, change the current directory to {Tomcat Home Directory} and type "sudo ./shutdown. sh". About 2 minutes later, the server should be stopped.

2010 Mobigator Technology Group

58

CMS3 Installation Guide

7.10

Start up Tomcat
For Windows user
There are two types of methods to start up Tomcat manually Use service to start up 1. Click Start -> Right click on My Computer -> Manage

2. Expand Services and Applications -> Services -> Select Apache Tomcat CMS3

2010 Mobigator Technology Group

Troubleshoot for Deployment

59

3. Double click on it or right click -> properties, click Start

2010 Mobigator Technology Group

60

CMS3 Installation Guide

Startup tomcat by using bat file 1. Enter {Tomcat Home Directory}/bin folder

2. Run startup.bat

3. If success, the following message will be displayed. If you can't get this, please report this to us.

2010 Mobigator Technology Group

Troubleshoot for Deployment

61

For Linux user


1. Open terminal and change the current directory to {Tomcat Home Dirdectory}/bin. 2. type "sudo ./startup.sh"

3. After the following message has been shown, you still need to wait for few minutes( about 6 minutes )

2010 Mobigator Technology Group

62

CMS3 Installation Guide

7.11

Disable UAC
This section is useful for Windows Vista or Windows 7 user 1. Open Control Panel 2. Under User Accounts and Family settings, click on "Add or remove user accounts"

3. Click "go to the main User Accounts page" at the bottom 4. Select "Change security settings"

5.Uncheck the box "Use User Account Control(UAC) to help protect your computer" and click ok 6. Restart your machine

2010 Mobigator Technology Group

Troubleshoot for Deployment

63

7.12

Q&A
Q. Tomcat server can't be started A. Sometimes, you need to kill the java process manually by using task manager(Windows) or system monitor(Ubuntu). If the problem still exists, you may need to reboot the host machine.

2010 Mobigator Technology Group

64

CMS3 Installation Guide

2010 Mobigator Technology Group

Reference Link

65

Reference Link
Java
Java - http://www.java.com/

MySQL
MySQL: http://www.mysql.com/ MySQL forum: http://forums.mysql.com/

Tomcat
Tomcat: http://tomcat.apache.org/ Tomcat help page: http://tomcat.apache.org/findhelp.html Tomcat FAQ: http://wiki.apache.org/tomcat/FAQ ASF Bugzilla: https://issues.apache.org/bugzilla/

2010 Mobigator Technology Group

You might also like