Install python2.7 + pip + mysqld and centospython2.7 in centos

Source: Internet
Author: User

Install python2.7 + pip + mysqld and centospython2.7 in centos

Python2.7

Copy codeThe Code is as follows:
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

Copy codeThe Code is as follows:
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

Copy codeThe Code is as follows:
Yum-y install MySQL-python
Yum-y install mysql-devel
Easy_install-2.7 MySQL-python

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.