centOS 6.5安装python和nginx

 

一、安装python3.5

1、安装python3.5

2、安装pip并升级到最新

下载wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz

注意:wget获取https的时候要加上:--no-check-certificate


tar zvxf 1.5.5.tar.gz    #解压文件
cd pip-1.5.5/
python setup.py install


升级:pip install -U pip

有时安装python3之后yum不能使用

vim /usr/bin/yum


二、安装nginx
yum install pcre*
wge下载
tar zxvf 文件名
进入解压目录./configure
make && make install
启动nginx:cd /usr/local/nginx/sbin ./nginx

三、其它
  1、安装lxml中提示出错

    cc tmp/xmlXPathInit88zygb3d.o -lxml2 -o a.out
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ug4st9f9/lxml/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-waq6u8vf-record/install-record.txt --single-version-externally-managed --compile" failed with error
code 1 in /tmp/pip-build-ug4st9f9/lxml/


  yum install libxslt-devel #然后重新安装就行了。


 

posted @ 2016-07-01 18:33  小小财经  阅读(292)  评论(0编辑  收藏  举报