使用/etc/init.d和/ sbin / service启动守护进程(例如tomcat)之间有什么区别?使用其中一个有好处吗?
运行CentOS 5.8版(最终版)
/ sbin / service只是在/etc/init.d中运行相应的脚本.运行/ sbin / service的优点是它首先设置了一个“干净”的环境.从服务手册页:
service runs a System V init script or upstart job in as predictable an environment as possible,removing most environment variables and with the current working directory set to /.