CentOS是没有start-stop-daemon的,因为start-stop-daemon在debian的dpkg包里。要安装的话,需要自己折腾。
相关命令如下:
至此安装完成。可以看到:
---------------------start-stop-daemon script for Centos
wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
tar -xvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
cd apps
cd sys-utils/start-stop-daemon-IR1_9_18-2/
cat Makefile
---------------------------------------------
# comment this Two line for centos build.
#AXIS_USABLE_LIBS = GLIBC UCLIBC
#include $(AXIS_TOP_DIR)/tools/build/Rules.axis
PROG = start-stop-daemon
all: $(PROG)
install: all
$(INSTALL) -m 0755 -o root -g root $(PROG) $(prefix)/sbin
clean:
rm -f $(PROG)
-----------------------------------------------
-bash-3.2# make
cc start-stop-daemon.c -o start-stop-daemon
-bash-3.2# ls
a.out Makefile start-stop-daemon start-stop-daemon.c
* Copy the daemon to bin path:
cp start-stop-daemon /usr/bin/
* How to Use this script Please see.
http://svn.ez.no/svn/extensions/ezfind/ezp4/trunk/extension/ezfind/bin/scripts/gentoo/solr
tar -xvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
cd apps
cd sys-utils/start-stop-daemon-IR1_9_18-2/
cat Makefile
---------------------------------------------
# comment this Two line for centos build.
#AXIS_USABLE_LIBS = GLIBC UCLIBC
#include $(AXIS_TOP_DIR)/tools/build/Rules.axis
PROG = start-stop-daemon
all: $(PROG)
install: all
$(INSTALL) -m 0755 -o root -g root $(PROG) $(prefix)/sbin
clean:
rm -f $(PROG)
-----------------------------------------------
-bash-3.2# make
cc start-stop-daemon.c -o start-stop-daemon
-bash-3.2# ls
a.out Makefile start-stop-daemon start-stop-daemon.c
* Copy the daemon to bin path:
cp start-stop-daemon /usr/bin/
* How to Use this script Please see.
http://svn.ez.no/svn/extensions/ezfind/ezp4/trunk/extension/ezfind/bin/scripts/gentoo/solr
from http://shriikant.blogspot.com/2011/08/start-stop-daemon-script-for-centos-5.html
-------
好吧 执行手动编译一下 加上这个命令
ok 现在可以正常启动服务了
-------
CentOS下安装使用start-stop-daemon
在centos下下了个自启动的服务器脚本 执行的时候发现找不到start-stop-daemon
命令好吧 执行手动编译一下 加上这个命令
wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz tar -xzvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz 然后进入解压之后的路径 一直 cd 到start-stop-daemon.c在的目录 cc start-stop-daemon.c -o start-stop-daemon cp start-stop-daemon /usr/bin/start-stop-daemon |