Setup repository pinning to avoid installing distribution-provided Nginx packages: $ echo -e "Package: *\nPin: origin \nPin: release o=nginx\nPin-Priority: 900\n" \ Setup the apt repository for stable Nginx packages: $ echo "deb \ If it prints a different value, remove the downloaded file /usr/share/keyrings/nginx-archive-keyring.gpg and then re-run the above importing command. The output should include this fingerprint: 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62. Verify the signing key within the downloaded file: $ gpg -dry-run -quiet -import -import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg To avoid running the Traccar service as root, which is an unsafe operation in production, change the owner of the Traccar service as follows: $ sudo mkdir /etc/systemd/system// Jdbc:mysql://localhost/traccar?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode='' Use the database credentials (database: traccar, database user: traccar, database password: YourPassword) you setup earlier to update the Traccar configuration file: $ cat Unzip the Traccar archive: $ sudo apt install unzip -y Install Traccar 4.14ĭownload Traccar 4.14, the latest stable release of Traccar for now: $ cd MariaDB > GRANT ALL PRIVILEGES ON traccar.* TO IDENTIFIED BY 'YourPassword' WITH GRANT OPTION MariaDB > CREATE USER IDENTIFIED BY 'YourPassword' In the MariaDB shell, create a database named traccar and a database user named traccar along with its password YourPassword for Traccar: MariaDB > CREATE DATABASE traccar CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci Log in to the MariaDB shell as root: $ sudo mysql -u root Create a Database and a Database User for Traccar Reload privilege tables now? y:key_enter:Ĥ.Remove test database and access to it? y:key_enter:.Disallow root login remotely? y:key_enter:.Change the root password? n:key_enter:. Switch to unix_socket authentication n:key_enter:.Enter current password for root (enter for none): :key_enter:.In the wizard, answer prompted questions as follows: Secure the installation of MariaDB: $ sudo mariadb-secure-installation Start the MariaDB service: $ sudo systemctl start rvice $ sudo add-apt-repository 'deb focal main' Use commands listed below to install MariaDB 10.6, the current stable version of MariaDB, on the Ubuntu 20.04 LTS system: $ sudo apt-get install software-properties-common dirmngr apt-transport-https -y Traccar needs to work with a Database Management System (DBMS), such as MariaDB, MySQL, or PostgreSQL. Having the server instance up and running again, log in as traccar from an SSH terminal for follow-on work.īe aware that the tasks mentioned above are for beginners only, and more security measures are at your discretion. Update and then restart the system: # apt update Set default firewall rules with UFW: # ufw default deny # echo 'traccar ALL=(ALL) NOPASSWD: ALL' tee -a /etc/sudoers.d/designated # echo '/swap none swap defaults 0 0' > /etc/fstabĬreate a normal user named traccar with sudo privileges: # useradd -ms /bin/bash traccar Log in to your server instance as root from an SSH terminal, and then perform basic tasks as follows to harden the system.Ĭreate a swap file: # fallocate -l 2g /swap Perform Basic Tasks on the Server Instance See detailed instructions on managing DNS through Vultr in this Vultr tutorial. To ease public access, you need to set up DNS records through your domain hosting service provider, pointing domain names (an apex domain name and one or more subdomain names) to the IPv4 address of your server.įor example, if you are hosting the apex domain name on Vultr, set up DNS records as follows to point and to the IPv4 address of your server in the DNS tab of the Vultr control panel: Entry #1
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |