I am following this Amazon AWS guide to install SSL certificates. I am running Apache on AWS EC2 using the Amazon Linux AMI 2018.03. The first step in the guide is to run:
sudo systemctl is-enabled httpd
I get "bash: systemctl: command not found". I suspect maybe I am running Amazon Linux, not Amazon Linux 2.
The systemctl command manages both system and service configurations, enabling administrators to manage the OS and control the status of services. Further, systemctl is useful for troubleshooting and basic performance tuning.
Amazon Linux 2 is available as virtual machine images for on-premises development and testing. Amazon Linux 2 provides the systemd service and systems manager as opposed to System V init system in Amazon Linux AMI. Amazon Linux 2 comes with an updated Linux kernel, C library, compiler, and tools.
cat /etc/os-release
if it is version 1 (amazon linux), you just need to switch to any other linux distribution that supports systemd
. You can't yum install systemd
like a package
sudo service nginx status
just use the service command
In earlier versions of RHEL use the service
command as explained in the documentation here.
# service service_name start
Therefore, in your case:
# service iptables start
You can replace start
with restart
, stop
, status
.
List all services with:
# service --status-all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With