Linode


Our Linux servers are hosted by Linode.
There are three servers:

  • dealer-portal
  • integration-server
  • web-services

dealer-portal

Hosts our internal dealer portal, which is just a fancy FTP server running on Nextcloud. It uses Nginx to serve the frontend and has a connected MySQL server on the same VM for user data, etc.

web-services

Hosts our internal order tracking tool called the production schedule and its connected asynchronous service, plus a few active microservices like Shopify draft order entry into Salesforce.

integration-server

Hosts the integration hub, a platform for integrating any number of external services with our SAP server. Security is extremely important for this server, so make sure the firewall is always running.

Common Commands


List all files and directories in specified folder

Leave [folder] blank to search current directory.
Having a / at the start of the filepath will search starting from the root.

ls [folder]

Change directory

Move to a specified directory.

cd [path to folder]

Prepend / to specify an absolute path (starting from root)

cd /var/www

Start directly with a folder name to specify a path relative to current directory

# Current folder is /var/
cd www

Use ../ to move one directory up. Can be chained.

# Current folder is /var/www/api
cd ../../tmp
# Goes to /var/tmp

Nano

Edit a file in Nano, a text editor for Linux.
To save any changes, press Ctrl+X and then Y

nano [path to file]
sudo nano [path to file]

Update

Updates list of packages and versions, but does not install or upgrade anything.

sudo apt update

Upgrade

Installs new versions of packages. Run sudo apt update before running this.

sudo apt upgrade

Restart Apache (Webserver)

sudo systemctl restart apache2

Get New SSL Certificates

certbot --apache

Crontab (Scheduled Commands)

crontab -e

It’s a good idea to have scheduled crons running on a non-root user if possible. Currently our only active crontab is for inventory sync on integration-server.

Common Tools/Packages


ufw

Lightweight firewall

vsftpd

FTP server used for uploading and downloading code/files for development.
Can be disabled if not in active development.

MySQL

General use database. Used for production schedule, dealer portal, etc.