服务器搭建--Linux安装redis

1.下载:

官网下载:https://redis.io/download

把安装包上传至服务器:

2.安装libevent:

解压redis:

[root@manmanda2018 ~]# cd /usr/local/soft/
[root@manmanda2018 soft]# tar -zxvf redis-4.0.9.tar.gz 

进入redis-4.0.9文件夹:

[root@manmanda2018 soft]# cd redis-4.0.9

安装:

[root@manmanda2018 redis-4.0.9]# make

启动:

[root@manmanda2018 redis-4.0.9]# cd src
[root@manmanda2018 src]# ./redis-server /usr/local/soft/redis-4.0.9/redis.conf

        打印启动日志:

18296:C 11 Apr 17:14:05.134 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18296:C 11 Apr 17:14:05.134 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=18296, just started
18296:C 11 Apr 17:14:05.134 # Configuration loaded
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 4.0.9 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 18296
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

18296:M 11 Apr 17:14:05.136 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
18296:M 11 Apr 17:14:05.136 # Server initialized
18296:M 11 Apr 17:14:05.136 # 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.
18296:M 11 Apr 17:14:05.136 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
18296:M 11 Apr 17:14:05.136 * Ready to accept connections

使用:

[root@manmanda2018 src]# ./redis-cli 
127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379> get foo
"bar"
127.0.0.1:6379> 

完结。

设置开机自启:

https://zhaoshuxiang.blog.csdn.net/article/details/109034969

 

服务器搭建--Linux安装jdk

服务器搭建--Linux安装tomcat

服务器搭建--Linux安装mysql5.7

服务器搭建--Linux安装MongoDB3.6.4

服务器搭建--Linux安装nginx

服务器搭建--Linux安装memcached

服务器搭建--Linux安装redis

服务器搭建--Linux安装erlang

服务器搭建--Linux安装rabbitmq

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

子非鱼yy

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值