Mac VMWARE 安装redis

虚拟机安装CENTOS的步骤略过。

1.配置网络

# 关闭防火强
systemctl stop firewalld
# 安装 epel
yum install epel-release
# 安装常用工具
yum install wget net-tools telnet tree nmap sysstat lrzsz dos2unix bind-utils nc -y
# 修改网络配置文件
vi /etc/sysconfig/network-scripts/ifcfg-ens33

ifcfg-ens33配置文件内容如下

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=2d30e58d-0954-4959-b44f-04c0c0beac65
DEVICE=ens33
ONBOOT=yes# GATEWAY和IPADDR自己设置就可以,格式正常就行
GATEWAY=10.4.7.1
IPADDR=10.4.7.189
NETMASK=255.255.252.0
# DNS要设置的与网络中的DNS的一致
DNS1=10.2.3.20

查看DNS方式

2.安装GCC

sudo yum group install "Development Tools"

3.下载redis编译

mkdir -p /usr/redis
cd /usr/redis
wget http://download.redis.io/releases/redis-3.2.9.tar.gz
tar -vxzf redis-3.2.9.tar.gz
ln -s redis-3.2.9 redis
cd redis
# 直接make会报错误, zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录
# 加 MALLOC=libc 参数可以正常编译
make MALLOC=libc
# 将运行文件安装到 /usr/local/bin 下,可以在任意目录下执行redis命令
make install

安装好以后,可以测试启动redis服务

[root@localhost redis]# redis-server
33024:C 23 Sep 10:45:37.530 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
33024:M 23 Sep 10:45:37.531 * Increased maximum number of open files to 10032 (it was originally set to 1024)._.__.-``__ ''-.__.-``    `.  `_.  ''-._           Redis 3.2.9 (00000000/0) 64 bit.-`` .-```.  ```\/    _.,_ ''-._(    '      ,       .-`  | `,    )     Running in standalone mode|`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379|    `-._   `._    /     _.-'    |     PID: 33024`-._    `-._  `-./  _.-'    _.-'|`-._`-._    `-.__.-'    _.-'_.-'||    `-._`-._        _.-'_.-'    |           http://redis.io`-._    `-._`-.__.-'_.-'    _.-'|`-._`-._    `-.__.-'    _.-'_.-'||    `-._`-._        _.-'_.-'    |`-._    `-._`-.__.-'_.-'    _.-'`-._    `-.__.-'    _.-'`-._        _.-'`-.__.-'33024:M 23 Sep 10:45:37.531 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
33024:M 23 Sep 10:45:37.531 # Server started, Redis version 3.2.9
33024:M 23 Sep 10:45:37.531 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
33024:M 23 Sep 10:45:37.531 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
33024:M 23 Sep 10:45:37.531 * The server is now ready to accept connections on port 6379

可能出现的问题

cc: ../deps/hiredis/libhiredis.a: No such file or directory
cc: ../deps/lua/src/liblua.a: No such file or directory
cc: ../deps/geohash-int/geohash.o: No such file or directory
cc: ../deps/geohash-int/geohash_helper.o: No such file or directory
make[1]: *** [redis-server] Error 1
make[1]: Leaving directory `/usr/local/src/redis-3.2.9/src'
make: *** [all] Error 2

进入源码包目录下的deps目录中执行

make geohash-int hiredis jemalloc linenoise lua

然后再进行make编译就可以了

Mac VMWARE 安装redis相关推荐

  1. mac下安装redis

    mac下安装redis redis的介绍这里就不多说了下面就直奔主题. 一 redis安装 首先,redis的默认端口为6379 下载mac版redis安装包,下载地址https://redis.io ...

  2. mac下安装redis 和 redis可视化工具rdm并且连接redis

    mac下安装redis 和 redis可视化工具rdm并且连接redis mac电脑上最方便的就是直接使用brew install redis来安装redis,使用这个命令的前提是安装了homebre ...

  3. 在MAC下安装redis以及其PHP扩展

    为什么80%的码农都做不了架构师?>>>    Part1. 安装redis 命令不麻烦,在MacPorts的基础上进行安装.关于MacPorts的相关内容,请参阅我的blog:MA ...

  4. MAC下安装REDIS和REDIS可视化工具RDM并连接REDIS

    实验环境:一台mac V:10.13.6 一.安装redis brew install redis 二.安装RDM 直接下载安装rdm dmg文件 链接: https://pan.baidu.com/ ...

  5. 2018 mac下安装redis 和 redis可视化工具rdm并且连接redis

    mac电脑上最方便的就是直接使用brew install redis来安装redis,使用这个命令的前提是安装了homebrew,如果没有的话可以执行这条命令 /usr/bin/ruby -e &qu ...

  6. Mac下载安装Redis以及配置

    Mac安装Redis 使用Homebrew安装Redis 1.安装HomeBrew之前,需要你安装Node.js和npm.这里去Node.js官网下载16.20.0版本的或者之前的也可以,但是18和以 ...

  7. Mac OS安装Redis

    文章目录 一.Homebrew安装 二.源码编译安装 一.Homebrew安装 1.首先确认安装了Homebrew,执行如下命令查找redis安装包: 如果不知道HomeBrew如何安装,查看此文章: ...

  8. MAC 下 安装redis 并配置 php redis 扩展

    下载 redis redis-3.1.2.tgz sudo tar -xzf redis-3.1.2.tgz cd redis-3.1.2 sudo phpize grep: /usr/include ...

  9. linux 关闭redis 命令_redis----------linux和mac如何安装redis和启动,关闭

    1.打开官网https://redis.io/download.官网有安装命令 2.以下是我的执行过程截图 执行完官网给的命令以后,再执行  make PREFIX=/usr/local/redis ...

  10. Mac 下安装Redis

    2019独角兽企业重金招聘Python工程师标准>>> 二.配置 1.到官网下载redis最新版本,http://redis.io/ 2.拷贝redis-3.0.3到/usr/loc ...

最新文章

  1. jQuery.extend与jQuery.fn.extend的区别
  2. Servlet的调试
  3. 高铁上的排泄物都哪里去了,真的是“一泻千里”吗?
  4. LeetCode——866.回文素数
  5. C#.NET DataGridView 让部分单元格变成只读的例子程序
  6. python :super 的作用
  7. Windows10 phpStudyV8.1的基本使用
  8. 极大似然估计(MLE)、最大后验估计(MAE)
  9. App Store、Steam、Google Play等出海应用、游戏如何收款到国内账户
  10. Kotlin入门(27)文件读写操作
  11. 使用SYUGI快速创建类似于Office XP/2003 界面风格的应用程序
  12. 车牌识别的matlab程序(程序_讲解_模板),车牌识别的matlab程序(程序-讲解-模板)资料...
  13. 第025篇:诚意回归CSDN博客之旅(内含SPM惊喜消息)
  14. 基于大数据的资金流量分析:思路与应用前景设想
  15. 区块链与商业银行中的区块链运用
  16. matlab出现错误使用 / 矩阵维度必须一致
  17. 电脑上怎么绘制流程图?三分钟快速绘制流程图的秘诀
  18. zemax设置 像方远心_像方远心光学系统具有以下特征
  19. JS之删除数组中的元素
  20. Ubuntu桌面快捷键切换窗口技巧

热门文章

  1. http 回应头的闷事
  2. Linux(CentOS)安装Node.JS和npm的两种方式(yum安装和源码安装)
  3. 新手填坑 java.lang.Integer cannot be cast to java.lang.String
  4. 蓝桥杯- 煤球数目-java
  5. 关于proc的介绍,比较详细
  6. The Unsolvable Problem
  7. 对shell的简单认识
  8. 两个rpm文件包存在互相依赖关系时,需要同时安装,解决办法如下
  9. html div重叠上方,html – 将父div上方的子div对齐到右边,不要重叠
  10. python做数据排序,python 实现对数据的排序和绘图