Redis手动编译

Redis手动编译

1、编译环境

硬件环境:香橙派5 aarch64架构
软件环境:Ubuntu 22.04.3 LTS
编译版本:redis-6.2.6

2、编译操作

(1)、获取源码包

#更新软件包,安装编译依赖
apt update
apt install build-essential tcl -y

wget http://download.redis.io/releases/redis-6.2.6.tar.gz
tar -xzf redis-6.2.6.tar.gz
cd redis-6.2.6

(2)编译安装

#编译
make

#多线程编译
make -j 线程数

#安装
make install

#指定目录安装
make PREFIX=/data/make_test/redis_for_make/redis install

#创建配置文件目录,复制配置文件到安装目录
mkdir -p /data/make_test/redis_for_make/redis/etc/
cp /data/make_test/redis_for_make/redis-6.2.6/redis.conf /data/make_test/redis_for_make/redis/etc/

(3)、启动

cd /data/make_test/redis_for_make/redis/bin
./redis-server ../etc/redis.conf 

1956753:C 07 May 2025 20:03:33.242 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1956753:C 07 May 2025 20:03:33.242 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1956753, just started
1956753:C 07 May 2025 20:03:33.242 # Configuration loaded
1956753:M 07 May 2025 20:03:33.242 * Increased maximum number of open files to 10032 (it was originally set to 1024).
1956753:M 07 May 2025 20:03:33.242 * monotonic clock: POSIX clock_gettime
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 6.2.6 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                  
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 1956753
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           https://redis.io       
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

1956753:M 07 May 2025 20:03:33.243 # Server initialized
1956753:M 07 May 2025 20:03:33.243 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

#测试
redis-cli 
127.0.0.1:6379> set a 1
OK
127.0.0.1:6379> get a
"1"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值