当前位置:首页 >> 半导体技术突破 >> 【Redis】使用rpm包安装redis,ipad2怎么上网(redis rpm安装)

【Redis】使用rpm包安装redis,ipad2怎么上网(redis rpm安装)

cpugpu芯片开发光刻机 半导体技术突破 2
文件名:【Redis】使用rpm包安装redis,ipad2怎么上网 【Redis】使用rpm包安装redis 背景说明

公司环境处于内网,某同事需要安装redis,如果使用通过源码编译安装redis,很多编译工具如gcc就需要先安装,但处于内网安装起来不太方便,当然也不是不可以。我们此处就选用通过redis的rpm包进行安装。

rpm包查找及下载

找一台可以上互联网的干净服务器(干净的目的是防止以前有些包安装过,就不会再下载),最好与需要安装的服务器版本一致。由于使用rpm包进行安装时,redis也是有一定依赖的,可以通过yumdownloader添加resolve参数下载相关的依赖。yumdownloader命令默认没有安装,需要自己手动安装。

#如何不能安装,可能需要添加相应的yum源[root@k8s-m3 ~]# yum install -y yumdownloader[root@k8s-m3 ~]# yumdownloader --resolve redis --destdir=/tmpLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfileepel/x86_64/metalink | 7.8 kB 00:00:00 * base: mirrors.aliyun.com* centos-gluster9: mirrors.aliyun.com* elrepo: mirrors.tuna.tsinghua.edu.cn* epel: mirror.nyist.edu.cn* extras: mirrors.ustc.edu.cn* updates: mirrors.ustc.edu.cnbase | 3.6 kB 00:00:00 centos-gluster9 | 3.0 kB 00:00:00 docker-ce-stable | 3.5 kB 00:00:00 elrepo | 3.0 kB 00:00:00 epel | 4.7 kB 00:00:00 extras | 2.9 kB 00:00:00 kubernetes | 1.4 kB 00:00:00 mysql-connectors-community | 2.6 kB 00:00:00 mysql-tools-community | 2.6 kB 00:00:01 mysql57-community | 2.6 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/3): epel/x86_64/updateinfo | 1.0 MB 00:00:01 (2/3): epel/x86_64/primary_db | 7.0 MB 00:00:02 (3/3): docker-ce-stable/7/x86_64/primary_db | 117 kB 00:00:04 --> Running transaction check---> Package redis.x86_64 0:3.2.12-2.el7 will be installed--> Processing Dependency: libjemalloc.so.1()(64bit) for package: redis-3.2.12-2.el7.x86_64--> Running transaction check---> Package jemalloc.x86_64 0:3.6.0-1.el7 will be installed--> Finished Dependency Resolution(1/2): jemalloc-3.6.0-1.el7.x86_64.rpm | 105 kB 00:00:01 (2/2): redis-3.2.12-2.el7.x86_64.rpm | 544 kB 00:00:01

通过上面可以看到,如果要使用rpm安装redis,jemalloc这个rpm包是需要的。将上面两个包拷贝至内网服务器,就可以愉快的安装了。

内网安装redis #可以看到,先安装redis包时会提示依赖[root@k8s-m1 ~]# rpm -ivh redis-3.2.12-2.el7.x86_64.rpm error: Failed dependencies:libjemalloc.so.1()(64bit) is needed by redis-3.2.12-2.el7.x86_64#先安装依赖,再安装redis即可[root@k8s-m1 ~]# rpm -ivh jemalloc-3.6.0-1.el7.x86_64.rpm Preparing... ################################# [100%]Updating / installing...1:jemalloc-3.6.0-1.el7 ################################# [100%][root@k8s-m1 ~]# rpm -ivh redis-3.2.12-2.el7.x86_64.rpm Preparing... ################################# [100%]Updating / installing...1:redis-3.2.12-2.el7 ################################# [100%]

通过上面可以看到,其实我们也可以通过yundownloader下载gcc的相关依赖以及其他编译过程需要的工具包,然后通过源码编译安装redis。大家可以根据自己实际的需求进行选择。

更多关于redis的知识分享,请前往博客主页。编写过程中,难免出现差错,敬请指出

协助本站SEO优化一下,谢谢!
关键词不能为空
同类推荐
«    2025年12月    »
1234567
891011121314
15161718192021
22232425262728
293031
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
搜索
最新留言
文章归档
网站收藏
友情链接