Jump to content

Install Traccar

From Deffcon
Revision as of 17:06, 10 June 2025 by Rusyanto (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Installasi Versi Stable (Installer)

Link Download : https://www.traccar.org/download/


Installasi Menggunakan Source Code dari Github (Not Stable)

Install unzip utility and MySQL server

apt update && apt -y install unzip mysql-server

Set database password and create a new database

mysql -u root --execute="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; CREATE DATABASE traccar;"

Download the latest installer

wget https://www.traccar.org/download/traccar-linux-64-latest.zip

Unzip the file and run the installer

unzip traccar-linux-*.zip && ./traccar.run

Update the configuration file to use MySQL database

cat > /opt/traccar/conf/traccar.xml << EOF
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://localhost/traccar?zeroDateTimeBehavior=round&serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>root</entry>
    <entry key='database.password'>root</entry>

</properties>
EOF

Start Traccar service

service traccar start

External Link

https://www.traccar.org/install-digitalocean/