stop a service at startup linux amazon 2

C++
$ sudo systemctl enable mysqld
$ sudo systemctl enable httpd

Source

Also in C++: