mysql python yum_yum python mysql

f9fe3c8016a7c2b17d073707a2a18376.png

lrwxrwxrwx 1 root root 25 Jun 25 19:38 pyspark -> /etc/alternatives/pyspark

lrwxrwxrwx1 root root 34 Jul 24 20:49 python -> /usr/local/python362/bin/python3.6lrwxrwxrwx1 root root 6 Oct 28 2016 python2 ->python-rwxr-xr-x 2 root root 4864 Aug 18 2016python_2-rwxr-xr-x 2 root root 4864 Aug 18 2016 python2.6

#!/usr/bin/python_2

importsystry:importyumexceptImportError:print >> sys.stderr, """\

There was a problem importing one of the Python modules

required to run yum. The error leading to this problem was:

%s

Please install a package which provides this module, or

verify that the module is installed correctly.

It's possible that the above module doesn't match the

current version of Python, which is:

%s

If you cannot solve this problem yourself, please go to

the yum faq at:

http://yum.baseurl.org/wiki/Faq""" %(sys.exc_value, sys.version)

sys.exit(1)

sys.path.insert(0,'/usr/share/yum-cli')try:importyummain

yummain.user_main(sys.argv[1:], exit_code=True)exceptKeyboardInterrupt, e:print >> sys.stderr, "\n\nExiting on user cancel."sys.exit(1)~

~

~

~

~

~

~

"/usr/bin/yum" 32L, 803C

en.wikipedia.org/wiki/Yum_(.rpm)

The Yellowdog Updater, Modified (yum) is an open-source command-line package-management utility for computers running the Linux operating system using the RPM Package Manager.graphical user interfaces to yum functionality.

Yum allows automatic updates, package and dependency management, on RPM-based distributions.Advanced Package Tool (APT) from Debian, yum works with software repositories (collections of packages), which can be accessed locally

Under the hood, yum depends on RPM, which is a packaging standard for digital distribution of software, which automatically uses hashes and digisigs to verify the authorship and integrity of said software; unlike some app stores, which serve a similar function, neither yum nor RPM provide built-in support for proprietary restrictions on copying of packages by endusers. Yum is implemented as libraries in the Python programming language, with a small set of programs that provide a command-line interface.DNF is currently being developed and replaced yum as the default package manager in Fedora 22.

【学习路径】

https://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html#yum-repo-installing-mysql

【初始化】

lsb_release -d

Description: CentOS Linux release 7.3.1611 (Core)

yum update

cd usr

mkdir mysql

cd mysql

#https://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html#yum-repo-installing-mysql

#https://dev.mysql.com/downloads/repo/yum/

#mysql57-community-release-el7-11.noarch.rpm

wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

md5sum mysql57-community-release-el7-11.noarch.rpm

【安装】

sudo yum localinstall mysql57-community-release-el7-11.noarch.rpm

【版本选5.6】

cat /etc/yum.repos.d/mysql-community.repo

For example, to install MySQL 5.6, make sure you have enabled=0 for the above subrepository entry for MySQL 5.7, and have enabled=1 for the entry for the 5.6 series:

# Enable to use MySQL 5.6

[mysql56-community]

name=MySQL 5.6 Community Server

baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

【校验】

yum repolist enabled | grep "mysql.*-community.*"

【安装】

sudo yum install mysql-community-server

【启动】

sudo service mysqld start

【校验】

sudo service mysqld status

mysql -uroot -p

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值