32

I am fairly new to system administration and I am simply trying to make sure nginx runs at startup on my Amazon EC2 instance (running Amazon linux)

I have placed the script in /etc/init.d, but it seems that Amazon linux does not come with the update-rc.d command. So how do I ensure the script will run at startup?

Andrew Guenther
  • 447
  • 1
  • 4
  • 8

1 Answers1

43

The Amazon Linux (which is essentially CentOS, which is essentially Red Hat) equivalent of update-rc.d is chkconfig. http://www.cyberciti.biz/faq/rhel5-update-rcd-command/

chkconfig --add nginx
chkconfig nginx on
ceejayoz
  • 32,910
  • 7
  • 82
  • 106