centos6 安装python2.7

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 北京涛子 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/liujitao79/p/6088033.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值