centos安装python2.7+pip+mysqld环境

发布时间:2020-06-21编辑:脚本学堂
本文介绍centos下安装python2.7、pip与+mysqld环境的整个过程,感兴趣的朋友参考下。

centos系统下安装pip+mysqld模块。
python版本:python2.7

以下是安装步骤:
 

复制代码 代码示例:

wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
yum install xz-libs
xz -d Python-2.7.6.tar.xz
ls
tar -xvf Python-2.7.6.tar
cd Python-2.7.6
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline
LDFLAGS="-Wl,-rpath /usr/local/lib"
 vim /etc/ld.so.conf
 ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
 make clean
 make && make altinstall
pip

wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz
tar -vxf setuptools-1.4.2.tar.gz
cd setuptools-1.4.2
python2.7 setup.py install
easy_install-2.7 pip
MySQLdb

yum -y install MySQL-python
yum -y install mysql-devel
easy_install-2.7 MySQL-python

pip+mysqld安装完成。