mac下supervisord的配置与web界面的管理

这里用的brew命令安装,检查系统是否有此命令

brew help

brew命令安装方法:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

命令安装链接:https://brew.sh/

安装supervisord

brew install supervisord
brew info supervisord //查看安装目录

我的目录在

/usr/local/etc/supervisord.ini  //配置文件
//编辑
sudo vim /usr/local/etc/supervisord.ini 
 
//片段
[unix_http_server]
file=/usr/local/var/run/supervisor.sock   ; the path to the socket file
chmod=0700                 ; socket file mode (default 0700)
;chown=nobody:nogroup       ; socket file uid:gid owner
;username=user              ; default is no username (open server)
;password=123               ; default is no password (open server)

[inet_http_server]         ; inet (TCP) server disabled by default
port=192.168.3.192:9001        ;浏览器方法地址和端口 ip_address:port specifier, *:port for all iface
username=user              ; default is no username (open server)
password=123               ; default is no password (open server)
 

启动与停止重新加载等命令:

 brew services start|restart|stop supervisor
 //或者
 1.supervisorctl -c /usr/local/etc/supervisord.ini  
 2.startstopstatusreload

监听端口是否打开

netstat -an | grep LISTEN

如果看到 9001端口则打开成功 浏览器输入 
http://192.168.3.192:9001/ 就可以进行web管理了