您的位置:首页 > 数据库 > MySQL

MySQL主从复制

2015-04-02 23:19 113 查看
Centos自带的python版本太低,所以自己编译安装下python 2.7.10

安装需要的包:
[root@python ~]# yum -y install wget
[root@python ~]# yum -y install gcc
[root@python ~]# wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
[root@python ~]# tar xf Python-2.7.10.tgz
[root@python ~]# cd Python-2.7.10

[root@python Python-2.7.10]# ./configure --prefix=/usr/local/python2.7.10

[root@python Python-2.7.10]# make
[root@python Python-2.7.10]# make install

备份系统自带的python:
[root@python Python-2.7.10]# mv /usr/bin/python /usr/bin/python_bak

[root@python Python-2.7.10]# ln -s /usr/local/python2.7.10/bin/python /usr/bin/python

查看python版本:
[root@python Python-2.7.10]# python
Python 2.7.10 (default, Dec 4 2015, 22:22:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

安装之后yum不能用了,修改yum文件的第一行即可

[root@python ~]# which yum
/usr/bin/yum
[root@python ~]# vi /usr/bin/yum
#!/usr/bin/python_bak

解决Python2.7.10交互模式中方向键、退格键乱码问题。安装readline-devel,装完后重新编译安装python才可以使用。
[root@python ~]# yum -y install readline-devel

本文出自 “卡卡西” 博客,请务必保留此出处http://whnba.blog.51cto.com/1215711/1719579
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: