Install Traccar: Difference between revisions
Created page with " sudo apt update sudo apt upgrade sudo apt install openjdk-11-jre wget unzip -y" |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
== 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 <nowiki>https://www.traccar.org/download/traccar-linux-64-latest.zip</nowiki> | |||
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 '<nowiki>http://java.sun.com/dtd/properties.dtd'</nowiki>> | |||
<properties> | |||
<nowiki> </nowiki> <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry> | |||
<nowiki> </nowiki> <entry key='database.url'>jdbc:mysql://localhost/traccar?zeroDateTimeBehavior=round<nowiki>&</nowiki>amp;serverTimezone=UTC<nowiki>&</nowiki>amp;allowPublicKeyRetrieval=true<nowiki>&</nowiki>amp;useSSL=false<nowiki>&</nowiki>amp;allowMultiQueries=true<nowiki>&</nowiki>amp;autoReconnect=true<nowiki>&</nowiki>amp;useUnicode=yes<nowiki>&</nowiki>amp;characterEncoding=UTF-8<nowiki>&</nowiki>amp;sessionVariables=sql_mode=<nowiki>''</nowiki></entry> | |||
<nowiki> </nowiki> <entry key='database.user'>root</entry> | |||
<nowiki> </nowiki> <entry key='database.password'>root</entry> | |||
</properties> | |||
EOF | |||
Start Traccar service | |||
service traccar start | |||
== External Link == | |||
https://www.traccar.org/install-digitalocean/ | |||
Latest revision as of 17:06, 10 June 2025
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