Bahmni Installation Without Internet

THE STEPS MENTIONED HERE ARE FOR OLDER VERSION OF BAHMNI. THE RECOMMENDED WAY TO INSTALL BAHMNI IS NOW VIA DOCKER. PLEASE SEE THIS DOCUMENTATION INSTEAD: Running Bahmni with Docker with No/Poor Internet

Purpose

For supporting Bahmni installation without internet, all the required packages for Bahmni should be cached in the machine which means should be locally available in the non internet machine Bahmni should be installed. Therefore firstly, Install Bahmni in a machine which has internet with the cache set up turned on to locally cache the required packages and then copy the cached packages to the target machine. In general, we need Source Machine (Machine which has internet). Using the packages cached under Source Machine, any number of Target Machines (Machines without internet) can have Bahmni installed.


These steps have not been verified on latest versions of Bahmni. Proceed with caution. We welcome community contribution to validate these steps. Another option is to consider downloading Bahmni vagrant box and then use that to run Bahmni in a non-internet location. 

Note: Bahmni does NOT need internet to run. It only needs internet for installation/upgrading of packages.

Steps to Install Bahmni on Source Machine (with internet)

Please ensure you perform these steps on a fresh/clean CentOS server without any dependencies already installed. This will ensure that all dependencies are saved in the cache directories and are available when the same steps are performed on the target machine.

Step 1: Change the yum configuration file to allow caching

sudo sed -i "s|keepcache=0|keepcache=1|g" /etc/yum.conf

Step 2 : Create a local cache directory

mkdir /etc/yum_cache

Step 3: Change the cache directory to previously created local cache (/etc/yum_cache)

sudo sed -i "s|cachedir=/var/cache/yum/\$basearch/\$releasever|cachedir=/etc/yum_cache|g" /etc/yum.conf

Step 4: Install Bahmni 

Refer Install Bahmni on CentOS (Advanced Installation Options)

Step 5:  Confirm Successful Installation of Bahmni

Check if the installation successfully completed without any failures. Also make sure Bahmni is running without any issues.

Step 6:  Create a backup folder and copy the required artifacts for Bahmni installation.

mkdir /artifact_backup
cp -r /etc/yum_cache /artifact_backup
mkdir /artifact_backup/pip_cache
cp -r /root/.cache/pip /artifact_backup/pip_cache
mkdir /artifact_backup/opt_cache
cp -r /opt/*.rpm /artifact_backup/opt_cache
cp -r /usr/lib/python2.6/site-packages/click-6.7-py2.6.egg /artifact_backup/click_cache
cp -r /usr/lib/python2.6/site-packages/nonblockingloghandler* /artifact_backup/click_cache/

If click-6.7-py2.6.egg is not available, then please copy click-6.6-py2.6.egg

cp -r /usr/lib/python2.6/site-packages/click-6.6-py2.6.egg /artifact_backup/click_cache

Step 7: Download the Bahmni Installer RPM

Please choose the valid Bahmni version. For Example, in the below sample command the version chosen is 0.89-167

wget https://repo.mybahmni.org/releases/bahmni-installer-0.92-155.noarch.rpm -O /opt


Steps to Install Bahmni on Target Machine (without internet)

Please ensure you have performed the steps mentioned above (with internet) first.

If we have a slave machine then please perform the below steps for slave as well.


Prerequisites

Move the artifact_backup folder with below files (from the source machine as mentioned above) to Target Machine

  • yum_cache
  • pip_cache
  • click_cache
  • opt_cache

Step 1: Change the yum configuration file to allow caching

sudo sed -i "s|keepcache=0|keepcache=1|g" /etc/yum.conf

Step 2: Change the cache directory to previously created local cache (/etc/yum_cache)

sudo sed -i "s|cachedir=/var/cache/yum/\$basearch/\$releasever|cachedir=/etc/yum_cache|g" /etc/yum.conf

Step 3: Go to the backup directory

cd artifact_backup 

Make sure to change the path of the directory above to exact folder path


Step 4: Move the cached artifacts to respective locations

cp -r yum_cache/* /etc/yum_cache
mkdir /root/.cache
cp -r pip_cache/* /root/.cache
cp -r click_cache/* /usr/lib/python2.6/site-packages/ 
cp -r click_cache/nonblockingloghandler* /usr/lib/python2.6/site-packages/
cp -r opt_cache/* /opt

Step 5: Install Bahmni Installer RPM

Please choose the valid Bahmni version. For Example, In the below sample command the version chosen is 0.89-167

yum install /opt/bahmni-installer-0.92-155.noarch.rpm
On this page

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)