Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Before installation of bahmni-installer rpm
Remove epel-release rpm before installing bahmni-installer rpm
Code Block |
---|
yum remove epel-release |
Instructions to bahmni installation using bahmni-installer rpm is available in Install Bahmni on CentOS using bahmni-installer rpm. Proceed till step 5 as mentioned in the link. After Step 5, following things have to be done manually to migrate from old sh based installation to bahmni-installer rpm based installation:
After installation of bahmni-installer rpm
Stop all services
Code Block language bash service tomcat stop service openerp stop service nagios stop
switch off chkconfig for tomcat, openerp.Code Block language bash chkconfig tomcat off chkconfig openerp off
Move bahmni related webapps from tomcat's webapps directory to some other directory.
Code Block cd ~/apache-tomcat-8.0.12 #cd into apache tomcat directory mkdir -p old_webapps mv webapps/openmrs old_webapps/ mv webapps/bahmnireports old_webapps/ mv webapps/openelis/ old_webapps/ mv webapps/openerp-atomfeed-service/ old_webapps/ mv webapps/pacs-integration old_webapps/ rm -rf webapps/bahmnireports.war rm -rf webapps/pacs-integration.war rm -rf webapps/openerp-atomfeed-service.war rm -rf webapps/openelis.war rm -rf webapps/openmrs.war
Take backup of all individual DBs **IMPORTANT**
Code Block bahmni -i <inventory_file_name> db-backup
Take backup of service logs if necessary.
Backup certain properties files
Code Block mv /home/bahmni/.OpenMRS/bahmnicore.properties /home/bahmni/.OpenMRS/bahmnicore.properties.bkp mv /home/bahmni/.bahmni-reports/bahmni-reports.properties /home/bahmni/.bahmni-reports/bahmni-reports.properties.bkp mv /etc/init.d/openerp /etc/init.d/openerp.bkp
Take Backup of Nagios
Code Block cp -r /etc/nagios /etc/nagios_bkup
Uninstall mysql if it is 5.6.12 since mysqld service is not present.
To see the list of mysql components installed, run the following command:Code Block yum list installed | grep MySQL
Uninstall the listed components. But be aware of the dependencies which might get removed by removing mysql components as well.
check whether pg_basebackup command is available. If it is not available, use alternatives to make /usr/pgsql-9.2/bin/pg_basebackup available to /usr/bin
Code Block /usr/sbin/update-alternatives --install /usr/bin/pg_basebackup pgsql-pg_basebackup /usr/pgsql-9.2/bin/pg_basebackup 920
Now the installation can be continued from Step 7 as mentioned in the link - Trigger Installation
Some common errors during deployment and steps to resolve them
When any yum operation fails with the error - 'Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again', execute the following:
Code Block sudo yum upgrade ca-certificates --disablerepo=epel
rpm -e jdk or yum remove jdk(If JAVA conflict occurs.)
On starting the installation, if it fails saying that ansible could not be installed or ansible-playbook command is not found, epel-release rpm has to be reinstalled.
Code Block yum remove epel-release yum install epel-release
After deployment
Check whether mysql and psql replication works.
Move patient_images, uploaded-files, uploaded_results, document_images from old tomcat user home folder to /home/bahmni folder. In the below snippet, We have assumed that 'jss' user had tomcat deployed in it. This step is not applicable if 'bahmni' was the old tomcat user.
Code Block mv /home/jss/patient_images/* /home/bahmni/patient_images/ mv /home/jss/uploaded-files/elis/* /home/bahmni/uploaded-files/elis/ mv /home/jss/uploaded-files/mrs/* /home/bahmni/uploaded-files/mrs/ mv /home/jss/uploaded_results/* /home/bahmni/uploaded_results/ mv /home/jss/document_images/* /home/bahmni/document_images/ cd /home/bahmni chown -R bahmni:bahmni document_images/ chown -R bahmni:bahmni patient_images/ chown -R bahmni:bahmni uploaded-files/ chown -R bahmni:bahmni uploaded_results/ chmod -R 755 document_images/ chmod -R 755 patient_images/ chmod -R 755 uploaded-files/ chmod -R 755 uploaded_results/
Update global_poperties in openmrs to have /home/bahmni as directory instead of /home/jss
a) emr.personImagesDirectory
b) uploaded.files.directory
There can be some more as well
Update site information – parentOfUploadedFilesDirectory – check for the value once before doing it in clinlims database.
Code Block language sql update site_information set value= '/home/bahmni' where name = 'parentOfUploadedFilesDirectory';
With the new way of installation, we had made 'bahmni' user as just run user. And we add a new user called 'bahmni_support' for ssh purposes.
a) Inorder to make bahmni as non-ssh user, following command needs to be executed. This command will lock the 'bahmni' user account for login.Code Block passwd -l bahmni
b) Inorder to make bahmni as non-sudoer, do the following – Be very careful with this step
1. type 'visudo' in shell
2. Remove the line bahmni ALL=(ALL) NOPASSWD:ALL
3. save it
Tip | ||
---|---|---|
| ||
|