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", ...
随机推荐
- Unity 游戏框架:命名的力量--变量
变量的命名入门 大家先来试着理解一下这段代码: var todoList = new TodoList(); todoList.Todos = new List<Todo>(); var ...
- Centos7 搭建 Flume 采集 Nginx 日志
版本信息 CentOS: Linux localhost.localdomain 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x ...
- Building Applications with Force.com and VisualForce(Dev401)(七):Designing Applications for Multiple users:Managing your users' experience I
Dev 401-007 Designing Applications for Multiple users: Managing your users' experience part 1 Module ...
- 使用Keras进行深度学习:(二)CNN讲解及实践
欢迎大家关注我们的网站和系列教程:http://www.tensorflownews.com/,学习更多的机器学习.深度学习的知识! 现今最主流的处理图像数据的技术当属深度神经网络了,尤其是卷积神经网 ...
- Jmeter4.0之语言修改(二)
下载最新Jmeter后,解压后,点击jmeter.bat,启动后,界面显示的是英文,那如何切换到中文了,步骤是点击Options中的Choose Language,选择中文 但是关闭Jmeter再次启 ...
- 如何搭建本地web服务
IIS服务是windows自带的web服务,我们可以用来搭建本地网站,供局域网内的用户之前访问,比如办公室的同事之间,一个教室里的同学们. 先说明这是Windows10 x64位 家庭普通版的系统. ...
- WeChat-SmallProgram:自定义select下拉选项框组件
1):创建组件所需的文件 2):自定义组件 CSS 及 JS 组件的wxml: <view class='com-selectBox'> <view class='com-sCont ...
- 分布式爬虫scrapy-redis
第一步 下载scrapy模块: pip install scrapy-redis 第二步 创建项目 在终端/cmd进入创建项目的目录: cd 路径: scrapy startproject douba ...
- Jenkins集成时报错 hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx:32034
Started by user test Running as SYSTEM Building remotely on home_windows (mbhCloud_UI_Test) in works ...
- 1005 Spell It Right (20 分)
Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output e ...