Saturday, March 29, 2014

Configuring lamp for auto start in RHEL

If you want to have your lamp process start up as a service when the EC2 instance boots up, you can create start up script in /etc/init.d/.. folder such as


  • $ cd /etc/init.d
  • $ vi lampprestart
  • add lines 
          *************
          #!/bin/bash
          # chkconfig: 2345 55 25
          /opt/lampp/lampp restartapache
          *************

  • save the file
  • $chmod +x lampprestart
  • $chkconfig --add lampprestart
  • $chkconfig --level 2345 lampprestart on
  • $service lampprestart on
  • confirm if it is running by $chkconfig --list |grep lampprestart

No comments:

Post a Comment