涛子 - 简单就是美

成单纯魁增,永继振国兴,克复宗清政,广开家必升

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
yum -y install centos-release-scl
yum -y install python27

临时生效

scl enable python27 bash

登录自动生效

cat > /etc/profile.d/python27.sh << EOF
#!/bin/bash

source /opt/rh/python27/enable
export X_SCLS="\`scl enable python27 'echo \$X_SCLS'\`"
EOF

python -V

cat > /etc/yum.repos.d/CentOS-SCLo.repo << EOF
[centos-sclo-sclo]
name=CentOS-6 - SCLo sclo
baseurl=http://mirror.tencentyun.com/centos/\$releasever/sclo/\$basearch/sclo/
failovermethod=priority
gpgcheck=0
enabled=1

[centos-sclo-rh]
name=CentOS-6 - SCLo rh
baseurl=http://mirror.tencentyun.com/centos/\$releasever/sclo/\$basearch/rh/
failovermethod=priority
gpgcheck=0
enabled=1
EOF
cat > /etc/yum.repos.d/CentOS-gf.repo << EOF
[gf]
name=gf for redhat/centos $releasever - $basearch
baseurl=http://mirror.ghettoforge.org/distributions/gf/el/\$releasever/plus/\$basearch
failovermethod=priority
enabled=1
gpgcheck=0
EOF
posted on 2016-11-22 10:00  北京涛子  阅读(197)  评论(0编辑  收藏  举报