티스토리 뷰

1. 설치 환경
[root@graycha laravel]# cat /etc/ *-release   
CentOS Linux release 7.6.1810 (Core)


2. 기본적으로 python 이 설치되어있으나 버전이 낮다.
# python (탭.탭)
# Python 2.7.5 (default, Apr  9 2019, 14:30:50) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 


3. 공식사이트에서 최신버전을 설치하자
- https://www.python.org/downloads/release/python-374/ 
- 최신버전 Gzipped source tarball 링크 복사


4. 복사된 링크 wget
# wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz  
(* wget 미설치 시, yum install -y wget )


5. 압축 풀고, 설치 해주자
# cd [wget 경로]
# tar -zxvf Python-3.7.4.tgz
# ./configure
# ./make


6. 링크설정 ( 설치 경로에서 실행 )
# ln -s python /sbin/python3


7. 확인
# python (탭.탭)
# python3
[root@graycha Python-3.7.4]# python3
Python 3.7.4 (default, Sep  7 2019, 21:03:48) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
댓글