linux中安装redis
来源:互联网 发布:淘宝女装从哪里进货好 编辑:程序博客网 时间:2024/06/06 01:22
在CentOS 7.0 x64 测试
文档:
http://redis.io/download
http://sharadchhetri.com/2015/07/05/install-redis-3-0-from-source-on-ubuntu-14-04-centos-7-rhel-7/
依赖gcc make wget
# yum install make gcc wget
下载解压编译安装
# wget http://download.redis.io/releases/redis-stable.tar.gz
# tar xvzf redis-stable.tar.gz
# cd redis-stable
# make
# make install
# cd utils
# ./install_server.sh
一路回车使用默认配置
[root@dev utils]# ./install_server.sh
Welcome to the redis service installer
This script will help you easily set up a running redis server
Please select the redis port for this instance: [6379]
Selecting default: 6379
Please select the redis config file name [/etc/redis/6379.conf]
Selected default - /etc/redis/6379.conf
Please select the redis log file name [/var/log/redis_6379.log]
Selected default - /var/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379]
Selected default - /var/lib/redis/6379
Please select the redis executable path [/usr/local/bin/redis-server]
Selected config:
Port : 6379
Config file : /etc/redis/6379.conf
Log file : /var/log/redis_6379.log
Data dir : /var/lib/redis/6379
Executable : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!
脚本会自动把redis-server安装为服务并开机启动
启动Redis数据库
## To check status of Redis Server
systemctl stop redis_6379
## To start Redis Server
systemctl start redis_6379
## To stop Redis Server
systemctl stop redis_6379
## To restart the Redis Server
systemctl restart redis_6379
登录进入Redis数据库
# redis-cli
127.0.0.1:6379>
127.0.0.1:6379> exit
判断6379是否在监听
# ss -tanp|grep 6379
LISTEN 0 128 *:6379 *:* users:(("redis-server",2435,5))
TIME-WAIT 0 0 127.0.0.1:46901 127.0.0.1:6379
LISTEN 0 128 :::6379 :::* users:(("redis-server",2435,4))
Redis通讯确认
[root@dev redis]# redis-cli ping
PONG
PONG就是通讯成功了
启动Redis
文档:
http://redis.io/download
http://sharadchhetri.com/2015/07/05/install-redis-3-0-from-source-on-ubuntu-14-04-centos-7-rhel-7/
依赖gcc make wget
# yum install make gcc wget
下载解压编译安装
# wget http://download.redis.io/releases/redis-stable.tar.gz
# tar xvzf redis-stable.tar.gz
# cd redis-stable
# make
# make install
# cd utils
# ./install_server.sh
一路回车使用默认配置
[root@dev utils]# ./install_server.sh
Welcome to the redis service installer
This script will help you easily set up a running redis server
Please select the redis port for this instance: [6379]
Selecting default: 6379
Please select the redis config file name [/etc/redis/6379.conf]
Selected default - /etc/redis/6379.conf
Please select the redis log file name [/var/log/redis_6379.log]
Selected default - /var/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379]
Selected default - /var/lib/redis/6379
Please select the redis executable path [/usr/local/bin/redis-server]
Selected config:
Port : 6379
Config file : /etc/redis/6379.conf
Log file : /var/log/redis_6379.log
Data dir : /var/lib/redis/6379
Executable : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!
脚本会自动把redis-server安装为服务并开机启动
启动Redis数据库
## To check status of Redis Server
systemctl stop redis_6379
## To start Redis Server
systemctl start redis_6379
## To stop Redis Server
systemctl stop redis_6379
## To restart the Redis Server
systemctl restart redis_6379
登录进入Redis数据库
# redis-cli
127.0.0.1:6379>
127.0.0.1:6379> exit
判断6379是否在监听
# ss -tanp|grep 6379
LISTEN 0 128 *:6379 *:* users:(("redis-server",2435,5))
TIME-WAIT 0 0 127.0.0.1:46901 127.0.0.1:6379
LISTEN 0 128 :::6379 :::* users:(("redis-server",2435,4))
Redis通讯确认
[root@dev redis]# redis-cli ping
PONG
PONG就是通讯成功了
启动Redis
0 0
- linux中安装redis
- Linux CentOS中Redis安装
- redis在Linux中安装
- Redis在Linux Ubuntu中安装
- redis在linux环境中安装
- Linux系统中redis安装配置详解
- 一,redis在linux中安装
- linux中php的redis扩展安装
- linux中redis服务的安装
- linux中为PHP安装redis扩展
- linux实战-redis(1) -- 在centos中安装redis
- linux详细redis安装和php中redis扩展
- [Redis] Linux系统安装Redis
- Redis--Linux下安装Redis
- Redis 简介、Linux 安装 Redis、Redis 使用
- linux平台Redis安装
- linux 4.5 安装Redis
- linux 安装redis数据库
- RxJava 合并组合两个(或多个)Observable数据源
- H.264句法和语法总结(一)句法元素的分层结构
- Andorid.mk 文件手动编译
- PHP相关系列 - 如何提高php代码的质量
- AccessibilityNodeInfo自动输入
- linux中安装redis
- 有的Module出现findLibrary returned null,有的不出现
- (12)Struts_通配符映射
- iOS - 修改IOS tabbar 背景图片以及分割线
- Vuejs——(6)Vuejs与form元素
- java源文件中的类至多有一个被public修饰(学习心得)
- jQuery中选择器使用简介
- Struts学习总结(九)---使用Struts2实现用户信息的CRUD操作(四:删除操作)
- java异常类