Это старая версия документа!
Traccar
Install
- Элемент ненумерованного списка
- Download and extract the installer package
- Execute traccar.run file
sudo ./traccar.run
- Start systemd service
sudo systemctl start traccar
Uninstall
- Stop systemd service
- sudo systemctl stop traccar
- Remove systemd service
sudo systemctl disable traccar sudo rm /etc/systemd/system/traccar.service sudo systemctl daemon-reload
- Remove traccar directory
sudo rm -R /opt/traccar
Run as Non-Root User
Running services as root is not a good practice. In favour of Traccar being deployable as easy as possible, we made the compromise of not tieing Traccar to running as a specific user.
That being said, we highly recommend you do not run Traccar as root user.
You can achive this by adding a systemd Drop-In to the traccar.service. For that, follow these steps:
mkdir /etc/systemd/system/traccar.service.d/ touch /etc/systemd/system/traccar.service.d/run-as-user.conf
The content of the file should set the user for traccar to the one you want to run it as. Keep in mind, that the Traccar directory has, of course, to be readable and writable by that user.
[Service] User=traccar Group=traccar
Upgrading Traccar
If you are running Traccar version 4.0 or later, you can upgrade directly to the latest release. If you are on an earlier version, please review the notes at the bottom of this page first.
Upgrade steps:
- Back up the database.
- Back up the traccar.xml configuration file (if you have modified it).
- Back up the media folder (if it exists).
- Uninstall the previous version of Traccar.
- Install the new version of Traccar.
- Restore the media folder (if applicable).
- Restore the traccar.xml configuration file (if applicable).
- Start the Traccar service.