/etc/rc.d/init.d下的脚本,需要a+x权限 #!/bin/sh # # ident "@(#)mipagent 1.1 99/11/06 SMI" # # Copyright (c) 1999 by Sun Microsystems, Inc. # All rights reserved. # case "$1" in 'start') cd /www python index.py 80& ;; 'stop') pkill -x -u 0 -P 1 python index.py ;; *) echo "Usage: $0 { start | stop }" exit 1 ;; esac exit 0 然后在/etc/rc.d/rc3.d下建立连接即可