Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Salt install haproxy

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

# package defined during initialization # # include:-pkg.pkg-init#HAPROXY installation # # # haproxy-install: file.managed:-name: / usr/local/src/haproxy-1.7.2.tar.gz-source: salt://haproxy/files/haproxy-1.7.2.tar.gz-user: root-group: root-mode: 755 cmd.run:-name: cd / usr/local/ Src/ & & tar zxf haproxy-1.7.2.tar.gz & & cd haproxy-1.7.2 & & make TARGET=linux26 PREFIX=/usr/local/haproxy & & make install PREFIX=/usr/local/haproxy-unless: test-d / usr/local/haproxy-require:-pkg: pkg-init-file: haproxy-installhaproxy-init: file.managed:-name: / etc/init.d/haproxy-source: salt://haproxy/ Files/haproxy.init-user: root-group: root-mode: 755-require:-cmd: haproxy-install cmd.run:-name: chkconfig-- add haproxy- unless: chkconfig-- list | grep haproxy- require:-file: / etc/init.d/haproxy net.ipv4.ip_nonlocal_bind: sysctl.present:-value: 1haproxy-config-dir: file.directory: -name: / etc/haproxy-user: root-group: root-mode: 755

# haproxy-outside.sls##include:-haproxy.installhaproxy-service: file.managed:-name: / etc/haproxy/haproxy.cfg-source: salt://cluster/files/haproxy-outside.cfg-user: root -group: root-mode: 644 cmd.run:-name: useradd-s / sbin/nologin haproxy-onlyif: id haproxy | echo $? Service.running:-name: haproxy- enable: True-reload: True-require:-cmd: haproxy-init-watch:-file: haproxy-service

# top.sls###base:'*':-init.env_initprod: 'web12.limingyu.com':-cluster.haproxy-outside' web13.limingyu.com':-cluster.haproxy-outside

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report