您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

linux_setup.sh 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. # Download steps
  2. # wget http://git.bbh.org.in/chess/elxr/raw/branch/master/linux/centos/elxr/setup.sh
  3. # chmod +x setup.sh
  4. # ./setup.sh
  5. # To delete all directories
  6. # find /path/to/your/directory -type d -exec rm -r {} +
  7. # find . -type d -exec rm -r {} +
  8. #STORE GIT CREDENTIALS IN CACHE
  9. sudo yum install git
  10. # git config --global --unset credential.helper
  11. git config --global credential.helper store
  12. # git config --global credential.helper 'store --file ~/.git-credentials'
  13. # echo "Enter git username: "
  14. # read gitUser
  15. # echo "username=$gitUser" >> ~/.git-credentials
  16. # echo "Enter git password: "
  17. # read gitPassword
  18. # echo "password=$gitPassword" >> ~/.git-credentials
  19. # chmod 0600 ~/.git-credentials
  20. # Install prerequisites
  21. #NODE JS 16.17.1
  22. node-v20.8.0-linux-x64.tar.xz
  23. wget https://nodejs.org/dist/v20.8.0/node-v20.8.0-linux-x64.tar.xz
  24. tar -xf node-v20.8.0-linux-x64.tar.xz
  25. # Move the extracted folder to /usr/local/lib
  26. sudo mv node-v20.8.0-linux-x64 /usr/local/lib/
  27. # Create a symbolic link to the node executable
  28. sudo ln -s /usr/local/lib/node-v20.8.0-linux-x64/bin/node /usr/local/bin/node
  29. sudo ln -s /usr/local/lib/node-v20.8.0-linux-x64/bin/npm /usr/local/bin/npm
  30. node -v
  31. npm -v
  32. #NPM
  33. sudo yum install npm
  34. sudo firewall-cmd --zone=public --add-port=8081/tcp --permanent
  35. # have to add all the ports to firewall. in pm2 when we run ecosystem file, that prints these commands
  36. sudo firewall-cmd --reload
  37. #INSTALLING NODE JS
  38. sudo npm install -g pm2
  39. npm install -g ember-cli
  40. npm install -g loopback-cli
  41. #production A SETUP
  42. mkdir chess
  43. cd chess
  44. mkdir production_A
  45. cd production_A
  46. # echo "Enter instance type: eg production/production"
  47. # read instancetype
  48. # echo "Enter FolderName: eg A/B/C"
  49. # read foldername
  50. # # echo "username=$gitUser" >> ~/.git-credentials
  51. # mkdir $instancetype_$foldername
  52. # cd $instancetype_$foldername
  53. # ln -s cihsr-config-production/ cihsr-config-production
  54. git clone http://git.bbh.org.in/chess/cihsr-config-production
  55. cd cihsr-config-production
  56. git checkout production
  57. git pull
  58. git pull origin master
  59. rm -rf package-lock.json
  60. npm i --force
  61. #TO CREATE SYMLINK
  62. cd ..
  63. ln -s cihsr-config-production/ config
  64. git clone http://git.bbh.org.in/chess/cihsr-data
  65. cd cihsr-data
  66. git checkout production
  67. git pull
  68. # git pull origin master
  69. rm -rf package-lock.json
  70. npm i --force
  71. cd ..
  72. ln -s cihsr-data/ data
  73. git clone http://git.bbh.org.in/chess/ember-masonry-grid
  74. cd ember-masonry-grid
  75. git checkout production
  76. git pull
  77. git pull origin master
  78. rm -rf package-lock.json
  79. npm i --force
  80. cd ..
  81. git clone http://git.bbh.org.in/chess/cihsr-clientconfig-production
  82. cd cihsr-clientconfig-production
  83. git checkout production
  84. git pull
  85. git pull origin master
  86. rm -rf package-lock.json
  87. npm i --force
  88. cd ..
  89. ln -s cihsr-clientconfig-production/ clientconfig
  90. git clone http://git.bbh.org.in/chess/bbhverse
  91. cd bbhverse
  92. git checkout production
  93. git pull
  94. git pull origin master
  95. rm -rf package-lock.json
  96. npm i --force
  97. cd ..
  98. git clone http://git.bbh.org.in/chess/clientverse
  99. cd clientverse
  100. git checkout production
  101. git pull
  102. git pull origin master
  103. rm -rf package-lock.json
  104. npm i --force
  105. cd ..
  106. git clone http://git.bbh.org.in/chess/serververse
  107. cd serververse
  108. git checkout production
  109. git pull
  110. git pull origin master
  111. rm -rf package-lock.json
  112. npm i --force
  113. cd ..
  114. git clone http://git.bbh.org.in/chess/elxr
  115. cd elxr
  116. git checkout production
  117. git pull
  118. git pull origin master
  119. rm -rf package-lock.json
  120. npm i --force
  121. cd ..
  122. git clone http://git.bbh.org.in/chess/ember-searchable-select
  123. cd ember-searchable-select
  124. git checkout production
  125. git pull
  126. git pull origin master
  127. rm -rf package-lock.json
  128. npm i --force
  129. cd ..
  130. git clone http://git.bbh.org.in/chess/loopback-component-jsonapi
  131. cd loopback-component-jsonapi
  132. git checkout production
  133. git pull
  134. git pull origin master
  135. rm -rf package-lock.json
  136. npm i --force
  137. cd ..
  138. git clone http://git.bbh.org.in/chess/loopback-jsonapi-model-serializer
  139. cd loopback-jsonapi-model-serializer
  140. git checkout production
  141. git pull
  142. git pull origin master
  143. rm -rf package-lock.json
  144. npm i --force
  145. npm run build
  146. cd ..
  147. git clone http://git.bbh.org.in/chess/loopback-connector-mysql
  148. cd loopback-connector-mysql
  149. git checkout production
  150. git pull
  151. git pull origin master
  152. rm -rf package-lock.json
  153. npm i --force
  154. cd ..
  155. git clone http://git.bbh.org.in/chess/loopback-connector-ds
  156. cd loopback-connector-ds
  157. git checkout production
  158. git pull
  159. git pull origin master
  160. rm -rf package-lock.json
  161. npm i --force
  162. cd ..
  163. git clone http://git.bbh.org.in/chess/setup
  164. cd setup
  165. git checkout production
  166. git pull
  167. git pull origin master
  168. rm -rf package-lock.json
  169. npm i --force
  170. cd ..
  171. git clone http://git.bbh.org.in/chess/ember-service-worker
  172. cd ember-service-worker
  173. git checkout production
  174. git pull
  175. git pull origin master
  176. rm -rf package-lock.json
  177. npm i --force
  178. cd ..
  179. git clone http://git.bbh.org.in/chess/ember-service-worker-asset-cache
  180. cd ember-service-worker-asset-cache
  181. git checkout production
  182. git pull
  183. git pull origin master
  184. rm -rf package-lock.json
  185. npm i --force
  186. cd ..
  187. git clone http://git.bbh.org.in/chess/ember-service-worker-cache-fallback
  188. cd ember-service-worker-cache-fallback
  189. git checkout production
  190. git pull
  191. git pull origin master
  192. rm -rf package-lock.json
  193. npm i --force
  194. cd ..
  195. git clone http://git.bbh.org.in/chess/ember-service-worker-index
  196. cd ember-service-worker-index
  197. git checkout production
  198. git pull
  199. git pull origin master
  200. rm -rf package-lock.json
  201. npm i --force
  202. cd ..
  203. git clone http://git.bbh.org.in/chess/ember-sw-client-route
  204. cd ember-sw-client-route
  205. git checkout production
  206. git pull
  207. git pull origin master
  208. rm -rf package-lock.json
  209. npm i --force
  210. cd ..
  211. git clone http://git.bbh.org.in/chess/global-this
  212. cd global-this
  213. git checkout production
  214. git pull
  215. git pull origin master
  216. rm -rf package-lock.json
  217. npm i --force
  218. cd ..
  219. git clone http://git.bbh.org.in/chess/ember-cp-validations
  220. cd ember-cp-validations
  221. git checkout production
  222. git pull
  223. git pull origin master
  224. rm -rf package-lock.json
  225. npm i --force
  226. cd ..
  227. git clone http://git.bbh.org.in/chess/loopback-connector
  228. cd loopback-connector
  229. git checkout production
  230. git pull
  231. git pull origin master
  232. rm -rf package-lock.json
  233. npm i --force
  234. cd ..
  235. git clone http://git.bbh.org.in/chess/loopback
  236. cd loopback
  237. git checkout production
  238. git pull
  239. git pull origin master
  240. rm -rf package-lock.json
  241. npm i --force
  242. cd ..
  243. git clone http://git.bbh.org.in/chess/loopback-datasource-juggler
  244. cd loopback-datasource-juggler
  245. git checkout production
  246. git pull
  247. git pull origin master
  248. rm -rf package-lock.json
  249. npm i --force
  250. cd ..
  251. git clone http://git.bbh.org.in/chess/loopback-connector-mssql
  252. cd loopback-connector-mssql
  253. git checkout production
  254. git pull
  255. git pull origin master
  256. rm -rf package-lock.json
  257. npm i --force
  258. cd ..
  259. git clone http://git.bbh.org.in/chess/loopback-filters
  260. cd loopback-filters
  261. git checkout production
  262. git pull
  263. git pull origin master
  264. rm -rf package-lock.json
  265. npm i --force
  266. cd ..
  267. git clone http://git.bbh.org.in/chess/loopback-connector-sqlite3
  268. cd loopback-connector-sqlite3
  269. git checkout production
  270. git pull
  271. git pull origin master
  272. rm -rf package-lock.json
  273. npm i --force
  274. cd ..
  275. git clone http://git.bbh.org.in/chess/chess-server-lib
  276. cd chess-server-lib
  277. git checkout production
  278. git pull
  279. git pull origin master
  280. rm -rf package-lock.json
  281. npm i --force
  282. cd server
  283. rm -rf package-lock.json
  284. npm i --force
  285. cd ..
  286. cd ..
  287. git clone http://git.bbh.org.in/chess/cihsr-server
  288. cd cihsr-server
  289. git checkout production
  290. git pull
  291. git pull origin master
  292. rm -rf package-lock.json
  293. npm i --force
  294. cd ..
  295. git clone http://git.bbh.org.in/chess/bbh_patient_portal
  296. cd bbh_patient_portal
  297. git checkout production
  298. git pull
  299. git pull origin master
  300. rm -rf package-lock.json
  301. npm i --force
  302. cd ..
  303. git clone http://git.bbh.org.in/chess/project-genesis-frontend
  304. cd project-genesis-frontend
  305. git checkout production
  306. git pull
  307. git pull origin master
  308. rm -rf package-lock.json
  309. npm i --force
  310. cd ..
  311. git clone http://git.bbh.org.in/chess/project-genesis-backend
  312. cd project-genesis-backend
  313. git checkout production
  314. git pull
  315. git pull origin master
  316. rm -rf package-lock.json
  317. npm i --force
  318. cd ..
  319. git clone http://git.bbh.org.in/chess/processmanager
  320. cd processmanager
  321. git checkout production
  322. git pull
  323. git pull origin master
  324. rm -rf package-lock.json
  325. npm i --force
  326. cd ..
  327. git clone http://git.bbh.org.in/chess/client
  328. cd client
  329. git checkout production
  330. git pull
  331. git pull origin master
  332. rm -rf package-lock.json
  333. npm i --force
  334. sudo bower install
  335. node_modules/.bin/bower install
  336. cd ..
  337. git clone http://git.bbh.org.in/chess/chess-client-lib
  338. cd chess-client-lib
  339. git checkout production
  340. git pull
  341. git pull origin master
  342. rm -rf package-lock.json
  343. npm i --force
  344. cd ..
  345. git clone http://git.bbh.org.in/chess/cihsr-client
  346. cd cihsr-client
  347. git checkout production
  348. git pull
  349. git pull origin master
  350. rm -rf package-lock.json
  351. npm i --force
  352. cd chess-client-lib
  353. rm -rf package-lock.json
  354. npm i --force
  355. cd ..
  356. cd client
  357. rm -rf package-lock.json
  358. npm i --force
  359. node_modules/.bin/bower i
  360. node_modules/.bin/ember s
  361. # FOR Connecting to NTP for time sync
  362. # Install Chrony
  363. sudo dnf install -y chrony
  364. # Enable and start the Chrony service
  365. sudo systemctl enable chronyd
  366. sudo systemctl start chronyd
  367. sudo timedatectl set-timezone Asia/Kolkata
  368. # Configure NTP servers (Replace with your desired NTP servers)
  369. echo "server zen01.local.bbh iburst" | sudo tee -a /etc/chrony.conf
  370. # Restart Chrony service
  371. sudo systemctl restart chronyd
  372. # Display NTP synchronization status
  373. chronyc tracking