本文共 1748 字,大约阅读时间需要 5 分钟。
yum install libstdc++-static -y ;yum install wget -y;wget https://github.com/joyieldInc/predixy/archive/1.0.5.tar.gz;cd /usr/local/src && tar -zxvf 1.0.5.tar.gz ;make -j4; 若提示 -bash: make: command not found,则先执行以下命令:yum -y install gcc automake autoconf libtool make# 安装g++:yum install gcc gcc-c++
cd src && cp predixy /usr/local/bin/;cp /usr/local/src/predixy-1.0.5/conf/* /usr/local/bin ;ClusterServerPool { # 连接集群中redis的密码 Password 123456789 MasterReadPriority 60 StaticSlaveReadPriority 50 DynamicSlaveReadPriority 50 RefreshInterval 1 ServerTimeout 1 ServerFailureLimit 10 ServerRetryTimeout 1 KeepAlive 120 Servers { + 127.0.0.1:7001 + 127.0.0.1:7002 + 127.0.0.1:7003 + 127.0.0.1:7004 + 127.0.0.1:7005 + 127.0.0.1:7006 }} ################################### SERVERS ####################################Include cluster.conf# Include sentinel.conf# Include try.conf
Authority { # 连接代理的密码 Auth "123456789" { Mode write }} 首先进入目录:cd /usr/local/bin
nohup predixy predixy.conf > /tmp/predixy.log 2>&1 &; 查看日志:tail -f /tmp/predixy.log 连接predixy 代理,操作redis数据:redis-cli -h 192.168.11.203 -p 7617 -a 123456789;
补充:创建脚本启动predixy
#!/bin/bashcd /usr/local/binnohup predixy predixy.conf > /tmp/predixy.log 2>&1 &echo "======== ok ========"
转载地址:http://qduh.baihongyu.com/