redis的安装(ubuntu版本)
1.使用apt-get命令进行安装
安装gcc依赖
root@yatces-virtual-machine:~# apt-get update root@yatces-virtual-machine:~# apt-get install gcc
安装redis-server
root@yatces-virtual-machine:~# apt-get install redis-server
安装位置
root@yatces-virtual-machine:/etc# whereis redis
redis: /etc/redis
root@yatces-virtual-machine:/etc/redis# ll
total
drwxr-xr-x root root 8月 : ./
drwxr-xr-x root root 8月 : ../
-rw-r----- redis redis 12月 redis.conf
drwxr-xr-x root root 8月 : redis-server.post-down.d/
drwxr-xr-x root root 8月 : redis-server.post-up.d/
drwxr-xr-x root root 8月 : redis-server.pre-down.d/
drwxr-xr-x root root 8月 : redis-server.pre-up.d/
启动 redis
root@yatces-virtual-machine:~# redis-server #如果修改为后台进程启动方式:修改redis.conf 文件中的 daemonize no 为 yes
客户端连接
root@yatces-virtual-machine:~# redis-cli
127.0.0.1:> set k1 helloworld
OK
127.0.0.1:> get k1
"helloworld"
卸载
使用命令:dpkg --list查看使用apt-get安装的软件
使用apt-get --purge remove 包名 移除软件
安装redis-server会安装两个包:redis-server 和 redis-tools,直接使用以上方式移除即可。
2.编译安装
在以下网址查找需要安装的版本地址
http://download.redis.io/releases/
下载并解压redis
root@yatces-virtual-machine:/usr/local/soft# wget http://download.redis.io/releases/redis-3.2.6.tar.gz
root@yatces-virtual-machine:/usr/local/soft# tar -zxvf redis-3.2.6.tar.gz
进入redis目录编译、安装
root@yatces-virtual-machine:/usr/local/soft/redis-3.2.# make&& make install
安装完后,在/usr/local/bin目录中会生成一个redis-server启动命令
将 redis.conf 复制到 /etc/redis/ 目录下,顺便将redis.conf几个配置修改(便于远程客户端连接)
bind 127.0.0.1 ==》 bind 0.0.0.0
protected-mode no
daemonize yes
启动redis
root@yatces-virtual-machine:/usr/local/soft/redis-3.2.# /usr/local/bin/redis-server /etc/redis/redis.conf
客户端连接redis
root@yatces-virtual-machine:/usr/local/soft/redis-3.2.# /usr/local/bin/redis-cli
停止redis服务,在客户端使用 shutdown 命令,退出客户端使用 exit 命令
127.0.0.1:> shutdown
not connected> exit
卸载redis
只需把/usr/local/bin/目录下的redis删除即可
redis的安装(ubuntu版本)的更多相关文章
- 安装Ubuntu版本linux过程中没有提示设置root用户密码问题的解决办法
原来ubunto不提倡设置root用户,系统安装成功后,root密码是随机的,那么在这种情况下如何得到root权限呐,具体方法如下: 终端中输入:sudo passwd root 此时重新设置原登录用 ...
- Redis、Redis+sentinel安装(Ubuntu 14.04下Redis安装及简单测试)
Ubuntu下Redis安装两种安装方式: 1.apt-get方式 步骤: 以root权限登录,切换到/usr目录下. 接下来输入命令,apt-get install redis-server,如图: ...
- ubuntu 下redis的安装简介
Linux公社:https://www.linuxidc.com/topicnews.aspx?page=2&tid=2 简单介绍下ubuntu下redis的安装方式: 第一种: 1:进入re ...
- lnmp一键安装包,安装多版本php,并开启redis与swoole
安装多版本的php sudo ./install.sh mphp Install ZendGuardLoader for PHP 7.1... unavailable now. Write ZendG ...
- Python 基础之在ubuntu系统下安装双版本python
前言:随着python升级更新,新版本较于老版本功能点也有不同地方,作为一个初学者应该了解旧版本的规则,也要继续学习新版本的知识.为了能更好去学习python,我在ubuntu安装python2和py ...
- 总结一下安装linux系统经验-版本选择-安装ubuntu
linux版本选择: 初次接触,建议选 Ubuntu 或者 Fedora,这两个发行版都很容易上手,而且两者都有很强大的中文社区,遇到问题比较容易解决,而且都有国内的源,安装或者更新软件时体验相对会好 ...
- Vmware虚拟机安装Ubuntu 16.04 LTS(长期支持)版本+VMware tools安装
今天用VMware虚拟机安装了Ubuntu 16.04,过程用点繁琐,顺便又安装了VMware tools,这样就可以全屏显示Ubuntu系统了,下面是具体的安装过程! 第一步:准备工作 1.下载Ub ...
- Ubuntu 16.04系统下安装RapidSVN版本控制器及配置diff,editor,merge和exploer工具
在Window下我们使用TortoiseSVN(小乌龟),可以很方便地进行查看.比较.更新.提交.回滚等SVN版本控制操作. 在Linux下我们可以使用RapidSVN.RapidSVN是一款轻量级的 ...
- Ubuntu 16安装GPU版本tensorflow
pre { direction: ltr; color: rgb(0, 0, 0) } pre.western { font-family: "Liberation Mono", ...
随机推荐
- 【C++】Strassen算法代码
本文仅代码,无理论解释 实话实说,我觉得这个算法在C系列的语言下,简直垃圾到爆炸--毕竟是一群完全不懂程序数学家对着纸弄出来的,看起来好像非常的有用,实际上耗时是非常爆炸的. 但是<算法导论&g ...
- [离散化+树状数组]CodeForces - 652D Nested Segments
Nested Segments time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...
- Manjaro更新后 搜狗拼音输入法突然无法正常使用
之前Manjaro已经用了很久了,很多该配置的都已经配置好了,但是搜狗拼音在系统更新后突然无法使用 1检查 如下依赖 2.检查配置文件 3.发现一切配置没问题,此时输入 sogou-qimpanel ...
- [RH134] 10-NFS和Samba客户端
NFS和samba服务器的配置,请参考: 这里,我们只讨论客户端的使用 1.NFS客户端的使用 nfs实现的是类Unix系统之间的远程共享目录. 假设我们已经有一个提供nfs服务的服务器,IP为192 ...
- 模块 shutil_zipfile_tarfile压缩解压
shutil_zipfile_tarfile压缩解压 shutil 模块 高级的 文件.文件夹.压缩包 处理模块 shutil.copyfileobj(fsrc, fdst[, length]) #将 ...
- MyBatis 教程 ——检视阅读
MyBatis 教程 --检视阅读 准备 官网文档-中文 教程地址yiibai,质量很差 教程地址w3cschool,纯理论,还不如直接看官网文档 教程地址Mybatis框架入门教程,Oracle M ...
- 苦涩的技术我该怎么学?Akka 实战
上次我们在“懵 B”的状态下,聊了聊 Actor 模型的理论知识.稍微再补充两句,如上图所示在 Actor 模型系统中,主要有互不依赖的 Actor 组成(图中圆圈),Actor 之间的通信是通过消息 ...
- Base64编码与解码原理
Base64编码是使用64个可打印ASCII字符(A-Z.a-z.0-9.+./)将任意字节序列数据编码成ASCII字符串,另有“=”符号用作后缀用途. base64索引表 base64编码与解码的基 ...
- 1040 Longest Symmetric String (25分)(dp)
Given a string, you are supposed to output the length of the longest symmetric sub-string. For examp ...
- 1039 Course List for Student (25分)
Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists o ...