MySQL通过RPM安装
以前写过一篇文章,RedHat Linux 6.1 安装MySQL,本文是从解决依赖的角度上再次描述如何在Linux下以RPM包方式安装MySQL。
[root@serv01 ~]# ls /iso/Packages/mysql* /iso/Packages/mysql-5.1.52-1.el6_0.1.x86_64.rpm /iso/Packages/mysql-devel-5.1.52-1.el6_0.1.x86_64.rpm /iso/Packages/mysql-bench-5.1.52-1.el6_0.1.x86_64.rpm /iso/Packages/mysql-libs-5.1.52-1.el6_0.1.i686.rpm /iso/Packages/mysql-connector-java-5.1.12-2.el6.x86_64.rpm /iso/Packages/mysql-libs-5.1.52-1.el6_0.1.x86_64.rpm /iso/Packages/mysql-connector-odbc-5.1.5r1144-7.el6.x86_64.rpm /iso/Packages/mysql-server-5.1.52-1.el6_0.1.x86_64.rpm /iso/Packages/mysql-devel-5.1.52-1.el6_0.1.i686.rpm /iso/Packages/mysql-test-5.1.52-1.el6_0.1.x86_64.rpm #安装mysql-server,出现依赖错误 [root@serv01 Packages]# rpm -ivh mysql-server-5.1.52-1.el6_0.1.x86_64.rpm warning: mysql-server-5.1.52-1.el6_0.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY error: Failed dependencies: mysql = 5.1.52-1.el6_0.1 is needed by mysql-server-5.1.52-1.el6_0.1.x86_64 perl(DBI) is needed by mysql-server-5.1.52-1.el6_0.1.x86_64 perl-DBD-MySQL is needed by mysql-server-5.1.52-1.el6_0.1.x86_64 perl-DBI is needed by mysql-server-5.1.52-1.el6_0.1.x86_64 #依次解决依赖问题 [root@serv01 Packages]# rpm -ivh mysql-libs-5.1.52-1.el6_0.1.x86_64.rpm warning: mysql-libs-5.1.52-1.el6_0.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] package mysql-libs-5.1.52-1.el6_0.1.x86_64 is already installed [root@serv01 Packages]# rpm -ivh perl-DBI-1.609-4.el6.x86_64.rpm warning: perl-DBI-1.609-4.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:perl-DBI ########################################### [100%] [root@serv01 Packages]# rpm -ivh mysql-server-5.1.52-1.el6_0.1.x86_64.rpm warning: mysql-server-5.1.52-1.el6_0.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY error: Failed dependencies: mysql = 5.1.52-1.el6_0.1 is needed by mysql-server-5.1.52-1.el6_0.1.x86_64 perl-DBD-MySQL is needed by mysql-server-5.1.52-1.el6_0.1.x86_64 [root@serv01 Packages]# rpm -ivh perl-DBD-MySQL-4.013-3.el6.x86_64.rpm warning: perl-DBD-MySQL-4.013-3.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:perl-DBD-MySQL ########################################### [100%] [root@serv01 Packages]# rpm -ivh mysql-server-5.1.52-1.el6_0.1.x86_64.rpm warning: mysql-server-5.1.52-1.el6_0.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY error: Failed dependencies: mysql = 5.1.52-1.el6_0.1 is needed by mysql-server-5.1.52-1.el6_0.1.x86_64 [root@serv01 Packages]# rpm -ivh mysql-5.1.52-1.el6_0.1.x86_64.rpm warning: mysql-5.1.52-1.el6_0.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:mysql ########################################### [100%] [root@serv01 Packages]# rpm -ivh mysql-server-5.1.52-1.el6_0.1.x86_64.rpm warning: mysql-server-5.1.52-1.el6_0.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:mysql-server ########################################### [100%] warning: /var/log/mysqld.log created as /var/log/mysqld.log.rpmnew #启动mysql服务,测试是否安装成功 [root@serv01 Packages]# service mysqld start Starting mysqld: [ OK ] [root@serv01 Packages]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.1.52 Source distribution Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | test | +--------------------+ 3 rows in set (0.00 sec) mysql>
我的邮箱:wgbno27@163.com 新浪微博:@Wentasy27 微信公众平台:JustOracle(微信号:justoracle) 数据库技术交流群:336882565(加群时验证 From CSDN XXX) Oracle交流讨论组:https://groups.google.com/d/forum/justoracle By Larry Wen
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客] |