-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
129 lines (110 loc) · 5.01 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
This file contains intructions for installing a new instance.
Requires Ubuntu 12.04 LTS
Upgrade instructions.
Everything as root(sudo)
1. Install packages
a. Use tasksel for meta packages. This will install a number of required
packages and their dependiencies. The tasksel interface will be visible
by default during the 12.04 LTS Server installation process. Otherwise,
it is by executing 'sudo tasksel' from a command prompt. Once visible,
select 'Lamp Stack' and 'Tomcat' and press Enter.
b. Individual packages
libapache2-mod-wsgi
libapache2-mod-jk
python-cjson
python-django
python-django-piston
python-mysqldb
python-libxml2
python-lxml
As one command from a prompt:
$> sudo apt-get install libapache2-mod-wsgi \
libapache2-mod-jk \
python-cjson \
python-django \
python-django-piston \
python-mysqldb \
python-libxml2 \
python-lxml \
sqlite3
2. Copy contents of ./ to /opt/sana
(Will overwrite existing installations)
a. Update file ownership
chown -R www-data:www-data /opt/sana
3. Copy the mds settings template
cp /opt/sana/settings.py.tmpl /opt/sana/settings.py
4. Update file ownership
chown -R www-data:www-data /opt/sana
5. Update the settings and intialize mds
a. If you are using anything other than sqlite for a backend you will
need to create your database and update the DATABASES value. There
is a sample config for MySQL which works with a database created
using the following command from a SQL prompt after opening a SQL
prompt as the root user and providing the root password
$> mysql -u root -p
(Use your own password instead of **** below).
sql> CREATE DATABASE mds;
sql> CREATE USER 'mds'@'localhost' IDENTIFIED BY '****';
sql> GRANT ALL ON mds.* TO 'mds'@'localhost';
sql> exit;
b. Update the settings for DATABASES. Comment out the 'default' sqlite
config and replace with the included 'default' mysql. Be certain to
update the value for 'PASSWORD': '****'
c. Intialize mds
sudo /opt/sana/manage.py syncdb
d. Get the static admin files
sudo /opt/sana/manage.py collectstatic
Setting Up Apache to serve mds files
1. Create the mds link for apache
sudo ln -s /opt/sana /var/www/mds
2. Set up encryption.
(https://help.ubuntu.com/12.04/serverguide/certificates-and-security.html)
a. Create your own certificate and key
openssl genrsa -des3 -out server.key 1024
openssl rsa -in server.key -out server.key.insecure
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key.insecure -out server.crt
(You will be prompted for some information. Type in country, state, city,
org, common name. You can skip challenge password and company name)
b. Copy the cert and key
cp server.crt /etc/ssl/certs
cp server.key /etc/ssl/private
2. Update apache
a. Using the site install script. Run
sudo /opt/sana/apache2/install_sites.sh
b. Manually
mkdir -p /opt/sana/wsgi
cp ./apache2/wsgi/django.wsgi /opt/sana/wsgi/
chown -R www-data:www-data /opt/sana/wsgi
cp ./apache2/sites-available/* /etc/apache2/sites-available/
a2ensite sana.default
a2ensite sana.default.ssl
service apache2 restart
You should now be able to access:
http://<your-server>/mds
https://<your-server>/mds
8. Configure Tomcat
a. Just follow old manual install instructions ignoring any references to
the older OpenMRS version.
http://sana.mit.edu/wiki/index.php?title=Setup_Servers#Setup_and_Configure_Tomcat
9. OpenMRS Install latest 1.9 release
a. Download
http://openmrs.org/download/
b. Follow installation instructions:
https://wiki.openmrs.org/display/docs/Installing+OpenMRS
10. Add Modules through browser(OpenMRS Administration --> Manage Modules)
a. Webservices.REST
Go to the module settings page in the Admin and set the
"Webservices REST Uri Prefix" to http://<ip-address>[:port]/openmrs/
b. HTMLFormEntry
c. LogManager
d. Sana module - get the latest beta version
http://code.google.com/p/sana/downloads/list
11. Configure OpenMRS for Sana
Again, follow current release instructions and ignore any references to
older versions of OpenMRS
http://sana.mit.edu/wiki/index.php?title=OpenMRS_Configuration
Important. The name of the permissions for accessing the queue have been
changed to use "Manage Encounter Queue" and "View Encounter Queue" in lieu
of the references to "Manage" and "View" the "Sana Queue" on the wiki.
12. See TESTING for more information on verifying your installation is working.