工作环境 VMware? Workstation 12 Pro +centos7.2 +win10
虚拟机 NET网络模式
子网IP :192.168.129.0
子网掩码: 255.255.255.0
NET设置
网关:192.168.129.66(这个随意设置,但是要和centos里网关一样)
win10以太网打开共享网络
win10上设定 虚拟网卡 ip 和虚拟机在同一网段,
最后一步:设定centos网络
vi /etc/sysconfig/network-scripts/ifcfg-eno16777736
重启网络
方式一 :systemctl restart network
方式二 : /etc/init.d/networking restart
关闭防火墙systemctl stop firewalld (centos7)
最后当然是ping www.baidu.com
配置基础python环境
一、安装 pip、setuptools
1、用wget下载setuptools、pip源码进行安装
先安装wget : yum install –y wget
yum isntall -y wget 失败
yum provides‘*/applydeltarpm‘
yum install deltarpm
yum install wget
2、使用wget 下载pip、setuptools
wget "https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz"
wget "https://files.pythonhosted.org/packages/d3/3e/1d74cdcb393b68ab9ee18d78c11ae6df8447099f55fe86ee842f9c5b166c/setuptools-40.0.0.zip"
注:(https://pypi.python.org/pypi)官方下载地址
3、解压并安装
执行python setup.py install
更新pip包:pip install --upgrade install
4、安装虚拟环境
sudo pip install virtualenvsudo pip install virtualenvwrapper
原文地址:https://www.cnblogs.com/oranger9527/p/9556340.html