redis安装过程中遇到的问题
正常的
wget http://download.redis.io/releases/redis-3.0.7.tar.gz下载
解压缩
tar -zxvf redis-3.0.7.tar.gz
cd redis-3.0.7
这全很正常没有什么可以说的,主要是下面,进入到redis-3.0.7目录之后,要是执行
make
make install 会把redis默认安装到/usr/local/bin/redis下
但是我只是一个普通的redis用户,我不想给他sudo权限也不想用root去执行怎么办呢
方法是:
bash-4.1$ PREFIX=/opt/redis make
bash-4.1$ PREFIX=/opt/redis make install
cd src && make install
make[]: Entering directory `/opt/redis/redis-3.0./src' Hint: It's a good idea to run 'make test' ;) INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
make[]: Leaving directory `/opt/redis/redis-3.0./src'
bash-4.1$ pwd
/opt/redis/redis-3.0.
bash-4.1$ cd ..
bash-4.1$ ls -all
total
drwxr-xr-x redis redis May : .
drwxr-xr-x root root May : ..
drwxr-xr-x redis redis May : bin
drwxr-xr-x redis redis Jan : redis-3.0.
-rw-r--r-- redis redis May : redis-3.0..tar.gz
drwx------ redis redis May : .ssh
指定到你想要安装的目录下就可以了,大功告成
接下来设置主备和哨兵
Master(主)配置文件
vi /opt/redis//.conf port
daemonize yes
appendonly yes
save ""
slave-read-only yes
自己在redis目录下建立一个6000的文件夹
Salve(从)配置文件
vi /opt/redis//.conf port
daemonize yes
slaveof 10.171.132.17 ----主的地址和端口,一看就明白
appendonly yes
save ""
slave-read-only yes
配置sentinel 1
vi /opt/redis//sentinel-.conf port
daemonize yes
sentinel monitor mymaster 10.171.132.17 --主的地址
sentinel down-after-milliseconds mymaster
sentinel failover-timeout mymaster
sentinel config-epoch mymaster
sentinel leader-epoch mymaster
配置sentinel 2
vi /opt/redis//sentinel-.conf port
daemonize yes
sentinel monitor mymaster 10.171.132.17
sentinel down-after-milliseconds mymaster
sentinel failover-timeout mymaster
sentinel config-epoch mymaster
sentinel leader-epoch mymaster
然后再启动下:
./redis-server --include /opt/redis//.conf
./redis-server --include /opt/redis//.conf ./redis-sentinel /opt/redis//sentinel-.conf
./redis-sentinel /opt/redis//sentinel-.conf
这样子redis就安装配置好了~而且是用最普通的用户实现的,保证了系统权限的划分。
redis安装过程中遇到的问题的更多相关文章
- JAVA安装过程中出现的“javac不是内部或外部指令”的解决方法
近来重新安装了JAVA,安装过程中出现问题,网上找到解决办法,汇总发布. 解决流程: 1.确定自己的环境变量设置没问题,没有出现遗漏 : . 等情况 (具体环境变量设置百度) 2.环境变量设置后 ,d ...
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法
操作步骤: 1. 在 Microsoft Windows 2003 或 Windows XP 桌面上,依次单击"开始"."运行",然后在"打开&quo ...
- 用友ERP-U8最新破解(再次更新版本,附安装过程中的解决办法)
新版用友u8.70下载地址:http://ftp.shangyuchem.com/应用软件/用友ERP-U8管理软件(8.70版).rar 准备好安装环境,因为需要SQLSERVER和IIS支持,而个 ...
- cocoapods安装以及使用,安装过程中ruby版本过低
cocoapods安装以及使用,安装过程中ruby版本过低 字数473 阅读103 评论1 喜欢2 1.打开终端 2.移除现有 Ruby 默认源 $ gem sources --remove http ...
- iOS 学习笔记二【cocopods安装使用和安装过程中遇到的问题及解决办法】【20160725更新】
在osx 10.11之前cocopods问题不多,但是升级到11之后的版本,之前的cocopods大多用不了,需要重新安装,对于我这种使用测试版系统的技术狂来说,每次都需要重新安装很多东西, 当然,c ...
- rpm包安装过程中依赖问题“libc.so.6 is needed by XXX”解决方法
rpm包安装过程中依赖问题"libc.so.6 is needed by XXX"解决方法 折腾了几天,终于搞定了CentOS上的Canon LBP2900打印机驱动.中间遇到了一 ...
- Linux学习笔记(1)Linux虚拟机安装过程中的知识点及常用管理工具
1. VMware的相关知识 (1)建议的VMware的配置: CPU 主频1GHz以上 内存 1GB以上 硬盘 分区空闲空间8GB以上 (2)VMware创建快照 快照的作用是保存虚拟机的现有状态, ...
- mysql安装过程中出现错误ERROR 1820 (HY000): You must SET PASSWORD before executing this statement解决
mysql安装过程中出现错误ERROR 1820 (HY000): You must SET PASSWORD before executing this statement解决 最近新装好的my ...
- mysql-5.5.28源码安装过程中错误总结
介绍一下关于mysql-5.5.28源码安装过程中几大错误总结,希望此文章对各位同学有所帮助.系统centOS 6.3 mini (没有任何编译环境)预编译环境首先装了众所周知的 cmake(yum ...
随机推荐
- zepto源码研究 - zepto.js-3 (常用的工具)
pluck: /** * 根据是否存在此属性来获取当前集合,返回一组属性值 * @param property * @returns {*} */ pluck: function(property){ ...
- 【转】Debug和Release区别
VC下Debug和Release区别 最近写代码过程中,发现 Debug 下运行正常,Release 下就会出现问题,百思不得其解,而Release 下又无法进行调试,于是只能采用printf方式逐步 ...
- 正则-匹配获取url参数
1.根据指定参数名获取参数值 A页面向连接到B页面的url为: http://www.189dg.com/ajax/sms_query.ashx?action=smsdetail&sid=22 ...
- Js打开网页后居中显示
使用JavaScript定义打开网页后居中显示,并可为窗口设置大小,使用“window.open”方法打开新窗口:先来看完整的代码及调用方法: <html xmlns="http:// ...
- Python自动化运维之8、正则表达式re模块
re模块 正则表达式使用单个字符串来描述.匹配一系列符合某个句法规则的字符串,在文本处理方面功能非常强大,也经常用作爬虫,来爬取特定内容,Python本身不支持正则,但是通过导入re模块,Python ...
- OpenStack点滴03-Neutron
OpenStack Neutron是一个比较复杂的组件,如果说OpenStack安装部署过程哪一个组件最麻烦,那就肯定是网络组件Neutron了. 因为我对OpenStack网络这块也不是很熟,就把我 ...
- 文件磁盘读写类CArchive类
CArchive类的成员 数据成员 m_pDocument 指向被串行化的CDocument对象 构造函数 Carchive 创建一个Carhcive对象 Abort在不异常的情况下,关闭归档文件 C ...
- MMDrawerController 使用遇到的问题及定制
MMDrawerController 1,集成UIViewController * leftDrawer = [[UIViewController alloc] init]; UIViewContro ...
- zoj 3647 Gao the Grid
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4837 先求出从所有点随机找出三个点的组合数,然后去掉共线的,平行好去掉,斜线就 ...
- ChangeServiceConfig2 function
ChangeServiceConfig2 function Changes the optional configuration parameters of a service. Syntax C ...