This page has been created for those users who had installed Bahmni v0.78, 0.79, etc using the old way of installing Bahmni via a single "sh" based script. If you have folders called "apache-tomcat" in your machine for Bahmni, and have not done RPM based installations of Bahmni, then this page is for you.
Most users of Bahmni are on RPM based installations, and hence do NOT need to read / follow this document.
Remove epel-release rpm before installing bahmni-installer rpm
yum remove epel-release
Instructions to bahmni installation using bahmni-installer rpm is available in Install Bahmni on CentOS (Advanced Installation Options). 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:
Stop all services
service tomcat stop service openerp stop service nagios stop
switch off chkconfig for tomcat, openerp.
chkconfig tomcat off chkconfig openerp off
Move bahmni related webapps from tomcat's webapps directory to some other directory.
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**
bahmni -i <inventory_file_name> db-backup
Take backup of service logs if necessary.
Backup certain properties files
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
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:
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
/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
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:
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.
yum remove epel-release yum install epel-release
If we get 'AnsibleLoader' object has no attribute 'dispose' on any command in Bahmni, 'PyYAML' has to be upgraded to 3.10.
Link to ansible issue: https://github.com/ansible/ansible/issues/15660
First remove python-yaml rpm
yum remove python-yaml
Then try to install again. Verify that 3.10 is being installed.
yum install python-yaml
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.
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
There can be some more as well
Update site information – parentOfUploadedFilesDirectory – check for the value once before doing it in clinlims database.
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.
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