首页 > 数据库 >redis安装方式

redis安装方式

时间:2023-01-29 15:24:06浏览次数:51  
标签:opt 方式 root redis server 7.0 安装 localhost

1、源码包编码安装
  • 操作系统版本centos7.6

  • redis版本是7.0.8

1.1 安装工具

[root@localhost ~]# yum install gcc gcc-c++ tcl -y

1.2 创建安装目录

[root@localhost ~]# mkdir /opt/redis-7.0.8
[root@localhost ~]# mkdir /opt/redis-7.0.8/{log,bin,etc}

1.3 解压安装

[root@localhost ~]# tar -zxvf redis-7.0.8.tar.gz
[root@localhost ~]# cd redis-7.0.8
[root@localhost redis-7.0.8]# make
...
zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录
# 处理zmalloc.h异常
[root@localhost redis-7.0.8]# make MALLOC=libc
# 可省略,测试是否有异常
[root@localhost redis-7.0.8]# make test
All tests passed without errors!
# 拷贝redis相关工具命令
[root@localhost redis-7.0.8]# cd src/
[root@localhost src]# cp redis-check-aof redis-check-rdb redis-benchmark redis-cli redis-server /opt/redis-7.0.8/bin/
# 开始安装
[root@localhost src]# cd ../utils/
# 直接运行安装脚本,出现如下提示信息
[root@localhost utils]# ./install_server.sh
Please take a look at the provided example service unit files in this directory, and adapt and install them. Sorry!
# 编辑安装脚本,注释以下内容
[root@localhost utils]# vim install_server.sh
##bail if this system is managed by systemd
#_pid_1_exe="$(readlink -f /proc/1/exe)"
#if [ "${_pid_1_exe##*/}" = systemd ]
#then
#       echo "This systems seems to use systemd."
#       echo "Please take a look at the provided example service unit files in this directory, and adapt and install them. Sorry!"
#       exit 1
#fi
# 再次执行安装脚本
[root@localhost utils]# ./install_server.sh 
Welcome to the redis service installer
This script will help you easily set up a running redis server

Please select the redis port for this instance: [6379] 7480   
Please select the redis config file name [/etc/redis/7480.conf] /opt/redis-7.0.8/etc/redis.conf
Please select the redis log file name [/var/log/redis_7480.log] /opt/redis-7.0.8/log/redis.log 
Please select the data directory for this instance [/var/lib/redis/7480] /opt/redis-7.0.8/lib/redis
Please select the redis executable path [/usr/local/bin/redis-server] /opt/redis-7.0.8/bin/redis-server
Selected config:
Port           : 7480
Config file    : /opt/redis-7.0.8/etc/redis.conf
Log file       : /opt/redis-7.0.8/log/redis.log
Data dir       : /opt/redis-7.0.8/lib/redis
Executable     : /opt/redis-7.0.8/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/7480.conf => /etc/init.d/redis_7480
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!
# 查看redis进程
[root@localhost utils]# ps -ef | grep redis
root      33477      1  0 15:05 ?        00:00:00 /opt/redis-7.0.8/bin/redis-server 127.0.0.1:7480

标签:opt,方式,root,redis,server,7.0,安装,localhost
From: https://www.cnblogs.com/zbc230/p/17072745.html

相关文章

  • ReplaceGoogleCDN扩展下载和安装
    ReplaceGoogleCDN扩展下载和安装文档说明:只记录关键地方;2023-01-29在线安装备注:扩展市场的代码版本远落后于源码仓库版本ChromeFirefoxEdge手动安装:Chrome......
  • 安装VMware Tools,从本地主机上传文件到虚拟机
    一、在虚拟机上安装VMwareTools在虚拟机开机登陆后,我的上面的“安装VMwareTools”是点不了的,只能在开机的时候,可以点,点击重新安装VMwareTools,然后登录虚拟机  ......
  • IPv6之EUI-6地址生成 方式
               ......
  • OMV系统安装
    title:OMV系统安装设置date:2022-11-2915:14:10updated:tags:-OMV-NAScategories:-爱好-NASdescription:OMV系统安装安装步骤cover:https://s1......
  • Centos7安装Docker
    Centos7安装Docker一、安装环境安装Docker配置:Centos7Linux内核:官方建议3.10以上。注意:本文的命令使用的是root用户登录执行,不是root的话所有命令前面要加sud......
  • docker(linux安装docker)
    接上篇:docker(开篇)目前,CentOS仅发现版中的内核支持Docker。Docker运行在CentOS7(64-bit)上,要求系统64位,Linux系统内核3.8以上,这里选择CentOS7.x1、确定你是CentOS7及以......
  • Node.js 安装配置
    本章节我们将向大家介绍在Windows和Linux上安装Node.js的方法。本安装教程以Node.jsv4.4.3LTS(长期支持版本)版本为例。Node.js安装包及源码下载地址为:https:/......
  • linux-安装mysql
    1.在/use/local下mkdirmysql  2.切换到mysql文件夹下cdmysql  3.下载mysql wgethttps://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.20-lin......
  • 如何解决kaldi的依赖库mkl安装失败的问题
    最近在学习如何使用kaldi进行语音识别。按照进程进行安装部署时发现IntelMKL库总是失败。通过搜索大量的资料,但都发现不太适用。现在将失败的症状和解决方法分享一下,希望能......
  • Ubuntu下达梦(DM8)数据库安装
    1、下载链接链接:​​https://pan.baidu.com/s/147Qnw0f3kzLYDfMlLVAY7w​​提取码:4qhi2、将iso文件拷贝到linux系统里,放到/opt/dmdbms下。创建安装目录mkdir-p/opt/d......