centos7下常用环境配置
编译安装python3.6的步骤 1.下载python3源码包 wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz 2.下载python3编译的依赖包(复制粘贴) yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y 3.解压缩源码包 tar -xvf Python-3.6.2.tgz 4.进入源码包文件夹 cd Python-3.6.2 5.编译且安装 1.进入源码包目录 2. ls查看源码包内容 3. 释放编译文件 Makefile ./configure --prefix=/opt/python36/ --prefix 这个参数 是制定一个安装路径 4.编译 make 5.编译安装,此步才会最终生成 /opt/python36/ make install 6.进入/opt目录查看python36文件夹,我们要的python3都在这里了 cd /opt/ ls 6.更改linux的path变量