I've set up apache, mysql and php on my AWS EC2 instance, but how could it be done that these services are starting when the EC2 is starting? I've found the chkconfig -a mysql
command but this just gives an error like option -a not found
.
Asked
Active
Viewed 2,618 times
-4

Khaled
- 36,533
- 8
- 72
- 99

John Brunner
- 145
- 2
- 7
-
What is your distro? – Khaled Jun 09 '12 at 12:47
-
@Khaled Amazon Linux AMI 2012.03 – John Brunner Jun 09 '12 at 13:07
1 Answers
8
I read the chkconfig man page for you and it says
chkconfig [--level <levels>] [--type <type>]<name> <on|off|reset|resetpriorities>
So
chkconfig --level 3 mysqld on
would start the mysql daemon at runlevel 3. Similarly
chkconfig --level 3 httpd on
would start Apache in runlevel 3.

user9517
- 115,471
- 20
- 215
- 297