Ass*_*vie 20 server 10.04 init.d
安装了一个新的 Ubuntu 10.04 服务器并以 root 身份登录我使用 apt-get 安装了 haproxy。
我可以直接将 haproxy 作为守护进程运行,但是当我什么/etc/init.d/haproxy start
都不做时......甚至没有错误消息。
netstat -a
显示没有使用 http 端口,我正在尝试与 haproxy 保持平衡...
想法?
编辑
我注意到最后是这样apt-get install haproxy
说的:
update-rc.d:警告:/etc/init.d/haproxy 缺少 LSB 信息 update-rc.d:请参阅http://wiki.debian.org/LSBInitScripts
/etc/default/haproxy
说 ENABLED=1
调试输出 sh -xv /etc/init.d/haproxy start
#!/bin/sh
#
# chkconfig: - 85 15
# description: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited \
# for high availability environments.
# processname: haproxy
# config: /etc/haproxy.cfg
# pidfile: /var/run/haproxy.pid
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 0
fi
+ [ -f /etc/init.d/functions ]
+ [ -f /etc/rc.d/init.d/functions ]
+ exit 0
root@li267-63:~#
Run Code Online (Sandbox Code Playgroud)
Spa*_*apS 39
编辑/etc/default/haproxy
并确保它有一行写着ENABLED=1
。
默认值为 ENABLED=0。这样做是因为 haproxy 没有健全的默认配置,所以你需要先配置它,然后启用它。
归档时间: |
|
查看次数: |
44530 次 |
最近记录: |