# Download steps # wget http://git.bbh.org.in/chess/elxr/raw/branch/master/linux/centos/elxr/setup.sh # chmod +x setup.sh # ./setup.sh # To delete all directories # find /path/to/your/directory -type d -exec rm -r {} + # find . -type d -exec rm -r {} + # sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc # sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' #STORE GIT CREDENTIALS IN CACHE sudo yum install git # git config --global --unset credential.helper git config --global credential.helper store # git config --global credential.helper 'store --file ~/.git-credentials' # echo "Enter git username: " # read gitUser # echo "username=$gitUser" >> ~/.git-credentials # echo "Enter git password: " # read gitPassword # echo "password=$gitPassword" >> ~/.git-credentials # chmod 0600 ~/.git-credentials # Install prerequisites #NODE JS 16.17.1 node-v20.8.0-linux-x64.tar.xz wget https://nodejs.org/dist/v20.8.0/node-v20.8.0-linux-x64.tar.xz tar -xf node-v20.8.0-linux-x64.tar.xz # Move the extracted folder to /usr/local/lib sudo mv node-v20.8.0-linux-x64 /usr/local/lib/ # Create a symbolic link to the node executable sudo ln -s /usr/local/lib/node-v20.8.0-linux-x64/bin/node /usr/local/bin/node sudo ln -s /usr/local/lib/node-v20.8.0-linux-x64/bin/npm /usr/local/bin/npm node -v npm -v #NPM sudo yum install npm sudo firewall-cmd --zone=public --add-port=8081/tcp --permanent # have to add all the ports to firewall. in pm2 when we run ecosystem file, that prints these commands sudo firewall-cmd --reload #INSTALLING NODE JS sudo npm install -g pm2 npm install -g ember-cli npm install -g loopback-cli #production A SETUP mkdir chess cd chess mkdir production_A cd production_A # echo "Enter instance type: eg production/production" # read instancetype # echo "Enter FolderName: eg A/B/C" # read foldername # # echo "username=$gitUser" >> ~/.git-credentials # mkdir $instancetype_$foldername # cd $instancetype_$foldername # ln -s cihsr-config-production/ cihsr-config-production git clone http://git.bbh.org.in/chess/cihsr-config-production cd cihsr-config-production git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force #TO CREATE SYMLINK cd .. ln -s cihsr-config-production/ config git clone http://git.bbh.org.in/chess/cihsr-data cd cihsr-data git checkout production git pull # git pull origin master rm -rf package-lock.json npm i --force cd .. ln -s cihsr-data/ data git clone http://git.bbh.org.in/chess/ember-masonry-grid cd ember-masonry-grid git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/cihsr-clientconfig-production cd cihsr-clientconfig-production git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. ln -s cihsr-clientconfig-production/ clientconfig git clone http://git.bbh.org.in/chess/bbhverse cd bbhverse git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/clientverse cd clientverse git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/serververse cd serververse git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/elxr cd elxr git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/ember-searchable-select cd ember-searchable-select git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/loopback-component-jsonapi cd loopback-component-jsonapi git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/loopback-jsonapi-model-serializer cd loopback-jsonapi-model-serializer git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force npm run build cd .. git clone http://git.bbh.org.in/chess/loopback-connector-mysql cd loopback-connector-mysql git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/loopback-connector-ds cd loopback-connector-ds git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/setup cd setup git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/ember-service-worker cd ember-service-worker git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/ember-service-worker-asset-cache cd ember-service-worker-asset-cache git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/ember-service-worker-cache-fallback cd ember-service-worker-cache-fallback git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/ember-service-worker-index cd ember-service-worker-index git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/ember-sw-client-route cd ember-sw-client-route git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/global-this cd global-this git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/ember-cp-validations cd ember-cp-validations git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/loopback-connector cd loopback-connector git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/loopback cd loopback git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/loopback-datasource-juggler cd loopback-datasource-juggler git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/loopback-connector-mssql cd loopback-connector-mssql git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/loopback-filters cd loopback-filters git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/loopback-connector-sqlite3 cd loopback-connector-sqlite3 git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/chess-server-lib cd chess-server-lib git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd server rm -rf package-lock.json npm i --force cd .. cd .. git clone http://git.bbh.org.in/chess/cihsr-server cd cihsr-server git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/bbh_patient_portal cd bbh_patient_portal git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/project-genesis-frontend cd project-genesis-frontend git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/project-genesis-backend cd project-genesis-backend git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/processmanager cd processmanager git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/client cd client git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force sudo bower install node_modules/.bin/bower install cd .. git clone http://git.bbh.org.in/chess/chess-client-lib cd chess-client-lib git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd .. git clone http://git.bbh.org.in/chess/cihsr-client cd cihsr-client git checkout production git pull git pull origin master rm -rf package-lock.json npm i --force cd chess-client-lib rm -rf package-lock.json npm i --force cd .. cd client rm -rf package-lock.json npm i --force node_modules/.bin/bower i node_modules/.bin/ember s # FOR Connecting to NTP for time sync # Install Chrony sudo dnf install -y chrony # Enable and start the Chrony service sudo systemctl enable chronyd sudo systemctl start chronyd sudo timedatectl set-timezone Asia/Kolkata # Configure NTP servers (Replace with your desired NTP servers) echo "server zen01.local.bbh iburst" | sudo tee -a /etc/chrony.conf # Restart Chrony service sudo systemctl restart chronyd # Display NTP synchronization status chronyc tracking