安装NSQ

安装文档
https://nsq.io/deployment/installing.html
打开连接后,根据系统找到对应的二进制包
一般都是linux则下载
https://s3.amazonaws.com/bitly-downloads/nsq/nsq-1.1.0.linux-amd64.go1.10.3.tar.gz
启动模块
通过supervisord启动守护进程
三个配置文件
nsq.ini
$ cat /data/etc/supervisord/nsq.ini

[group:nsq]
programs=nsqadmin,nsqd,nsqlookupd

nsqd.ini
[program:nsqd]
command=/data/app/nsq-1.1.0.linux-amd64.go1.10.3/bin/nsqd --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:4160 --msg-timeout="15m0s" --mem-queue-size=0 --max-msg-size=10240000 --sync-timeout=1s --max-body-size=10240000 --data-path=/data/app/nsq-1.1.0.linux-amd64.go1.10.3/data --http-address="0.0.0.0:4151" --tcp-address="0.0.0.0:4150" --https-address="0.0.0.0:4152"
process_name=%(program_name)s
numprocs=1
directory=/data/app/nsq-1.1.0.linux-amd64.go1.10.3/bin
user=root
stdout_logfile=/data/log/nsq/nsqd.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=5
redirect_stderr=true
autostart=true
autorestart=true

nsqadmin.ini
[program:nsqadmin]
command=/data/app/nsq-1.1.0.linux-amd64.go1.10.3/bin/nsqadmin --lookupd-http-address=127.0.0.1:4161
process_name=%(program_name)s
numprocs=1
directory=/data/app/nsq-1.1.0.linux-amd64.go1.10.3/bin
user=root
stdout_logfile=/data/log/nsq/nsqadmin.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=5
redirect_stderr=true
autostart=true
autorestart=true

nsqlookupd.ini
[program:nsqlookupd]
command=/data/app/nsq-1.1.0.linux-amd64.go1.10.3/bin/nsqlookupd --http-address="0.0.0.0:4161" --tcp-address="0.0.0.0:4160"
process_name=%(program_name)s
numprocs=1
directory=/data/app/nsq-1.1.0.linux-amd64.go1.10.3/bin
user=root
stdout_logfile=/data/log/nsq/nsqlookupd.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=5
redirect_stderr=true
autostart=true
autorestart=true

启动模式

转载于:https://www.cnblogs.com/baolong/p/11368912.html

你可能感兴趣的:(安装NSQ)