apache 자동으로 시작시키는 방법

Category:
Author: zemna
Date: April 17, 2021
Share this:

RedHat/chkconfig-compliant start script:

#!/bin/sh

httpd This shell script takes care of starting and stopping

httpd.

chkconfig: 2345 65 35

description: httpd provides support for updating dynamic DNS services.

PATH=/usr/sbin:/root/bin:${PATH}
export PATH

HTTPD='/usr/local/apache2/bin/httpd'

case "$1" in
start)
echo -n "Starting httpd: "
$HTTPD -k $1
echo
;;
stop)
echo -n "Shutting down httpd: "
$HTTPD -k $1
echo
;;
restart)
echo -n "Restarting httpd: "
$HTTPD -k $1
echo
;;
*)
echo "Usage: httpd {start|stop|restart|status}"
exit 1
esac

exit 0

Save this file as "apache"

cp apache /etc/rc.d/init.d/

Add to chkconfig:

/sbin/chkconfig --add apache

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *

Let's connect and create
something awesome together!
2023 - Copyright, All Rights Reserved, Made by ZEMNA.NET with ❤️
crossmenu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram