命令行啓動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值

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章