Redis (Remote Dictionary Server), the remote dictionary service, is an open source log-type, Key-Value database written in ANSI C language, supporting the network, memory-based or persistent, and providing APIs in multiple languages. One of the most popular NoSql technologies at the moment. Basically, in project development, Redis is used for caching, middleware, timers and other functions. Today I share an article about the installation of Linux centos distribution
First go to the official website to download Redis ( portal ), download it to the Linux opt directory, and download it directly through the wget command
# 下载Redis V6.0.9
wget https://download.redis.io/releases/redis-6.0.9.tar.gz?_ga=2.245330565.1654305974.1603887728-936199213.1603887728
# 解压 Redis 压缩包
tar -zxvf redis-6.0.9.tar.gz
# 安装Redis的环境
yum install -y gcc-c++
# 编译
make
# 安装
make install
After the installation is complete, start Redis. Redis is not running in the background by default, so you need to modify the configuration
# 复制Redis的配置文件,Redis在启动时需要指定配置文件,可以通过复制的配置文件去启动,也可以不进行复制
copy /opt/redis-6.0.9/redis.conf /usr/local/bin/
# 修改为后台启动Redis,默认为no
daemonize yes
# 启动Redis服务,指定Redis配置文件启动
redis-server /usr/local/bin/redis.conf
# 测试连接,-h指定主机,本机可以不写 -p端口
redis-cli -h localhost -p 6379
Installation is that simple
Redis officially comes with a stress test tool redis-benchnark, which can be used to test the performance of our installed Redis. Its parameters are as shown in the figure below. Next, we will test the performance of the Redis installed by Hawo.
Test case: test 1000 concurrent Connections, 100,000 requests