凡科网做网站如何推广,如何规避电子政务门户网站建设教训,购物网站的目的和意义,免费营销网站制作模板背景说明
公司环境处于内网#xff0c;某同事需要安装redis#xff0c;如果使用通过源码编译安装redis#xff0c;很多编译工具如gcc就需要先安装#xff0c;但处于内网安装起来不太方便#xff0c;当然也不是不可以。我们此处就选用通过redis的rpm包进行安装。
rpm包查…背景说明
公司环境处于内网某同事需要安装redis如果使用通过源码编译安装redis很多编译工具如gcc就需要先安装但处于内网安装起来不太方便当然也不是不可以。我们此处就选用通过redis的rpm包进行安装。
rpm包查找及下载
找一台可以上互联网的干净服务器干净的目的是防止以前有些包安装过就不会再下载最好与需要安装的服务器版本一致。由于使用rpm包进行安装时redis也是有一定依赖的可以通过yumdownloader添加resolve参数下载相关的依赖。yumdownloader命令默认没有安装需要自己手动安装。
#如何不能安装可能需要添加相应的yum源
[rootk8s-m3 ~]# yum install -y yumdownloader
[rootk8s-m3 ~]# yumdownloader --resolve redis --destdir/tmp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/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.cn
base | 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安装redisjemalloc这个rpm包是需要的。将上面两个包拷贝至内网服务器就可以愉快的安装了。
内网安装redis
#可以看到先安装redis包时会提示依赖
[rootk8s-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即可
[rootk8s-m1 ~]# rpm -ivh jemalloc-3.6.0-1.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...1:jemalloc-3.6.0-1.el7 ################################# [100%][rootk8s-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的知识分享请前往博客主页。编写过程中难免出现差错敬请指出