程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MySQL綜合教程 >> linux下 yum源、rpm、源代碼安裝mysql,yumrpm

linux下 yum源、rpm、源代碼安裝mysql,yumrpm

編輯:MySQL綜合教程

linux下 yum源、rpm、源代碼安裝mysql,yumrpm


mysql的安裝

一、yum源格式安裝mysql

1、到官網下載mysql的yum源:

[root@localhost Downloads]# wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm

[root@localhost Downloads]# ls
mysql57-community-release-el6-7.noarch.rpm

2、列出rpm包中文件(查看哪些內容):

[root@localhost Downloads]# rpm -qpl mysql57-community-release-el6-7.noarch.rpm
warning: mysql57-community-release-el6-7.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
/etc/yum.repos.d/mysql-community-source.repo
/etc/yum.repos.d/mysql-community.repo

3、安裝rpm包(自動配置好yum源):

[root@localhost Downloads]# rpm -ivh mysql57-community-release-el6-7.noarch.rpm
warning: mysql57-community-release-el6-7.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql57-community-relea########################################### [100%]

4、安裝mysql:

[root@localhost Downloads]# yum   install mysql

 5、啟動mysql:

[root@localhost mysql]# /etc/init.d/mysql start
Starting MySQL........ [ OK ]

 

二、RPM方式安裝mysql:

1.將下載好的文件上傳到Linux下:

[root@localhost Downloads]# ls
MySQL-5.6.16-1.el6.x86_64.rpm-bundle.tar

2、解壓tar文件:

[root@localhost Downloads]# tar -xf MySQL-5.6.16-1.el6.x86_64.rpm-bundle.tar

[root@localhost Downloads]# ls
MySQL-client-5.6.16-1.el6.x86_64.rpm
MySQL-devel-5.6.16-1.el6.x86_64.rpm
MySQL-embedded-5.6.16-1.el6.x86_64.rpm
MySQL-server-5.6.16-1.el6.x86_64.rpm
MySQL-shared-5.6.16-1.el6.x86_64.rpm
MySQL-shared-compat-5.6.16-1.el6.x86_64.rpm
MySQL-test-5.6.16-1.el6.x86_64.rpm

3、安裝rpm文件:

[root@localhost Downloads]# rpm -Uvh MySQL-*
Preparing... ########################################### [100%]
1:MySQL-devel ########################################### [ 14%]
2:MySQL-client ########################################### [ 29%]
3:MySQL-test ########################################### [ 43%]
4:MySQL-embedded ########################################### [ 57%]
5:MySQL-shared-compat ########################################### [ 71%]
6:MySQL-shared ########################################### [ 86%]
7:MySQL-server ########################################### [100%]

4、啟動mysql服務:

[root@localhost mysql]# /etc/init.d/mysql start
Starting MySQL........ [ OK ]

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved