Home > linux/unix, web server > Start Sun One Web Server 7 on boot (Solaris 9)

Start Sun One Web Server 7 on boot (Solaris 9)

June 10th, 2009

During the Sun One Web Server install, there is an option to have the web server start on system boot or reboot. In the case that you did not select this option, but would like the web server to start on boot, here’s how you do it.

  1. su -
  2. cd /etc/init.d
  3. create a file named SunWebServer7, and add the following:
    #!/sbin/sh

    #start SunOneWebServer 7 on system restart and boot

    case “$1″ in
    start)
    /var/opt/SUNWwbsvr7/https-SERVERNAME.com/bin/startserv
    ;;
    stop)
    /var/opt/SUNWwbsvr7/https-SERVERNAME.com/bin/stopserv
    ;;
    restart)
    /var/opt/SUNWwbsvr7/https-SERVERNAME.com/bin/restartserv
    ;;
    *)
    echo $”usage: $0 {start|stop|restart}”
    exit 1
    esac

  4. replace SERVERNAME with the name of your server
  5. make sure SunWebServer7 has the same ownership and permissions as the other files in the /etc/init.d directory
  6. create symbolic links to this script in the /etc/rc*.d/ directories. For example:

    ln -s /etc/init.d/SunWebServer7 /etc/rc0.d/K99SunWebServer

linux/unix, web server , ,

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.