- Any modern linux distribution with systemd (CentOS Stream, Oracle Linux 8, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04).
- Public IP address
- Basic skills of working with linux console
Disable or setup firewall. For CentOS:
DROP SCHEMA public CASCADE; | |
CREATE SCHEMA public; | |
GRANT ALL ON SCHEMA public TO postgres; | |
GRANT ALL ON SCHEMA public TO public; | |
COMMENT ON SCHEMA public IS 'standard public schema'; |
Hacks to split stdout to log files.
With tee:
| LOGPREFIX="/path/to/log/locations/log-" LOGSUFFIX=".log" split -l 10000 --filter 'rm -f `ls -t "$LOGPREFIX"*"$LOGSUFFIX"|tail -n +3`; exec tee -a "$LOGPREFIX`date +%Y%m%d%H`$LOGSUFFIX"' - none
Without tee:
| LOGPREFIX="/path/to/log/locations/log-" LOGSUFFIX=".log" split -l 10000 --filter 'rm -f `ls -t "$LOGPREFIX"*"$LOGSUFFIX"|tail -n +3`; exec cat >> "$LOGPREFIX`date +%Y%m%d%H`$LOGSUFFIX"' - none