Support Questions
Find answers, ask questions, and share your expertise

Amazon AWS EC2 Ambari Install sudo chkconfig ntpd on error reading information on service ntpd: No such file or directory

New Contributor

Trying to set up a cluster in EC2 with Ambari - can not set up the base AMI with ntpd and iptables. Please help

[ec2-user@ip-172-31-25-111 ~]$ pwd
/home/ec2-user
[ec2-user@ip-172-31-25-111 ~]$ sudo chkconfig ntpd on
error reading information on service ntpd: No such file or directory
[ec2-user@ip-172-31-25-111 ~]$ sudo chkconfig iptables off
error reading information on service iptables: No such file or directory
[ec2-user@ip-172-31-25-111 ~]$ sudo /etc/init.d/iptables stop
sudo: /etc/init.d/iptables: command not found
5 REPLIES 5

@Amit Nandi

I am guessing its centos 7

Install the iptables-services package:

yum install iptables-services

systemctl start iptables

systemctl [stop|start|restart] iptables

Saving your firewall rules can be done as follows:

service iptables save

NTPD

yum -y install ntp

systemctl start ntpd

systemctl enable ntpd ntpq -p

@Amit Nandi ntpd , you have to install it link

Mentor

https://github.com/dbist/scripts/tree/master/administration

Use the OS specific directory

Tested on 6 and 7 in AWS and has both firewall and ntpd. Also consider using nscd package.

Expert Contributor

Please share OS details.

Mentor

@Amit Nandi

If you are using ubuntu the iptables command is not in /etc/init.d/ directory but in /sbin/iptables