yum -y install epel-release wget make gcc-c++
cd /opt
wget https://download.redis.io/releases/redis-6.2.3.tar.gz tar -xf redis-6.2.3.tar.gz
cd redis-6.2.3
make
make install PREFIX=/usr/local/redis cp redis.conf /etc/redis.conf
sed -i "s/bind 127.0.0.1/bind 0.0.0.0/g" /etc/redis.conf
sed -i "s/daemonize no/daemonize yes/g" /etc/redis.conf
sed -i "561i maxmemory-policy allkeys-lru" /etc/redis.conf
sed -i "481i requirepass weakPassword" /etc/redis.conf vi /etc/systemd/system/redis.service
[Unit]
Description=Redis persistent key-value database
After=network.target
After=network-online.target
Wants=network-online.target [Service]
Type=forking
PIDFile=/var/run/redis_6379.pid
ExecStart=/usr/local/redis/bin/redis-server /etc/redis.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID [Install]
WantedBy=multi-user.target systemctl enable redis
systemctl start redis

centos7使用yum方式安装redis6的更多相关文章

  1. CentOS7下yum方式安装mysql5.6

    在Centos7中用MariaDB代替了mysql数据库.所以在新安装MySQL前必须做好对系统的清理工作. 一.清理CentOS7下的MariaDB. [root@localhost ~]#rpm ...

  2. centos7使用yum方式安装node_exporter

    官网下载地址:https://prometheus.io/download/ 选择对应的系统版本 官网提供的是压缩包,点击旁边的github地址 github页面显示的有yum安装和docker安装, ...

  3. centos7下yum方式安装MySQL5.7

    前言: MySQL作为一款免费.开源数据库产品,已经问世就饱受关注,很多中小企业甚至是大企业都钟爱MySQL,随着大数据的不断发展,我们接触的信息量也越来越多,虽然NoSQL是大数据的宠儿,但MySQ ...

  4. CentOS7.6 yum方式安装mysql2.7.25

    在CentOS中默认安装有MariaDB,这个是MySQL的分支,但为了需要,还是要在系统中安装MySQL,而且安装完成之后可以直接覆盖掉MariaDB 1 下载并安装MySQL官方的 Yum Rep ...

  5. CentOS7系统yum方式安装MySQL5.7

    参考:https://www.cnblogs.com/bigbrotherer/p/7241845.html#top 1.在CentOS中默认安装有MariaDB,这个是MySQL的分支,但为了需要, ...

  6. CentOS7使用yum方式安装Containerd

    # 安装需要的软件包, yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动依赖的 yum install -y yum-utils device-m ...

  7. CentOS7.6 yum方式安装redis最新版

    sudo yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm sudo yum --enablerep ...

  8. CentOS7.9 yum方式安装redis最新版

    yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm yum --enablerepo=remi ins ...

  9. centos7使用yum方式安装MySQL5.7

    yum -y localinstall http://mirrors.ustc.edu.cn/mysql-repo/mysql57-community-release-el7.rpm yum inst ...

随机推荐

  1. Code Runner for VS Code,下载量突破 4000 万!支持超过50种语言

    大家好! 我是韩老师.还记得 6 年前的夏天,我在巨硬写着世界上最好的语言,有时也需要带着游标卡尺写着另一门语言.然而,我对这两门语言都不熟悉,如果能在 VS Code 中方便快捷地运行各种语言,那岂 ...

  2. RK3568开发笔记(四):在虚拟机上使用SDK编译制作uboot、kernel和buildroot镜像

    前言   上一篇搭建好了ubuntu宿主机开发环境,本篇的目标系统主要是开发linux+qt,所以需要刷上billdroot+Qt创建的系统,为了更好的熟悉原理和整个开发过程,选择从零开始搭建rk35 ...

  3. Template -「矩阵 - 行列式」

    #include <cstdio> int Abs(int x) { return x < 0 ? -x : x; } int Max(int x, int y) { return ...

  4. Solution -「营业」「CF567D」One-Dimensional Battle Ships

    题目大意 - 翻译   Alice 和 Bob喜欢在 \(1\times n\) 的表格中玩战舰游戏.游戏开始时,Alice 有 \(k\) 艘战舰,每艘战舰长度为 \(a\),她需要把这些战舰不重叠 ...

  5. .Net 之时间轮算法(终极版)

    关于时间轮算法的起始 我也认真的看了时间轮算法相关,大致都是如下的一个图 个人认为的问题 大部分文章在解释这个为何用时间轮的时候都再说 假设我们现在有一个很大的数组,专门用于存放延时任务.它的精度达到 ...

  6. 使用fit-content撑开子元素

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. Luogu2783 有机化学之神偶尔会做作弊 (树链剖分,缩点)

    当联通块size<=2时不管 #include <iostream> #include <cstdio> #include <cstring> #includ ...

  8. Windows 注册表是什么?它的作用是什么?

    学习目的 了解 Windows 注册表的概念 了解 Windows 注册表的作用 注册表的概念 历史发展 在 Windows 3.x 操作系统中,注册表是一个极小文件,其文件名为 Reg.dat,里面 ...

  9. C++ 文件hash值 BT种子的hash值

    这个两个东东,是我在网上找到的.小小的修改了一下方便大家使用. 一个是 获取文件哈希值的,另外一个是获取torrent文件磁力链接的哈希值. 整理好的类下载地址: 文件hash值: http://pa ...

  10. OpenJ_Bailian - 3424 Candies (差分约束)

    题面 During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teache ...