build_hue_common.sh 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. #!/usr/bin/env bash
  2. function big_console_header() {
  3. set +x
  4. local text="$*"
  5. local spacing=$(( (75+${#text}) /2 ))
  6. printf "\n\n"
  7. echo "============================================================================"
  8. echo "============================================================================"
  9. printf "%*s\n" ${spacing} "${text}"
  10. echo "============================================================================"
  11. echo "============================================================================"
  12. printf "\n\n"
  13. set -x
  14. }
  15. function check_python38_path() {
  16. export python38_bin="$PYTHON38_PATH/bin/python3.8"
  17. if [ ! -e "$python38_bin" ]; then
  18. echo "Python38 bin does not exists at " $python38_bin
  19. exit 1
  20. fi
  21. export pip38_bin="$PYTHON38_PATH/bin/pip3.8"
  22. }
  23. function check_python39_path() {
  24. export python39_bin="$PYTHON39_PATH/bin/python3.9"
  25. if [ ! -e "$python39_bin" ]; then
  26. echo "Python39 bin does not exists at " $python38_bin
  27. exit 1
  28. fi
  29. export pip39_bin="$PYTHON39_PATH/bin/pip3.9"
  30. }
  31. function check_sqlite3() {
  32. export sqlit3_bin="$SQLITE3_PATH"
  33. if [ ! -e "$sqlit3_bin" ]; then
  34. echo "sqlit3 bin does not exists at " $sqlit3_bin
  35. exit 1
  36. fi
  37. }
  38. function redhat7_ppc_install() {
  39. if [[ $FORCEINSTALL -eq 1 ]]; then
  40. # pre-req install
  41. sudo -- sh -c 'yum install -y cyrus-sasl-gssapi \
  42. cyrus-sasl-plain \
  43. java-11-openjdk \
  44. java-11-openjdk-devel \
  45. java-11-openjdk-headless \
  46. krb5-workstation \
  47. libpcap \
  48. ncurses-devel \
  49. nmap-ncat \
  50. xmlsec1 \
  51. xmlsec1-openssl \
  52. unzip'
  53. # NODEJS 16 install
  54. # Upgrading to node-v16 because of the following CVE's in node-v14 "CVE-2021-3450, CVE-2021-44531, CVE-2023-32004, CVE-2023-32006"
  55. # Node-v20-LTS is not supported by old OS'es - Redhat7_ppc, Centos7, Ubuntu18, Sles12. So upgrading to node-v16
  56. sudo -- sh -c 'curl -fsSL https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-ppc64le.tar.gz -o node-v16.20.2-linux-ppc64le.tar.gz && \
  57. mkdir -p /usr/local/lib/nodejs && \
  58. tar -xzf node-v16.20.2-linux-ppc64le.tar.gz -C /usr/local/lib/nodejs'
  59. echo 'export PATH=/usr/local/lib/nodejs/node-v16.20.2-linux-ppc64le/bin:$PATH' >> ~/.bashrc
  60. source ~/.bashrc
  61. # sqlite3 install
  62. sudo TOOLS_HOME=${TOOLS_HOME} -- sh -c 'mkdir -p ${TOOLS_HOME} && \
  63. cd ${TOOLS_HOME} && \
  64. curl -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
  65. tar zxvf sqlite-autoconf-3350500.tar.gz && \
  66. cd sqlite-autoconf-3350500 && \
  67. ./configure --prefix=${TOOLS_HOME}/sqlite && make && make install'
  68. export LD_LIBRARY_PATH=${TOOLS_HOME}/sqlite/lib:/usr/local/lib:$LD_LIBRARY_PATH
  69. # python3.8 re install for sqlite3 3.35.5 or higher version
  70. sudo LD_LIBRARY_PATH=/usr/local/lib:$ORACLE_INSTANTCLIENT19_PATH:$LD_LIBRARY_PATH \
  71. LD_RUN_PATH=/usr/local/lib:$ORACLE_INSTANTCLIENT19_PATH:$LD_RUN_PATH \
  72. -- sh -c 'curl -o Python-3.8.13.tgz https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz && \
  73. tar zxvf Python-3.8.13.tgz && \
  74. cd Python-3.8.13 && \
  75. ./configure --enable-shared --prefix=/opt/cloudera/cm-agent && \
  76. make install'
  77. # Pip modules install
  78. sudo pip38_bin=${pip38_bin} -- sh -c '${pip38_bin} install virtualenv=='${VIRTUAL_ENV_VERSION}' virtualenv-make-relocatable=='${VIRTUAL_ENV_RELOCATABLE_VERSION}''
  79. sudo pip38_bin=${pip38_bin} -- sh -c 'ln -fs ${pip38_bin} $(dirname ${pip38_bin})/pip'
  80. fi
  81. }
  82. function redhat8_ppc_install() {
  83. if [[ $FORCEINSTALL -eq 1 ]]; then
  84. # pre-req install
  85. sudo -- sh -c 'yum install -y \
  86. python38 \
  87. python38-libs \
  88. python38-devel \
  89. python38-numpy \
  90. python38-PyMySQL \
  91. python38-cryptography \
  92. python38-cffi \
  93. python38-psycopg2 \
  94. python38-Cython \
  95. python38-lxml \
  96. java-11-openjdk-devel \
  97. java-11-openjdk-headless \
  98. krb5-workstation \
  99. nmap-ncat \
  100. xmlsec1 \
  101. xmlsec1-openssl \
  102. libss \
  103. ncurses-devel'
  104. # MySQLdb install
  105. sudo -- sh -c 'yum install -y python3-mysqlclient'
  106. # NODEJS install
  107. sudo sh -c 'curl -fsSL https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-ppc64le.tar.gz -o node-v20.11.0-linux-ppc64le.tar.gz && \
  108. mkdir -p /usr/local/lib/nodejs && \
  109. tar -xzf node-v20.11.0-linux-ppc64le.tar.gz -C /usr/local/lib/nodejs'
  110. echo 'export PATH=/usr/local/lib/nodejs/node-v20.11.0-linux-ppc64le/bin:$PATH' >> ~/.bashrc
  111. source ~/.bashrc
  112. # Pip modules install
  113. sudo pip38_bin=${pip38_bin} -- sh -c '${pip38_bin} install virtualenv=='${VIRTUAL_ENV_VERSION}' virtualenv-make-relocatable=='${VIRTUAL_ENV_RELOCATABLE_VERSION}' mysqlclient==2.1.1'
  114. sudo pip38_bin=${pip38_bin} -- sh -c 'ln -fs ${pip38_bin} $(dirname ${pip38_bin})/pip'
  115. # sqlite3 install
  116. sudo TOOLS_HOME=${TOOLS_HOME} -- sh -c 'mkdir -p ${TOOLS_HOME} && \
  117. cd ${TOOLS_HOME} && \
  118. curl -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
  119. tar zxvf sqlite-autoconf-3350500.tar.gz && \
  120. cd sqlite-autoconf-3350500 && \
  121. ./configure --prefix=${TOOLS_HOME}/sqlite && make && make install'
  122. export LD_LIBRARY_PATH=${TOOLS_HOME}/sqlite/lib:/usr/local/lib:$LD_LIBRARY_PATH
  123. fi
  124. }
  125. function redhat9_ppc_install() {
  126. if [[ $FORCEINSTALL -eq 1 ]]; then
  127. # pre-req install
  128. sudo -- sh -c 'yum install -y \
  129. java-11-openjdk-devel \
  130. java-11-openjdk-headless \
  131. krb5-workstation \
  132. nmap-ncat \
  133. xmlsec1 \
  134. xmlsec1-openssl \
  135. libss \
  136. ncurses-devel'
  137. # MySQLdb install
  138. sudo -- sh -c 'yum install -y python3-mysqlclient'
  139. # NODEJS install
  140. sudo sh -c 'curl -fsSL https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-ppc64le.tar.gz -o node-v20.11.0-linux-ppc64le.tar.gz && \
  141. mkdir -p /usr/local/lib/nodejs && \
  142. tar -xzf node-v20.11.0-linux-ppc64le.tar.gz -C /usr/local/lib/nodejs'
  143. echo 'export PATH=/usr/local/lib/nodejs/node-v20.11.0-linux-ppc64le/bin:$PATH' >> ~/.bashrc
  144. source ~/.bashrc
  145. # Pip modules install
  146. sudo pip39_bin=${pip39_bin} -- sh -c '${pip39_bin} install virtualenv=='${VIRTUAL_ENV_VERSION}' virtualenv-make-relocatable=='${VIRTUAL_ENV_RELOCATABLE_VERSION}' mysqlclient==2.1.1'
  147. sudo pip39_bin=${pip39_bin} -- sh -c 'ln -fs ${pip39_bin} $(dirname ${pip39_bin})/pip'
  148. # sqlite3 install
  149. sudo TOOLS_HOME=${TOOLS_HOME} -- sh -c 'mkdir -p ${TOOLS_HOME} && \
  150. cd ${TOOLS_HOME} && \
  151. curl -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
  152. tar zxvf sqlite-autoconf-3350500.tar.gz && \
  153. cd sqlite-autoconf-3350500 && \
  154. ./configure --prefix=${TOOLS_HOME}/sqlite && make && make install'
  155. export LD_LIBRARY_PATH=${TOOLS_HOME}/sqlite/lib:/usr/local/lib:$LD_LIBRARY_PATH
  156. fi
  157. }
  158. function sles12_install() {
  159. if [[ $FORCEINSTALL -eq 1 ]]; then
  160. # pre-req install
  161. sudo -- sh -c 'zypper install -y cyrus-sasl-gssapi \
  162. cyrus-sasl-plain \
  163. java-11-openjdk \
  164. java-11-openjdk-devel \
  165. java-11-openjdk-headless \
  166. krb5-client pam_krb5 krb5-appl-clients krb5-plugin-kdb-ldap \
  167. libpcap \
  168. ncurses-devel \
  169. nmap \
  170. xmlsec1 xmlsec1-devel xmlsec1-openssl-devel'
  171. # MySQLdb install
  172. sudo -- sh -c 'zypper install -y libmysqlclient-devel libmysqlclient18 libmysqld18 libmysqld-devel'
  173. # NODEJS 16 install
  174. # Upgrading to node-v16 because of the following CVE's in node-v14 "CVE-2021-3450, CVE-2021-44531, CVE-2023-32004, CVE-2023-32006"
  175. # Node-v20-LTS is not supported by old OS'es - Redhat7_ppc, Centos7, Ubuntu18, Sles12. So upgrading to node-v16
  176. sudo -- sh -c 'zypper install -y npm14 nodejs16'
  177. # Pip modules install
  178. sudo pip38_bin=${pip38_bin} -- sh -c '${pip38_bin} install virtualenv=='${VIRTUAL_ENV_VERSION}' virtualenv-make-relocatable=='${VIRTUAL_ENV_RELOCATABLE_VERSION}' mysqlclient==2.1.1'
  179. sudo pip38_bin=${pip38_bin} -- sh -c 'ln -fs ${pip38_bin} $(dirname ${pip38_bin})/pip'
  180. # sqlite3 install
  181. sudo -- sh -c 'curl --insecure -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
  182. tar zxvf sqlite-autoconf-3350500.tar.gz && \
  183. cd sqlite-autoconf-3350500 && \
  184. ./configure --prefix=/usr/local/ && make && make install'
  185. export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
  186. fi
  187. }
  188. function sles15_install() {
  189. if [[ $FORCEINSTALL -eq 1 ]]; then
  190. # pre-req install
  191. sudo -- sh -c 'zypper install -y cyrus-sasl-gssapi \
  192. cyrus-sasl-plain \
  193. java-11-openjdk \
  194. java-11-openjdk-devel \
  195. java-11-openjdk-headless \
  196. krb5-client pam_krb5 krb5-plugin-kdb-ldap \
  197. libpcap \
  198. ncurses-devel \
  199. nmap \
  200. xmlsec1 xmlsec1-devel xmlsec1-openssl-devel'
  201. # MySQLdb install
  202. sudo -- sh -c 'zypper install -y libmariadb-devel mariadb-client python3-mysqlclient'
  203. # NODEJS 20 install
  204. sudo -- sh -c 'zypper install -y nodejs18 npm16'
  205. # Pip modules install
  206. sudo pip38_bin=${pip38_bin} -- sh -c '${pip38_bin} install virtualenv=='${VIRTUAL_ENV_VERSION}' virtualenv-make-relocatable=='${VIRTUAL_ENV_RELOCATABLE_VERSION}' mysqlclient==2.1.1'
  207. sudo pip38_bin=${pip38_bin} -- sh -c 'ln -fs ${pip38_bin} $(dirname ${pip38_bin})/pip'
  208. # sqlite3 install
  209. sudo -- sh -c 'curl --insecure -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
  210. tar zxvf sqlite-autoconf-3350500.tar.gz && \
  211. cd sqlite-autoconf-3350500 && \
  212. ./configure --prefix=/usr/local/ && make && make install'
  213. export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
  214. fi
  215. }
  216. function centos7_install() {
  217. if [[ $FORCEINSTALL -eq 1 ]]; then
  218. # pre-req install
  219. sudo -- sh -c 'yum install -y cyrus-sasl-gssapi \
  220. cyrus-sasl-plain \
  221. java-11-openjdk \
  222. java-11-openjdk-devel \
  223. java-11-openjdk-headless \
  224. krb5-workstation \
  225. libpcap \
  226. ncurses-devel \
  227. nmap-ncat \
  228. xmlsec1 \
  229. xmlsec1-openssl \
  230. unzip'
  231. # MySQLdb install
  232. sudo -- sh -c 'curl -sSLO https://dev.mysql.com/get/mysql80-community-release-el7-11.noarch.rpm && \
  233. rpm -ivh mysql80-community-release-el7-11.noarch.rpm && \
  234. yum install -y mysql-community-libs mysql-community-client-plugins mysql-community-common'
  235. # NODEJS 16 install
  236. # Upgrading to node-v16 because of the following CVE's in node-v14 "CVE-2021-3450, CVE-2021-44531, CVE-2023-32004, CVE-2023-32006"
  237. # Node-v20-LTS is not supported by old OS'es - Redhat7_ppc, Centos7, Ubuntu18, Sles12. So upgrading to node-v16
  238. sudo -- sh -c 'curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash - && \
  239. yum install -y nodejs npm'
  240. # sqlite3 install
  241. sudo -- sh -c 'curl -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
  242. tar zxvf sqlite-autoconf-3350500.tar.gz && \
  243. cd sqlite-autoconf-3350500 && \
  244. ./configure --prefix=/usr/local/ && make && make install'
  245. # python3.8 re install for sqlite3 3.35.5 or higher version
  246. sudo LD_LIBRARY_PATH=/usr/local/lib:$ORACLE_INSTANTCLIENT19_PATH:$LD_LIBRARY_PATH \
  247. LD_RUN_PATH=/usr/local/lib:$ORACLE_INSTANTCLIENT19_PATH:$LD_RUN_PATH \
  248. -- sh -c 'curl -o Python-3.8.13.tgz https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz && \
  249. tar zxvf Python-3.8.13.tgz && \
  250. cd Python-3.8.13 && \
  251. ./configure --enable-shared --prefix=/opt/cloudera/cm-agent && \
  252. make install'
  253. # Pip modules install
  254. sudo pip38_bin=${pip38_bin} -- sh -c '${pip38_bin} install virtualenv=='${VIRTUAL_ENV_VERSION}' virtualenv-make-relocatable=='${VIRTUAL_ENV_RELOCATABLE_VERSION}' mysqlclient==2.1.1'
  255. sudo pip38_bin=${pip38_bin} -- sh -c 'ln -fs ${pip38_bin} $(dirname ${pip38_bin})/pip'
  256. fi
  257. }
  258. function redhat8_install() {
  259. if [[ $FORCEINSTALL -eq 1 ]]; then
  260. # pre-req install
  261. sudo -- sh -c 'yum install -y \
  262. java-11-openjdk \
  263. java-11-openjdk-devel \
  264. java-11-openjdk-headless \
  265. krb5-workstation \
  266. ncurses-devel \
  267. nmap-ncat \
  268. xmlsec1 \
  269. xmlsec1-openssl \
  270. libss \
  271. ncurses-c++-libs'
  272. # MySQLdb install
  273. sudo -- sh -c 'yum install -y python3-mysqlclient'
  274. # NODEJS 20 install
  275. sudo -- sh -c 'curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - && \
  276. yum install -y nodejs'
  277. # Pip modules install
  278. sudo pip38_bin=${pip38_bin} -- sh -c '${pip38_bin} install virtualenv=='${VIRTUAL_ENV_VERSION}' virtualenv-make-relocatable=='${VIRTUAL_ENV_RELOCATABLE_VERSION}' mysqlclient==2.1.1'
  279. sudo pip38_bin=${pip38_bin} -- sh -c 'ln -fs ${pip38_bin} $(dirname ${pip38_bin})/pip'
  280. # sqlite3 install
  281. sudo -- sh -c 'curl -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
  282. tar zxvf sqlite-autoconf-3350500.tar.gz && \
  283. cd sqlite-autoconf-3350500 && \
  284. ./configure --prefix=/usr/local/ && make && make install'
  285. export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
  286. fi
  287. }
  288. function ubuntu18_install() {
  289. if [[ $FORCEINSTALL -eq 1 ]]; then
  290. # pre-req install
  291. sudo -- sh -c 'DEBIAN_FRONTEND=noninteractive apt -qq -y install \
  292. krb5-user \
  293. krb5-kdc \
  294. krb5-config \
  295. libkrb5-dev'
  296. sudo -- sh -c 'apt -y install \
  297. ldap-utils \
  298. libpython3.8-dev \
  299. libpython3.8-minimal \
  300. libpython3.8-stdlib \
  301. libxmlsec1 \
  302. libxmlsec1-openssl \
  303. netcat \
  304. nmap \
  305. python3-asn1crypto \
  306. python3-cffi-backend \
  307. python3-crypto \
  308. python3-cryptography \
  309. python3-keyring \
  310. python3-psycopg2 \
  311. python3-setuptools \
  312. python3-wheel \
  313. python3.8-venv \
  314. zlibc'
  315. # MySQLdb install
  316. # It is pre-installed
  317. # NODEJS 16 install
  318. # Upgrading to node-v16 because of the following CVE's in node-v14 "CVE-2021-3450, CVE-2021-44531, CVE-2023-32004, CVE-2023-32006"
  319. # Node-v20-LTS is not supported by old OS'es - Redhat7_ppc, Centos7, Ubuntu18, Sles12. So upgrading to node-v16
  320. sudo -- sh -c 'curl -sL https://deb.nodesource.com/setup_16.x | sudo bash - && \
  321. apt -y install nodejs'
  322. # Pip modules install
  323. sudo pip38_bin=${pip38_bin} -- sh -c '${pip38_bin} install virtualenv=='${VIRTUAL_ENV_VERSION}' virtualenv-make-relocatable=='${VIRTUAL_ENV_RELOCATABLE_VERSION}' mysqlclient==2.1.1'
  324. sudo pip38_bin=${pip38_bin} -- sh -c 'ln -fs ${pip38_bin} $(dirname ${pip38_bin})/pip'
  325. # sqlite3 install
  326. sudo -- sh -c 'curl -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
  327. tar zxvf sqlite-autoconf-3350500.tar.gz && \
  328. cd sqlite-autoconf-3350500 && \
  329. ./configure --prefix=/usr/local/ && make && make install'
  330. export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
  331. fi
  332. }
  333. function ubuntu20_install() {
  334. if [[ $FORCEINSTALL -eq 1 ]]; then
  335. # pre-req install
  336. sudo -- sh -c 'DEBIAN_FRONTEND=noninteractive apt -qq -y install \
  337. krb5-user \
  338. krb5-kdc \
  339. krb5-config \
  340. libkrb5-dev'
  341. sudo -- sh -c 'apt -y install \
  342. ldap-utils \
  343. libpython3.8-dev \
  344. libpython3.8-minimal \
  345. libpython3.8-stdlib \
  346. libxmlsec1 \
  347. libxmlsec1-openssl \
  348. netcat \
  349. nmap \
  350. python-asn1crypto \
  351. python3-crypto \
  352. python3-cryptography \
  353. python3-keyring \
  354. python3-psycopg2 \
  355. python3-setuptools \
  356. python3-wheel \
  357. python3.8-venv \
  358. zlibc \
  359. openssl \
  360. sudo \
  361. tar \
  362. util-linux'
  363. # MySQLdb install
  364. # It is pre-installed
  365. # NODEJS 20 install
  366. sudo -- sh -c 'apt-get install -y curl && \
  367. curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && \
  368. apt-get install -y nodejs'
  369. # Pip modules install
  370. sudo pip38_bin=${pip38_bin} -- sh -c '${pip38_bin} install virtualenv=='${VIRTUAL_ENV_VERSION}' virtualenv-make-relocatable=='${VIRTUAL_ENV_RELOCATABLE_VERSION}' mysqlclient==2.1.1'
  371. sudo pip38_bin=${pip38_bin} -- sh -c 'ln -fs ${pip38_bin} $(dirname ${pip38_bin})/pip'
  372. # sqlite3 install
  373. sudo -- sh -c 'curl -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
  374. tar zxvf sqlite-autoconf-3350500.tar.gz && \
  375. cd sqlite-autoconf-3350500 && \
  376. ./configure --prefix=/usr/local/ && make && make install'
  377. export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
  378. fi
  379. }
  380. function redhat9_install() {
  381. if [[ $FORCEINSTALL -eq 1 ]]; then
  382. # pre-req install
  383. sudo -- sh -c 'yum install -y \
  384. java-11-openjdk \
  385. java-11-openjdk-devel \
  386. java-11-openjdk-headless \
  387. krb5-workstation \
  388. ncurses-devel \
  389. nmap-ncat \
  390. xmlsec1 \
  391. xmlsec1-openssl \
  392. libss \
  393. ncurses-c++-libs'
  394. # MySQLdb install
  395. sudo -- sh -c 'yum install -y python3-mysqlclient'
  396. # NODEJS 20 install
  397. sudo -- sh -c 'curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - && \
  398. yum install -y nodejs'
  399. # Pip modules install
  400. sudo pip39_bin=${pip39_bin} -- sh -c '${pip39_bin} install virtualenv=='${VIRTUAL_ENV_VERSION}' virtualenv-make-relocatable=='${VIRTUAL_ENV_RELOCATABLE_VERSION}' mysqlclient==2.1.1'
  401. sudo pip39_bin=${pip39_bin} -- sh -c 'ln -fs ${pip39_bin} $(dirname ${pip39_bin})/pip'
  402. # sqlite3 install
  403. sudo -- sh -c 'curl -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
  404. tar zxvf sqlite-autoconf-3350500.tar.gz && \
  405. cd sqlite-autoconf-3350500 && \
  406. ./configure --prefix=/usr/local/ && make && make install'
  407. export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
  408. fi
  409. }