Site icon GetPageSpeed

Nginx Amplify Automatic Updates on CentOS/RHEL 7

Nginx Amplify

Nginx Amplify

It is recommended to continuously update Nginx Amplify agent. As we want to ease our lives, how can we setup automatic updates for the Amplify agent? I will share how I do it on my servers in this short note.

Yum-Cron

First, I have looked into leveraging yum-cron for the job. However, I do not want to risk updating everything just for Amplify agent. The yum-cron script, unfortunately, lacks any ways to specify the packages you want to be automatically updated.

So after giving it a thought, I came to an easy and simple solution of “why not” series.

Trivial solution

We can create a simple cron job to auto-update only Nginx Amplify.

Login as root user on your system and type:

crontab -e 

Now simply paste in the following line:

@daily /usr/bin/yum --assumeyes --quiet --errorlevel=0 update nginx-amplify-agent 2>&1

That’s it. Your Amplify agent has been set up to update automatically.
Some insight on the flags in use for the yum:

So now you have it. Nginx Amplify will automatically and silently update for you. Provided that you have set up your system properly, you will get an email alert, should any problem occur during automatic update.

Exit mobile version