줄기세포

[Python3.7] 자동설치 shell script / CentOS 7.9 본문

Python

[Python3.7] 자동설치 shell script / CentOS 7.9

줄기세포(Stem_Cell) 2023. 5. 21. 18:19

Terraform으로 Python3.7 자동설치에 사용하는 shell 입니다

  • 당연하지만 yum, wget 등 사용할 패키지는 설치되어 있어야 합니다.
  • wget으로 내부 Repo가 아니고 python 공식 사이트(외부)에서 가져오기 때문에 internet 연결이 되어 있어야 합니다.
#!/bin/bash
# python3.7

yum install gcc openssl-devel bzip2-devel libffi-devel -y

wget -P /root/ https://www.python.org/ftp/python/3.7.16/Python-3.7.16.tgz

cd /root/
tar -xf Python-3.7.16.tgz

cd /root/Python-3.7.16
./configure --enable-optimizations

make altinstall
Comments