0 votes
1 view
in AWS by (12.8k points)

How do I set the httpd and mysqld services to start automatically upon booting an amazon-ec2 instance?

Currently I have to start them manually by connecting to the instance via ssh and running sudo service httpd start and sudo service mysqld start.

1 Answer

0 votes
by (18.6k points)

Use the following commands on your Amazon Linux instance:

sudo chkconfig mysqld on

sudo chkconfig httpd on

Note: you can add user data in your instance to run these commands at the launch of your instance.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !