Skip to content

Linux manual installation steps

Renato Del Gaudio edited this page Jun 15, 2015 · 5 revisions

This page describe a possible way to install manually IpUpdater as a cronjob on Linux so that it is executed on regular basis.

At this time, a proper installer is not available yet and hence the IpUpdater must be download and configured following manual steps.

Procedure overview

The installation will consist of

  • Create a installation directory
  • Download the latest package for Linux/Mac platform
  • Unzip it
  • Configure aws.properties file
  • Make run.sh executable
  • Add run.sh to crontab

Create installation directory

The following commands refers to the release (release 2.1.0). It is suggested to double check to make sure to download always the latest release from https://github.com/renatodelgaudio/renatodelgaudio.github.io/tree/master/IpUpdaterReleases

The following commands are executed as root but this is not a requirement.

Create a directory (e.g. /opt/awsupdate), download and unzip the linux package

sudo su
mkdir /opt/awsupdate
wget https://github.com/renatodelgaudio/renatodelgaudio.github.io/blob/master/IpUpdaterReleases/2.1.0/IpUpdater-2.1.0-linux-mac-package.tar.gz?raw=true
tar xvfz IpUpdater-2.1.0-linux-mac-package.tar.gz\?raw\=true

Configure aws.properties

vi aws.properties
#Insert your AWS Credentials from http://aws.amazon.com/security-credentials
secretKey=
accessKey=

# This is the AWS zoneId containing the record that should be updated
#Insert the zone id from https://console.aws.amazon.com/route53/home?region=us-east-1#hosted-zones
zone.id=

# This is the AWS record name (Type A) within the given zoneId that should be updated
# If the record name won't be found in AWS it will be created otherwise it will be updated
# e.g.  if record.name=www.example.com  a related AWS record (type A) will be created or updated with the    public IP
record.name=

# This is the Time To Live (TTL) expressed in seconds as defined in AWS
record.ttl=86400

#Email notification are sent only if enable=true
mailsender.enable=true
mailsender.host=
mailsender.protocol=smtp
mailsender.port=
mailsender.username=
mailsender.password=
mailsender.from=
#Comma separated e-mails. The following people will receive notifications that most matters (e.g. IP change, Errors)
mailsender.to=email1@example.com,admin2@example.com

# Advanced email configuration settings.
#Comma separated emails. The following people will receive notifications on what matters as well as DEBUG info 
mailsender.debug.to=admin3@example.com
# All properties with the prefix mail will be set AS IS to the underlying javax.mail.Session

mail.smtps.auth=true
mail.smtp.starttls.enable=true

Make run.sh executable

chmod +x run.sh

Add run.sh in crontab Edit your crontab to add a job similar to the following

crontab -e
20 0 * * * /opt/awsupdate/run.sh >/dev/null 2>&1

After you save and exit you should find it listing all the cronjob with the following command

crontab -l
20 0 * * * /opt/awsupdate/run.sh >/dev/null 2>&1

##Log File Everytime the IpUpdater runs, it writes to the log file awsupdater.log located in the main installation directory

e.g. /opt/awsupdate/awsupdater.log

An example of the log file is shown below

root@bastian:/opt/awsupdate# tail -f awsupdater.log 
31.01.2015 00:20:03 INFO  com.renatodelgaudio.awsupdate.RouteMain - Running  com.renatodelgaudio.awsupdate.SimpleUpdater ....
31.01.2015 00:20:05 INFO  com.renatodelgaudio.awsupdate.IcanHazip - Public IP: XXX.XXX.XXX.XXX
31.01.2015 00:20:06 INFO  com.renatodelgaudio.awsupdate.SimpleUpdater - AWS DNS (xxx) is already configured with  the public IP XXX.XXX.XXX.XXX No actions were performed at this time
31.01.2015 00:20:06 INFO  com.renatodelgaudio.awsupdate.RouteMain - c com.renatodelgaudio.awsupdate.SimpleUpdater completed in 0 sec.