命令行启动varnish的方法

1、草稿

/usr/sbin/varnishd -a :80 -T 127.0.0.1:6082 -f /etc/varnish/default.vcl -P /var/run/varnish.pid -p thread_pool_min=50 -p thread_pool_max=1500 -s malloc,512m

-t 120 -p thread_pool_timeout=120 -u varnish -g varnish -S /etc/varnish/secret -s malloc,256M

2、现场环境合适的配置

/usr/sbin/varnishd -a :6081 -T 127.0.0.1:6082 -f /etc/varnish/default.vcl -P /var/run/varnish.pid -p thread_pool_min=50 -p thread_pool_max=3000 -s malloc,8G

参数

-f 指定 varnish 的配置文件位置
-s 指定 varnish 缓存存放的方式,常用的方式有:“-s file,<dir_or_file>,”。
-T address:port 设定 varnish 的 telnet 管理地址及其端口
-a address:port 表示 varnish 对 http 的监听地址及其端口
-b host[:port]:指定后端主机,如果没有给出端口号默认8080
-u user
-g group
-F 运行于前台
-t 缺省的TTL值

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值