简介:
Redis是一个内存中键值存储,以其灵活性、性能和广泛的语言支持而闻名。它通常用作数据库、缓存和消息代理,并支持各种数据结构。
本教程是演示如何再Ubuntu 18.04上用源码安装和配置Redis
#STEP1:安装依赖项
下载源码之前,必须满足构建依赖性
$ sudo apt update
$ sudo apt install build-essential tcl
#STEP2:下载、编译和安装Redis
安装依赖项以后,就可以下载源码了。用curl下载Redis最稳定的版本。最新的版本始终能在稳定的下载链接中找到
$ curl -O http://download.redis.io/redis-stable.tar.gz
解压缩:
$ tar zxvf redis-stable.tar.gz
执行以下操作进入解压后的redis文件夹编译安装
$ cd redis-stable
$ make
$ make test
$ sudo make install
安装完成之后,开始配置。在etc目录中创建新的文件夹,并复制源码中的示例redis配置文件到新文件夹
sudo mkdir /etc/redis
sudo cp redis-stable/redis.conf /etc/redis //源码所在目录
编辑配置文件
sudo vim /etc/redis/redis.conf
. . .
# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the \'dbfilename\' configuration directive.
#
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir /var/lib/redis
. . .
继续阅读与本文标签相同的文章
下一篇 :
弱电工程无线网桥知识大全
-
字节跳动要做一款24小时在家陪读的AI教练,原锤子团队参与研发
2026-05-18栏目: 教程
-
全能扫描工具,支持OCR文字识别,全平台
2026-05-18栏目: 教程
-
区块链国家队来了!国家信息中心与银联等联合发布区块链服务网
2026-05-18栏目: 教程
-
什么是企业部署物联网的重点?
2026-05-18栏目: 教程
-
法大大创始人兼CEO黄翔:中国电子签名市场渗透率不到1% 复合增长率可达200%
2026-05-18栏目: 教程
