码迷,mamicode.com
首页 > 编程语言 > 详细

centos7 安装python3.6 脚本

时间:2018-07-02 14:50:50      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:ash   下载   conf   wget   evel   local   bin   line   sqli   

shell 脚本自动安装python3

# /bin/bash

cd /opt
yum groupinstall "Development tools" -y
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz
if [ -f /opt/Python-3.6.6.tar.xz ];then
    tar -xf Python-3.6.6.tar.xz
    cd /opt/Python-3.6.6
    ./configure --prefix=/usr/local/python3 --enable-optimizations
    if [ $0 == 0 ];then
        make && make install
        ln -s /usr/local/python3/bin/python3 /usr/bin/python3
        ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
    else
        echo "./configure 出现错误"
    fi
else
    echo "下载失败"
fi

 

centos7 安装python3.6 脚本

标签:ash   下载   conf   wget   evel   local   bin   line   sqli   

原文地址:https://www.cnblogs.com/zhengyionline/p/9253636.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!