You have to maintain an active subscription in order to be able to use the repository!
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.
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.
We can create a simple cron job to auto-update only Nginx Amplify.
Login as root user on your system and type:
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:
--assumeyeswill accept updates for you. FYI: I know I can keep things short by using
-yinstead, but I always prefer a longer option so I can easily tell what each option does. Readability!
--quietwill suppress most of the standard output
--errorlevel=0will output critical errors. As per
yumdocumentation, this is recommended for cron use
2>&1will ensure that errors are sent to
stdout(cron will use that for emailing)
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.