openresty在mac osx中的使用

2016-04-14 19:49:40
原創 2194
通過`brew install homebrew/nginx/openresty`安裝openresty後按照指令`ln -sfv /usr/local/opt/openresty/*.plist ~/Library/LaunchAgents`copy 自動啟動 然後使用`launchctl load ~/Library/LaunchAgents/homebrew.mxcl.openresty.plist` 加入到啟動列錶中,但是這併沒有啟動。那麽如何啟動呢,又如何重載 停止呢?我們來看bin目録的兩箇命令```resty 和 openresty``````-> % sudo openresty -hnginx version: openresty/ nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]Options: -?,-h : this help -v : show version and exit -V : show version and configure options then exit -t : test configuration and exit -T : test configuration, dump it and exit -q : suppress non-error messages during configuration testing -s signal : send signal to a master process: stop, quit, reopen, reload -p prefix : set prefix path (default: /usr/local/Cellar/openresty/ -c filename : set configuration file (default: /usr/local/etc/openresty/nginx.conf) -g directives : set global directives out of configuration file``````-> % sudo resty -hPassword:resty [options] [lua-file [args]]Options: -c num Set maximal connection count (default: 64). -e prog Run the inlined Lua code in "prog". --help Print this help. --http-include path Include the specified file in the nginx http configuration block (multiple instances are supported). -I dir Add dir to the search paths for Lua libraries. --main-include path Include the specified file in the nginx main configuration block (multiple instances are supported). --nginx Specify the nginx path (this option might be removed in the future). -V Print version numbers and nginx configurations. --valgrind Use valgrind to run nginx --valgrind-opts Pass extra options to valgrindFor bug reporting instructions, please see:```很顯然```sudo openresty #啟動openrestysudo openresty -s stop #停止openrestysudo openresty -s reload #重載sudo openresty -s quit #退齣sudo openresty -t #測試配置文件sudo openresty -T#測試配置文件併打印齣來```常用功能就如此瞭,至於lua 讓我們再説吧,畢竟我用來做web服務器
拾 加 拾 =