由于以前幫朋友買過阿里云服務器,一直以為,不能再體驗新用戶免費了,由于最近比較有心情研究python,linux,就報著僥幸的心理,重新注冊一個帳號試一下,注冊完之后,驚奇的發現,原來阿里只要是新注冊的帳戶就可以免費申請半年的ces,不驗證身份信息,同一個實名認證下不同的帳號,也可以免費申請,開了1M帶寬,并順手申請了免費的數據庫,yeah….開始真正的服務器學習之旅了.
centos6.5下默認的python 是2.6.6 本來想升級到2.7的, bing了一下,發現升級后有系統默認的很多東西要重新配,比如yum ,所以做罷,2.6就2.6吧.
[root@iZ28w7cidk2Z ~]# yum install python-pipLoaded plugins: securitySetting up Install PRocessResolving Dependencies--> Running transaction check---> Package python-pip.noarch 0:1.3.1-4.el6 will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================ Package Arch Version Repository Size================================================================================Installing: python-pip noarch 1.3.1-4.el6 epel 330 kTransaction Summary================================================================================Install 1 Package(s)Total download size: 330 kInstalled size: 1.0 MIs this ok [y/N]: yDownloading Packages:python-pip-1.3.1-4.el6.noarch.rpm | 330 kB 00:00 Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : python-pip-1.3.1-4.el6.noarch 1/1 Verifying : python-pip-1.3.1-4.el6.noarch 1/1 Installed: python-pip.noarch 0:1.3.1-4.el6 Complete![root@iZ28w7cidk2Z ~]# pip install pymysqlDownloading/unpacking pymysql Downloading PyMySQL-0.6.3.tar.gz (53kB): 53kB downloaded Running setup.py egg_info for package pymysqlInstalling collected packages: pymysql Running setup.py install for pymysqlSuccessfully installed pymysqlCleaning up...[root@iZ28w7cidk2Z ~]# pythonPython 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import pymysql>>>
其實 就兩句:
#yum install python-pip#pip install pymysql新聞熱點
疑難解答