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

linux_setup.sh 9.5KB

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