–update t_datanum set reg_dt = now() where reg_dt < now() – interval ‘1 hour’;
update
t_datanum
set
— reg_dt = (case when reg_dt < now() – interval ‘1 hour’ then date_trunc(‘hour’, now()) else reg_dt end),
reg_dt = (case when reg_dt < now() – interval ‘1 hour’ then now() else reg_dt end),
count = (case when reg_dt < now() – interval ‘1 hour’ then 0 else count + 1 end)
;

–update t_datanum set count = count + 1 where reg_dt >= now() – interval ‘1 hour’;
select * from t_datanum ;

yum install unzip

cd /usr/local/src/
curl “https://s3.amazonaws.com/aws-cli/awscli-bundle.zip” -o “awscli-bundle.zip”
unzip awscli-bundle.zip
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
/usr/local/bin/aws –version

/usr/local/bin/aws configure
/usr/local/bin/aws deploy register –instance-name centos7 –iam-user-arn arn:aws:iam::1234567890:user/deploy–tags Key=deploy,Value=true –region ap-northeast-1

mkdir -p /etc/codedeploy-agent/conf
vi /etc/codedeploy-agent/conf/codedeploy.onpremises.yml

/usr/local/bin/aws deploy install –override-config –config-file /etc/codedeploy-agent/conf/codedeploy.onpremises.yml –region ap-northeast-1

 

Only Ubuntu Server, Red Hat Enterprise Linux Server and Windows Server operating systems are supported.

 

centos7 もamazon linuxも