platforms / linux / installation / systemd-linux / line-by-line-explanation

Linux Installation Script Explained

On the Linux installation page we shared a script that installs the Timber agent on your server. Below is a line-by-line explanation of that script:

  1. Download the latest version of the Timber Agent into /opt: curl -o /opt/timber-agent.tar.gz We're using 0.6.x as the version number to get the latest patch release in the 0.6 line. You can read more about these special download URLs on the agent versioning page.
  2. Inside the /opt directory, unarchive the release: cd /opt; tar -xzf timber-agent.tar.gz && rm timber-agent.tar.gz.
  3. Copy the example configuration to /etc/timber.toml: /opt/timber-agent/support/config/timber.basic.toml /etc/timber.toml
  4. Edit /etc/timber.toml to meet your needs. You will need to follow the configuration file syntax. This is where you specify which log files the agent will tail and which Timber applications they will be routed to.
  5. Copy the default log rotation configuration to /etc/logrotate.d/timber-agent: cp /opt/timber-agent/support/scripts/logrotate.d/timber-agent-systemd /etc/logrotate.d/timber-agent. This file will keep the agent's own log file at a small size.
  6. Copy the startup script for Timber to /etc/systemd/system/timber-agent.service: cp /opt/timber-agent/support/scripts/startup/systemd/timber-agent.service /etc/systemd/system/.
  7. Reload the systemd unit file cache: systemctl daemon-reload
  8. Enable the timber-agent unit at startup: systemctl enable timber-agent. Now, if your machine reboots, the agent will automatically be started as soon as the network and filesystem become available.
  9. Start the agent immediately: systemctl start timber-agent. If you don't run this, the agent won't be started until you reboot.

Chat with us, just click the talk button in the bottom right of this page.

Chat with us
Sign Up

Log better and solve problems faster, today. Install in under a minute.

Sign Up