当前位置:网站首页>Redis installation under Linux
Redis installation under Linux
2022-06-27 08:17:00 【Little moon 6】
One 、 install gcc Environmental Science
because redis By C language-written , Its operation requires C Environmental Science , So we need to install gcc. The installation command is as follows :
[[email protected]_SW_5748F_1 local]# yum install gcc-c++
Check whether the installation is successful
[[email protected]_SW_5748F_1 local]# gcc -v
Two 、 download Redis Installation package
use wget Directly in linux Download in the environment , // wget Is a free tool to download files from the Internet automatically
[[email protected]_SW_5748F_1 lhl]# wget http://download.redis.io/releases/redis-4.0.1.tar.gz
[[email protected]_SW_5748F_1 lhl]# pwd
/lhl
[[email protected]_SW_5748F_1 lhl]# ls
redis-4.0.1.tar.gz
3、 ... and 、 Unpack the installation
[[email protected]_SW_5748F_1 lhl]# tar -zvxf redis-4.0.1.tar.gz // unpack
[[email protected]_SW_5748F_1 lhl]# ls
redis-4.0.1 redis-4.0.1.tar.gz
[[email protected]_SW_5748F_1 lhl]# cd redis-4.0.1
[[email protected]_SW_5748F_1 redis-4.0.1]# ls
00-RELEASENOTES BUGS CONTRIBUTING COPYING deps INSTALL Makefile MANIFESTO README.md redis.conf runtest runtest-cluster runtest-sentinel sentinel.conf src tests utils
[[email protected]_SW_5748F_1 redis-4.0.1]# make // Compile the extracted file
[[email protected]_SW_5748F_1 redis-4.0.1]# make install // Yes Redis Installation
The installation was successful as follows
[[email protected]_SW_5748F_1 redis-4.0.1]# make install
cd src && make install
make[1]: Entry directory “/lhl/redis-4.0.1/src”
CC Makefile.dep
Hint: It's a good idea to run 'make test' ;)
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
make[1]: Leave the directory “/lhl/redis-4.0.1/src”
Four 、 start-up Redis
[[email protected]_SW_5748F_1 redis-4.0.1]# cd src
[[email protected]_SW_5748F_1 src]# ls
redis-cli redis-server // Will see redis Some configuration startup files , There are only two copies here
[[email protected]_SW_5748F_1 src]# redis-server
[[email protected]_SW_5748F_1 src]# redis-server
11981:C 30 Mar 22:08:43.224 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
11981:C 30 Mar 22:08:43.224 # Redis version=4.0.1, bits=64, commit=00000000, modified=0, pid=11981, just started
11981:C 30 Mar 22:08:43.224 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
11981:M 30 Mar 22:08:43.225 * Increased maximum number of open files to 10032 (it was originally set to 1024).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 4.0.1 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 11981
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
11981:M 30 Mar 22:08:43.227 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
11981:M 30 Mar 22:08:43.227 # Server initialized
5、 ... and 、 Connect Redis
Because it doesn't run in the background , So you need to re create a window connection
[[email protected]_SW_5748F_1 src]# redis-cli -p 6379
[[email protected]_SW_5748F_1 src]# redis-cli -p 6379
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> set k1 v1
OK
127.0.0.1:6379> get k1
"v1"
127.0.0.1:6379> shutdown // sign out
not connected> exit
[[email protected]_SW_5748F_1 src]# 6、 ... and 、 To configure Redis( Give Way Redis Running in the background , It's actually a daemon thread )
[[email protected]_SW_5748F_1 redis-4.0.1]# mkdir /usr/config // establish config Folder
[[email protected]_SW_5748F_1 redis-4.0.1]# cp redis.conf /usr/config // Copy redis.conf To /usr/config Folder
[[email protected]_SW_5748F_1 redis-4.0.1]# cd /usr/config
modify redis.conf file
[[email protected]_SW_5748F_1 config]# vim redis.conf //daemonize no Change to yes

7、 ... and 、 Start again redis
[[email protected]_SW_5748F_1 src]# redis-server /usr/config/redis.conf // start-up redis And specify the configuration file go back to redis-server directory
[[email protected]_SW_5748F_1 src]# ps -ef|grep redis // see redis Whether the process exists
[[email protected]_SW_5748F_1 src]# redis-server /usr/config/redis.conf
12367:C 30 Mar 22:41:27.556 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
12367:C 30 Mar 22:41:27.556 # Redis version=4.0.1, bits=64, commit=00000000, modified=0, pid=12367, just started
12367:C 30 Mar 22:41:27.556 # Configuration loaded
[[email protected]_SW_5748F_1 src]# ps -ef|grep redis
root 12368 1 0 22:41 ? 00:00:00 redis-server 127.0.0.1:6379
root 12373 7913 0 22:41 pts/0 00:00:00 grep --color=auto redis
[[email protected]_SW_5748F_1 src]#
Successfully completed , If you have any questions, you can ask me
边栏推荐
- 准备好迁移上云了?请收下这份迁移步骤清单
- Lvgl usage demo and instructions 2
- [10. difference]
- 若xn>0,且x(n+1)/xn>1-1/n(n=1,2,...),证明级数∑xn发散
- All tutor information on one page
- 【批处理DOS-CMD命令-汇总和小结】-将文件夹映射成虚拟磁盘——subst
- MySQL environment variable configuration tutorial
- 【每日一练】产品卡片动画效果的实现
- Etcd教程 — 第五章 Etcd之etcdctl的使用
- Ready to migrate to the cloud? Please accept this list of migration steps
猜你喜欢

win10-如何管理开机启动项?

SPARQL basic introductory exercise

无论LCD和OLED显示技术有多好,都无法替代这个古老的显示数码管
![[12. maximum continuous non repeating subsequence]](/img/eb/230cd6062e28374c86863f2122e43b.png)
[12. maximum continuous non repeating subsequence]

L'introduction en bourse de Wild Wind Pharmaceutical a pris fin: Yu pinzeng, qui avait l'intention de lever 540 millions de RMB, a effectué un investissement P2P.
![[c++ primer notes] Chapter 4 expression](/img/cb/d543dd1f461653e9adf399b42d1d26.png)
[c++ primer notes] Chapter 4 expression

Ue5 magic power - POI solution

认识O(NlogN)的排序

JS output all prime numbers between 1-100 and calculate the total number

JS to print prime numbers between 1-100 and calculate the total number of optimized versions
随机推荐
js用switch输出成绩是否合格
并发编程JUC的AQS底层源码
JS EventListener
100%弄明白5种IO模型
Implementation principle of similarity method in Oracle
大厂工作十年,年薪40万突然被裁员,公司想抛弃你,一分情面都不会留
Preliminary understanding of C #
游戏六边形地图的实现
c#的初步认识
(原创)自定义Drawable
Set the address book function to database maintenance, and add user name and password
[batch dos-cmd command - summary and summary] - environment variables, path variables, search file location related instructions - set, path, where, what if there are spaces in the path parameters of
(笔记)Anaconda-Navigator闪退解决方法
js成绩奖惩例题
分析日志.log
PayPal account has been massively frozen! How can cross-border sellers help themselves?
Reference | upgrade win11 mobile hotspot can not be opened or connected
Time function calculation efficiency of C
Coal crusher
[batch dos-cmd command - summary and summary] - parameters%0,%1,%2,%[0-9],%0-9 in the batch command and batch command parameter position switching command shift, operator% usage in the DOS command