一、命令行输入:sudo vim /etc/..(某文件)
若要编辑该文件:1.敲字母i
2.对文件编辑完后,按Esc,:q(退出不保存);:wq(保存退出)
二、安装python3
1.安装必要工具
yum -y install net-tools
yum -y install wget
2. 安装相关包
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
3.下载Python3
wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz
4.解压
tar -xvJf Python-3.6.2.tar.xz
5.切换进入
cd Python-3.6.2
6.编译安装
./configure prefix=/usr/local/python3
make && make install
7.python3安装完毕,/usr/local/目录下就会有python3了 因此我们可以添加软链到执行目录下/usr/bin
ln -s /usr/local/python3/bin/python3 /usr/bin/python3