rpm安装mysql报错NOKEY_Linux 安装Mysql5过程

自己第一次尝试使用源码包进行软件安装,使用的是虚拟机上的redhat9系统,在安装软件时可以使用rpm相关命令进行,直接下载相关的rpm包直接安装就可以。

关于使用源码包进行安装,先配置相关路径和参数,通过./configure,然后对该包进行编译make,通过之后直接make install就可以。

1、问题1:下载的一个mysql-5.1.35.tar.gz解压报错,如下:

错误信息: tar: Skipping to next header

tar: Archive contains obsolescent base-64 headers gzip: stdin: invalid compressed data--format violated

tar: Child returned status 1

tar: Error exit delayed from previous errors

出错原因查阅相关资料,在使用ftp工具上传下载的文件到达Linux中之后,如果没有进行相关的设置,在传输过程中默认不是二进制形式进行,而是字符形式,那么在接受之后解压就会报上面的错误,此时只要在ftp进行传输前,也就是执行get xx.tar.gz之前,键入bin,(ftp>bin)再进下载就没事了。

2、解压文件后,cd 到目录中,配置configure文件配置相关安装参数,configure相关参数具体有:

•--prefix=PREFIX:指定程序安装路径;

•--enable-assembler:使用汇编模式;

•--enable-local-infile:启用对LOAD DATA LOCAL INFILE语法的支持(默认不支持);

•--enable-profiling:Build a version with query profiling code (req.community-features)

•--enable-thread-safe-client:使用编译客户端;

•--with-big-tables:启用32位平台对4G大表的支持;

•--with-charset=CHARSET:指定字符集;

•--with-collation=:默认collation;

•--with-extra-charsets=CHARSET,CHARSET,...:指定附加的字符集;

•--with-fast-mutexes:Compile with fast mutexes

•--with-readline:

•--with-ssl:启用SSL的支持;

•--with-server-suffix=:添加字符串到版本信息;

•--with-embedded-server:编译embedded-server;

•--with-pthread:强制使用pthread类库;

•--with-mysqld-user=:指定mysqld守护进程的用户;

•--with-mysqld-ldflags=:静态编译MySQL服务器端;

•--with-client-ldflags=:静态编译MySQL客户端;

•--with-plugins=PLUGIN,PLUGIN,...:MySQL服务器端支持的组件(默认为空),可选值较多:◦partition:MySQL Partitioning Support;

◦daemon_example:This is an example plugin daemon;

◦ftexample:Simple full-text parser plugin;

◦archive:Archive Storage Engine;

◦blackhole:Basic Write-only Read-never tables;

◦csv:Stores tables in text CSV format,强制安装;

◦example:Example for Storage Engines for developers;

◦federated:Connects to tables on remote MySQL servers;

◦heap:Volatile memory based tables,强制安装;

◦ibmdb2i:IBM DB2 for i Storage Engine;

◦innobase:Transactional Tables using InnoDB;

◦innodb_plugin:Transactional Tables using InnoDB;

◦myisam:Traditional non-transactional MySQL tables,强制安装;

◦myisammrg:Merge multiple MySQL tables into one,强制安装;

◦ndbcluster:High Availability Clustered tables;

•--with-plugin-PLUGIN:强制指定的插件链接至MySQL服务器;

•--with-zlib-dir=:向MySQL提供一个自定义的压缩类库地址;

•--without-server:仅安装MySQL客户端;

•--without-query-cache:不要编译查询缓存;

•--without-geometry:不要编译geometry-related部分;

•--without-debug:编译为产品版,放弃debugging代码;

•--without-ndb-debug:禁用special ndb debug特性;

具体参考可以./configure --help查看。

3、执行配置完毕,没有出错,可以直接进入编译和安装阶段,执行make make install命令。

4、问题2:在配置执行配置文件configure中报错如下,导致后面编译不能进行。

./configure --prefix=/usr/local/mysql/ --with-server-suffix=-junsansi-edition --enable-assembler --enable-local-infile --enable-thread-safe-client --with-big-tables --with-charset=utf8 --with-extra-charsets=gbk,gb2312,utf8,ascii --with-readline --with-ssl --with-embedded-server --with-pthread --with-mysqld-user=mysql

checking for doxygen... no

checking for pdflatex... no

checking for makeindex... no

checking whether build environment is sane... yes

checking whether make sets $(MAKE)... (cached) yes

checking for gawk... (cached) gawk

checking for gcc... no

checking for cc... no

checking for cl.exe... no

原因:gcc,cc,doxygen等这些软件没有安装,先要安装这些软件。在red hat9提供的其中一个iso中查找有没有相关软件,否则需要下载安装。

5、后面再安装对应的rpm时报错:

[root@localhost xiaoli]# rpm -ivh MySQL-server-5.5.34-1.linux2.6.i386.rpm

warning: MySQL-server-5.5.34-1.linux2.6.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5

error: Failed dependencies:

libaio.so.1 is needed by MySQL-server-5.5.34-1.linux2.6

libaio.so.1(LIBAIO_0.1) is needed by MySQL-server-5.5.34-1.linux2.6

libaio.so.1(LIBAIO_0.4) is needed by MySQL-server-5.5.34-1.linux2.6

解决,安装时:rpm -ivh db4-tcl-4.3.29-10.el5.i386.rpm  --force --nodeps

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值