gpt4 book ai didi

homebrew - 在 OSX 上 brew install varnish 之后,我在哪里可以找到配置文件来更改 DAEMON_OPTS

转载 作者:行者123 更新时间:2023-12-04 23:14:11 25 4
gpt4 key购买 nike

在 brew install varnish 之后,我想更改配置文件中的一些选项,例如 DAEMON_OPTS 不幸的是我找不到这个文件。
在linux中,它位于文件夹中:

  • Ubuntu:/etc/default/varnish
  • CentOS 6.x:/etc/sysconfig/varnish
  • CentOS 7.x:/etc/varnish/varnish.params

  • 我在哪里可以在 OSX 上找到它?

    最佳答案

    我不熟悉 Varnish 自己打包,但如果你运行:

    brew info varnish

    它会告诉您大量辅助信息,其中,它会告诉您如何手动启动它并显示配置文件位置:
    /usr/local/sbin/varnishd -n /usr/local/var/varnish -f /usr/local/etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000 -a 0.0.0.0:8080 -F

    因此,我假设您要查找的文件是:
    /usr/local/etc/varnish/default.vcl

    请注意 brew info varnish (如上所示)不需要您安装该软件包。

    如果确实安装了它,则可以使用以下命令查看属于该包的所有文件,从而找到配置文件:
    brew ls varnish

    请注意 brew info varnish并不总是告诉您所有文件,为了最大程度地确保获得与包关联的文件的完整列表,请使用 -verbose旗帜:
    brew ls varnish -verbose

    样本输出
    /usr/local/Cellar/varnish/5.2.1/.bottle/etc/varnish/default.vcl
    /usr/local/Cellar/varnish/5.2.1/.brew/varnish.rb
    /usr/local/Cellar/varnish/5.2.1/bin/varnishadm
    /usr/local/Cellar/varnish/5.2.1/bin/varnishhist
    /usr/local/Cellar/varnish/5.2.1/bin/varnishlog
    /usr/local/Cellar/varnish/5.2.1/bin/varnishncsa
    /usr/local/Cellar/varnish/5.2.1/bin/varnishstat
    /usr/local/Cellar/varnish/5.2.1/bin/varnishtest
    /usr/local/Cellar/varnish/5.2.1/bin/varnishtop
    /usr/local/Cellar/varnish/5.2.1/ChangeLog
    /usr/local/Cellar/varnish/5.2.1/homebrew.mxcl.varnish.plist
    /usr/local/Cellar/varnish/5.2.1/include/varnish/cache/cache.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/cache/cache_backend.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/cache/cache_director.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/cache/cache_filter.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/common/com_params.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/common/common.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/common/common_vsm.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/miniobj.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/acct_fields_bereq.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/acct_fields_req.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/backend_poll.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/ban_vars.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/bo_flags.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/boc_state.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/body_status.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/cli_cmds.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/debug_bits.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/feature_bits.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/h2_error.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/h2_frames.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/h2_settings.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/h2_stream.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/http_headers.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/http_response.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/locks.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/obj_attr.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/oc_exp_flags.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/oc_flags.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/params.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/req_body.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/req_flags.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/sess_attr.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/sess_close.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/steps.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/symbol_kind.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vcc_types.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vcl_returns.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vhd_fsm.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vhd_fsm_funcs.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vhd_return.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vhp_huffman.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vhp_static.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vrt_stv_var.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vsc_levels.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vsl_tags.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/vsl_tags_http.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/tbl/waiters.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vapi/vapi_options.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vapi/voptget.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vapi/vsc.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vapi/vsc_int.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vapi/vsl.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vapi/vsl_int.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vapi/vsm.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vas.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vav.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vbm.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vcl.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vcli.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vcs.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vdef.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vmod_abi.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vqueue.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vre.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vrnd.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vrt.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vrt_obj.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vsa.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vsb.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vsha256.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vtcp.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vtim.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vut.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/vut_options.h
    /usr/local/Cellar/varnish/5.2.1/include/varnish/waiter/waiter.h
    /usr/local/Cellar/varnish/5.2.1/INSTALL_RECEIPT.json
    /usr/local/Cellar/varnish/5.2.1/lib/libvarnishapi.1.dylib
    /usr/local/Cellar/varnish/5.2.1/lib/libvarnishapi.dylib
    /usr/local/Cellar/varnish/5.2.1/lib/pkgconfig/varnishapi.pc
    /usr/local/Cellar/varnish/5.2.1/lib/varnish/vmods/libvmod_blob.so
    /usr/local/Cellar/varnish/5.2.1/lib/varnish/vmods/libvmod_directors.so
    /usr/local/Cellar/varnish/5.2.1/lib/varnish/vmods/libvmod_purge.so
    /usr/local/Cellar/varnish/5.2.1/lib/varnish/vmods/libvmod_std.so
    /usr/local/Cellar/varnish/5.2.1/lib/varnish/vmods/libvmod_vtc.so
    /usr/local/Cellar/varnish/5.2.1/LICENSE
    /usr/local/Cellar/varnish/5.2.1/README.rst
    /usr/local/Cellar/varnish/5.2.1/sbin/varnishd
    /usr/local/Cellar/varnish/5.2.1/share/aclocal/varnish-legacy.m4
    /usr/local/Cellar/varnish/5.2.1/share/aclocal/varnish.m4
    /usr/local/Cellar/varnish/5.2.1/share/doc/varnish/builtin.vcl
    /usr/local/Cellar/varnish/5.2.1/share/doc/varnish/example.vcl
    /usr/local/Cellar/varnish/5.2.1/share/man/man1/varnishadm.1
    /usr/local/Cellar/varnish/5.2.1/share/man/man1/varnishd.1
    /usr/local/Cellar/varnish/5.2.1/share/man/man1/varnishhist.1
    /usr/local/Cellar/varnish/5.2.1/share/man/man1/varnishlog.1
    /usr/local/Cellar/varnish/5.2.1/share/man/man1/varnishncsa.1
    /usr/local/Cellar/varnish/5.2.1/share/man/man1/varnishstat.1
    /usr/local/Cellar/varnish/5.2.1/share/man/man1/varnishtest.1
    /usr/local/Cellar/varnish/5.2.1/share/man/man1/varnishtop.1
    /usr/local/Cellar/varnish/5.2.1/share/man/man3/vmod_blob.3
    /usr/local/Cellar/varnish/5.2.1/share/man/man3/vmod_directors.3
    /usr/local/Cellar/varnish/5.2.1/share/man/man3/vmod_purge.3
    /usr/local/Cellar/varnish/5.2.1/share/man/man3/vmod_std.3
    /usr/local/Cellar/varnish/5.2.1/share/man/man3/vmod_vtc.3
    /usr/local/Cellar/varnish/5.2.1/share/man/man7/varnish-cli.7
    /usr/local/Cellar/varnish/5.2.1/share/man/man7/varnish-counters.7
    /usr/local/Cellar/varnish/5.2.1/share/man/man7/vcl.7
    /usr/local/Cellar/varnish/5.2.1/share/man/man7/vsl-query.7
    /usr/local/Cellar/varnish/5.2.1/share/man/man7/vsl.7
    /usr/local/Cellar/varnish/5.2.1/share/man/man7/vtc.7
    /usr/local/Cellar/varnish/5.2.1/share/varnish/vcl/devicedetect.vcl
    /usr/local/Cellar/varnish/5.2.1/share/varnish/vmodtool.py
    /usr/local/Cellar/varnish/5.2.1/share/varnish/vsctool.py

    macOS 通过 launchd 启动守护进程和 launchctl它通常使用 plist文件来配置应该启动守护程序的选项,因此您实际上可能正在寻找这个文件来设置守护程序选项:
    /usr/local/Cellar/varnish/5.2.1/homebrew.mxcl.varnish.plist

    看起来像这样:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>homebrew.mxcl.varnish</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/local/opt/varnish/sbin/varnishd</string>
    <string>-n</string>
    <string>/usr/local/var/varnish</string>
    <string>-f</string>
    <string>/usr/local/etc/varnish/default.vcl</string>
    <string>-s</string>
    <string>malloc,1G</string>
    <string>-T</string>
    <string>127.0.0.1:2000</string>
    <string>-a</string>
    <string>0.0.0.0:8080</string>
    <string>-F</string>
    </array>
    <key>KeepAlive</key>
    <true/>
    <key>RunAtLoad</key>
    <true/>
    <key>WorkingDirectory</key>
    <string>/usr/local</string>
    <key>StandardErrorPath</key>
    <string>/usr/local/var/varnish/varnish.log</string>
    <key>StandardOutPath</key>
    <string>/usr/local/var/varnish/varnish.log</string>
    </dict>
    </plist>

    关于homebrew - 在 OSX 上 brew install varnish 之后,我在哪里可以找到配置文件来更改 DAEMON_OPTS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47354320/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com