/
Install Bahmni on CentOS

Install Bahmni on CentOS

CentOS installation option of Bahmni is being deprecated! The recommended option moving forward is to use Docker version (for any OS) of Bahmni. Please see this documentation: Running Bahmni on Docker.

For production purposes, CentOS 7.6 (64-bit) is the recommended & tested platform for running Bahmni version 0.92 and above. (CentOS 7.5 is fine as well).

The below mentioned process is based off installing RPMs. Depending on which Bahmni package you wish to install, you can choose to install the appropriate RPM. Each RPM now contains its embedded tomcat or web server, and becomes its own service, which can be started or stopped.

List of RPMs:

  • bahmni-emr (Bahmni Backend)
  • bahmni-web (Bahmni EMR UI)
  • bahmni-reports (Bahmni Reports)
  • bahmni-lab (OpenELIS)
  • bahmni-erp (OpenERP / Odoo package)
  • bahmni-event-log-service (separate web app to sync events created on Bahmni)
  • pacs-integration (webapp to send radiology orders to PACS/Modality)
  • dcm4chee (open-source PACS)

Windows Installation

If you want to install Bahmni for Development on your laptop (Windows, Mac or Linux), then you can choose to instead install the Bahmni Virtual Box. (or Docker)

Security Vulnerability Mitigation

Please read the Bahmni Security Announcement regarding Log4J-v2.x vulnerability (cve-2021-44228) which was published on 14-Dec-2021 here: https://talk.openmrs.org/t/log4j-security-vulnerability-impact-on-bahmni-cve-2021-44228/35367


Installation

You can also watch the installation steps on this youtube video: Install Bahmni - Step by Step or see this training video explaining the various Installation & Deployment options.

Step 1: Fresh CentOS v7.6

Create a fresh CentOS v7.6. You can read the System Requirements here.

Deploy on the Cloud

If you don't have a CentOS box, or have a slow internet, you can perform these steps on a Cloud based CentOS, for instance on Digital Ocean or AWS. Please refer to this Wiki document on Deploying Bahmni on the Cloud.


Step 2: Perform the following steps to install the RPMs

Latest Release

The latest version of Bahmni is v0.93, released on 26-Oct-2021. Please refer to this document to read about the latest stable releases: ALL Bahmni Releases

Fresh Bahmni Installation


 Installing Bahmni version 0.93 (Recommended)

Steps for Installing Bahmni v0.93

This approach requires you to install the bahmni command line program first. Once "bahmni" command is installed, then you can choose your install settings, and related configurations to perform a specific Bahmni install. For now, we will install Bahmni with default configuration, and a demo database. For Advanced Installation steps, you can refer to this document later. All RPMs are hosted here.

#Prerequisite for the fresh installation of Bahmni
yum install -y https://kojipkgs.fedoraproject.org//packages/zlib/1.2.11/19.fc30/x86_64/zlib-1.2.11-19.fc30.x86_64.rpm
yum install -y epel-release
pip install --upgrade pip
pip install babel==v1.0 python-stdnum urllib3==1.21.1 idna==2.5 chardet==3.0.2 certifi==2017.4.17 qrcode pyserial pypdf python-chart psycogreen passlib ofxparse requests

# Install the bahmni command line program (Choose the version you want) 
yum install -y https://repo.mybahmni.org/releases/bahmni-installer-0.93-219.noarch.rpm

# download the postgres repo rpm. This is because wget fails to verify the keys.
# If you prefer the default download by wget, then you have to install the ca-certificates module 
# and configure wget. Alternatively you can use curl like below. 
# for more info check: https://talk.openmrs.org/t/bahmni-0-92-install-on-centos-7-6-minimal-fails/25416/48

# download postgres rpm
rm -f /opt/pgdg-redhat-repo-*
yum install -y wget
cd /opt && wget https://repo.mybahmni.org/releases/pgdg-redhat-repo-42.0-23.noarch.rpm
# Install Repo RPM and remove repo file
yum install -y /opt/pgdg-redhat-repo-42.0-23.noarch.rpm
rm -f /etc/yum.repos.d/pgdg-redhat-all.repo

# Confirm that the bahmni command is correctly installed (you should see a help message for the command)
bahmni --help
 
# Now setup a configuration file for bahmni command in /etc/bahmni-installer. 
# Note, before running the below command check whether the /etc/bahmni-installer/setup.yml already exists or not. 
curl -L https://tinyurl.com/yyoj98df >> /etc/bahmni-installer/setup.yml

# Edit the setup.yml file and add the Bahmni Repo URL 
vi /etc/bahmni-installer/setup.yml
bahmni_repo_url: https://repo.mybahmni.org/releases/
 
# Confirm the contents of the file. It should look like this file: (https://goo.gl/R8ekg5)
cat /etc/bahmni-installer/setup.yml

# The above setup.yml, has a timezone entry. You can change it to suit your timezone if you like. For valid options
# please read this document: https://bahmni.atlassian.net/wiki/display/BAH/List+Of+Configurable+Installation+Variables

# Optionally set the inventory file name to local in BAHMNI_INVENTORY environment variable. This way you won't need to use the '-i local' switch every time you use the 'bahmni' command. 
# You can also configure custom inventory file instead of local.
echo "export BAHMNI_INVENTORY=local" >> ~/.bashrc
source ~/.bashrc

# configure components you require. Edit the inventory file (or your custom inventory file)
vi /etc/bahmni-installer/local

 
# Now fire the installer. If you have exported the variable as above you can ignore the "-i local" option.  
bahmni -i local install 

 
# The installation should be done in about 15 - 30 minutes depending on your internet speed. 
# Verify installed components using the command:
yum list installed | grep bahmni

Sample install log