Help with Linux (CentOS 7) VPS install of V4.7 (Noobie)

Micah Tribehorn4 years ago

Hello,

I am new to using a VPS, and linux in general.

I am attempting to install Traccar v4.7 on a system running CentOS 7. (This can be changed to several other common Linux operating systems if it makes installing easier).

  1. I have started by installing Java

sudo yum install java-11-openjdk

This ultimately results in "Complete!" - which makes me think it has successfully installed.

  1. I install traccar v4.7
    wget https://github.com/traccar/traccar/releases/download/v4.7/traccar-linux-64-4.7.zip

This results in:
"2020-01-23 15:54:06 (39.4 MB/s) - 'traccar-linux-64-4.7.zip' saved [91531056/915
31056] "

  1. I unzip traccar
    unzip traccar-linux-64-4.7.zip

This results in:
"Archive: traccar-linux-64-4.7.zip
inflating: traccar.run
inflating: README.txt "

  1. I run traccar
    sudo ./traccar.run

This results in:
"Creating directory out
Verifying archive integrity... All good.
Uncompressing traccar 100%
Created symlink from /etc/systemd/system/multi-user.target.wants/traccar.service
to /etc/systemd/system/traccar.service. "

  1. I attempt to start traccar
    sudo /opt/traccar/bin/traccar start

This results in:
"sudo: /opt/traccar/bin/traccar: command not found "

This results in:
Nothing happens

  • So I try
    sudo /opt/traccar/bin/startDaemon.sh
    (this appears to be the command for versions < 4.1 via https://www.traccar.org/linux/ and I figure it is worth a try...)

This results in:
"sudo: /opt/traccar/bin/startDaemon.sh: command not found"

I am stuck here. Any help proceeding to the next step would be really appreciated!

  • Meesha
Anton Tananaev4 years ago

If you don't have /opt/traccar then something is failed during installation.

By the way, you don't need to install Java. It comes with Traccar.

Micah Tribehorn4 years ago

Thanks for letting me know about Traccar's inclusion of Java.

I will try it again without installing Java up front, and we will see what happens.

Slawek4 years ago

try

sudo systemctl status traccar.service

Slawek4 years ago

why ?

sudo /opt/traccar/bin/traccar start

no directoty like this.

Anton Tananaev4 years ago

Oh yeah. Where did you get that command from?

Micah Tribehorn4 years ago

I got it from here https://www.traccar.org/forums/topic/how-to-instal-traccar-server-on-centos-vps/

"Anton Tananaev 3 years ago
What I would recommend to do is to download the file straight from VPS:

wget https://github.com/tananaev/traccar/releases/download/v3.6/traccar-linux-64-3.6.zip
unzip traccar-linux-64-3.6.zip
sudo ./traccar.run
sudo /opt/traccar/bin/traccar start
That's it."

Obviously I got the other two commands from traccar.org/linux

Install
Run traccar.run (sudo ./traccar.run)
Start service:
4.1 and later: sudo systemctl start traccar.service
4.0 and earlier: sudo /opt/traccar/bin/startDaemon.sh

However, none of the three commands works.

What am I doing wrong?

Anton Tananaev4 years ago

I would recommend you to read official installation documentation instead of outdated forum posts.

Slawek4 years ago

sudo systemctl start traccar.service

is correct

check if service running

sudo systemctl status traccar.service

robertr44 years ago

@Micah,
I think you've mixed up steps from an outdated guide for linux.
Only things which is needed now is just download software, unzip it and run sudo ./traccar.run.
You do not have to run any services manually, everything is created by this traccar.run program.
As @Slawek wrote eventually you can check if service is running: sudo systemctl status traccar.service
if not then start by executing: sudo systemctl start traccar.service

At the end you can login to web page: http://yourip:8082 ,
reconfigure your GPS tracker device to use your server and go to /opt/traccar/logs/ to see details if your device is sending data to the server.

Micah Tribehorn4 years ago

Thanks for all the help!

@Anton Tananaev
I agree - trying to follow an outdated process is non logical. This is what happens when newbie like me is only following directions (making random attempts "in the dark" as it were.)

@ Slawek
I ran sudo systemctl status traccar.service as you suggested.
Resulting in:

CT-5ef7f4e3 /# sudo systemctl status traccar.service                            
● traccar.service - traccar                                                     
   Loaded: loaded (/etc/systemd/system/traccar.service; enabled; vendor preset: 
disabled)                                                                       
   Active: inactive (dead)  

@robertr4
If I understand you correctly the process now looks like:

  1. wget https://github.com/traccar/traccar/releases/download/v4.7/traccar-linux-64-4.7.zip
  2. unzip traccar-linux-64-4.7.zip
  3. sudo ./traccar.run.

So there is no longer a need to "start" traccar? I can just go to http://myip:8082/?

Slawek4 years ago

is some problem

try:
sudo systemctl restart traccar.service
and again:
sudo systemctl status traccar.service

Anton Tananaev4 years ago
  1. Download latest release.
  2. Unzip.
  3. Follow readme instructions.
Micah Tribehorn4 years ago

@Slawek

Here are the results of what you suggested:

/# sudo systemctl restart traccar.service                           
CT-5ef7f4e3 /# sudo systemctl status traccar.service                            
● traccar.service - traccar                                                     
   Loaded: loaded (/etc/systemd/system/traccar.service; enabled; vendor preset: 
disabled)                                                                       
   Active: active (running) since Thu 2020-01-23 16:58:58 CST; 13s ago          
 Main PID: 1121 (java)                                                          
   CGroup: /system.slice/traccar.service                                        
           └─1121 /opt/traccar/jre/bin/java -jar tracker-server.jar conf/trac...
                                                                                
Jan 23 16:58:58 server1.mowstuff.com systemd[1]: Started traccar.               
Jan 23 16:59:04 server1.mowstuff.com traccar[1121]: WARNING: An illegal refle...
Jan 23 16:59:04 server1.mowstuff.com traccar[1121]: WARNING: Illegal reflecti...
Jan 23 16:59:04 server1.mowstuff.com traccar[1121]: WARNING: Please consider ...
Jan 23 16:59:04 server1.mowstuff.com traccar[1121]: WARNING: Use --illegal-ac...
Jan 23 16:59:04 server1.mowstuff.com traccar[1121]: WARNING: All illegal acce...
Hint: Some lines were ellipsized, use -l to show in full.

@Anton
I will wipe everything and start over using your instructions.

Slawek4 years ago

try:

sudo rm -f traccar.run README.txt traccar-linux-*.zip

Remove Traccar

sudo systemctl stop traccar.service
sudo systemctl disable traccar.service
sudo rm /etc/systemd/system/traccar.service
sudo systemctl daemon-reload
sudo rm -R /opt/traccar

Download Traccar

wget https://github.com/traccar/traccar/releases/download/v4.7/traccar-linux-64-4.7.zip

Install Traccar

sudo ./traccar.run

Run Traccar

sudo systemctl start traccar.service

Check if running

sudo systemctl status traccar.service

but I think you have also some problem with java