下载安装
wget github.com/joyieldInc/predixy/archive/refs/tags/1.0.5.tar.gz
tar -zxvf 1.0.5.tar.gz
yum install libstdc++-static -y
cd predixy-1.0.5
make
mkdir -p /usr/local/predixy/bin
cp src/predixy /usr/local/predixy/bin/
cp -a conf/ /usr/local/predixy/
配置如下
cat conf/predixy.conf |grep -Ev "^#|^$"
Name PredixyExample
Bind 0.0.0.0:6379
WorkerThreads 4
ClientTimeout 300
Log /tmp/predixy.log
LogVerbSample 0
LogDebugSample 0
LogInfoSample 10000
LogNoticeSample 1
LogWarnSample 1
LogErrorSample 1
Include auth.conf
Include latency.conf
Include standalone.conf
cat
standalone.conf
...
StandaloneServerPool {
Databases 16
Hash crc16
RefreshMethod fixed
ServerTimeout 1
ServerFailureLimit 10
ServerRetryTimeout 1
KeepAlive 120
Group shard001 {
+ 127.0.0.1:6279
}
}
使用supervisor启动
yum install supervisor -y
[program:predixy]
directory = /usr/local/predixy ; 程序的启动目录
command = /usr/local/predixy/bin/predixy /usr/local/predixy/conf/predixy.conf ; 启动命令
numprocs=1
autostart = true ; 在 supervisord 启动的时候也自动启动
startsecs = 5 ; 启动 5 秒后没有异常退出,就当作已经正常启动了
autorestart = true ; 程序异常退出后自动重启
startretries = 1000 ; 启动失败自动重试次数,默认是 3
stopsignal=KILL
user = root ; 用哪个用户启动
redirect_stderr = true ; 把 stderr 重定向到 stdout,默认 false
stdout_logfile_maxbytes = 100MB ; stdout 日志文件大小,默认 50MB
stdout_logfile_backups = 20 ; stdout 日志文件备份数
stdout_logfile = /var/log/predixy.log
systemctl restart supervisord
阅读(1115) | 评论(0) | 转发(0) |