From 5d1f54052c34b4b92f4639748794b0d937a4604c Mon Sep 17 00:00:00 2001 From: Trowbridge Date: Wed, 12 Feb 2020 09:46:21 -0500 Subject: [PATCH 1/8] notes --- pgbdager.md | 2 +- postgres/out_of_memory.md | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 postgres/out_of_memory.md diff --git a/pgbdager.md b/pgbdager.md index ce44791..9050f43 100644 --- a/pgbdager.md +++ b/pgbdager.md @@ -1,3 +1,3 @@ creates a file `out.html` by default - sudo pgbadger --prefix '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h,remote=%r ' //var/log/postgresql/postgresql-2020-02* + sudo pgbadger --prefix '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h,remote=%r ' //var/log/postgresql/postgresql-2020-02* \ No newline at end of file diff --git a/postgres/out_of_memory.md b/postgres/out_of_memory.md new file mode 100644 index 0000000..f7f5c0e --- /dev/null +++ b/postgres/out_of_memory.md @@ -0,0 +1,12 @@ +logs from trying to start with not enough memory: +``` +207716 2020-02-11 11:33:02 EST [2969]: [1-1] user=,db=,app=,client=,remote=LOG: starting PostgreSQL 12.1 (Ubuntu 12.1-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit +207717 2020-02-11 11:33:02 EST [2969]: [2-1] user=,db=,app=,client=,remote=LOG: listening on IPv4 address "0.0.0.0", port 5030 +207718 2020-02-11 11:33:02 EST [2969]: [3-1] user=,db=,app=,client=,remote=LOG: listening on IPv6 address "::", port 5030 +207719 2020-02-11 11:33:04 EST [2969]: [4-1] user=,db=,app=,client=,remote=LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5030" +207720 2020-02-11 11:33:06 EST [2969]: [5-1] user=,db=,app=,client=,remote=FATAL: could not map anonymous shared memory: Cannot allocate memory +207721 2020-02-11 11:33:06 EST [2969]: [6-1] user=,db=,app=,client=,remote=HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory, swap space, or huge pages. To reduce the request size (currently 4423614464 bytes ), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. +207722 2020-02-11 11:33:06 EST [2969]: [7-1] user=,db=,app=,client=,remote=LOG: database system is shut down +207723 pg_ctl: could not start server +207724 Examine the log output. +``` \ No newline at end of file From 0121f7414beb57ce8c3098f123a6beb3b408d6a8 Mon Sep 17 00:00:00 2001 From: Trowbridge Date: Wed, 12 Feb 2020 09:54:38 -0500 Subject: [PATCH 2/8] notes --- ubuntu/networking.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ubuntu/networking.md b/ubuntu/networking.md index cdb5bf9..e7e947d 100644 --- a/ubuntu/networking.md +++ b/ubuntu/networking.md @@ -7,4 +7,8 @@ sudo netstat --tcp --udp --listening --program sudo lsof +M -i4 -i6 let's encrypt certbot instructions for apache: -https://certbot.eff.org/lets-encrypt/ubuntubionic-apache \ No newline at end of file +https://certbot.eff.org/lets-encrypt/ubuntubionic-apache + + +ip setup: +https://help.ubuntu.com/lts/serverguide/network-configuration.html \ No newline at end of file From 77fb147f51134510ae3b1ef2a367cbf7559fd0b2 Mon Sep 17 00:00:00 2001 From: Trowbridge Date: Tue, 18 Feb 2020 15:15:06 -0500 Subject: [PATCH 3/8] notes --- ubuntu/networking.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ubuntu/networking.md b/ubuntu/networking.md index e7e947d..5a01539 100644 --- a/ubuntu/networking.md +++ b/ubuntu/networking.md @@ -4,6 +4,8 @@ sudo nmap -T Aggressive -A -v 127.0.0.1 -p 1-10000 sudo netstat --tcp --udp --listening --program +lists programs with port numbers: `sudo netstat -tup` + sudo lsof +M -i4 -i6 let's encrypt certbot instructions for apache: From f05dc645146d1cf1bc3d6b7d4d36ffae8ebda998 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 19 Feb 2020 16:44:32 -0500 Subject: [PATCH 4/8] webmin --- postgres/out_of_memory.md | 22 +++++++++++----------- webmin.md | 2 ++ 2 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 webmin.md diff --git a/postgres/out_of_memory.md b/postgres/out_of_memory.md index f7f5c0e..76fd8ea 100644 --- a/postgres/out_of_memory.md +++ b/postgres/out_of_memory.md @@ -1,12 +1,12 @@ -logs from trying to start with not enough memory: -``` -207716 2020-02-11 11:33:02 EST [2969]: [1-1] user=,db=,app=,client=,remote=LOG: starting PostgreSQL 12.1 (Ubuntu 12.1-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit -207717 2020-02-11 11:33:02 EST [2969]: [2-1] user=,db=,app=,client=,remote=LOG: listening on IPv4 address "0.0.0.0", port 5030 -207718 2020-02-11 11:33:02 EST [2969]: [3-1] user=,db=,app=,client=,remote=LOG: listening on IPv6 address "::", port 5030 -207719 2020-02-11 11:33:04 EST [2969]: [4-1] user=,db=,app=,client=,remote=LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5030" -207720 2020-02-11 11:33:06 EST [2969]: [5-1] user=,db=,app=,client=,remote=FATAL: could not map anonymous shared memory: Cannot allocate memory -207721 2020-02-11 11:33:06 EST [2969]: [6-1] user=,db=,app=,client=,remote=HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory, swap space, or huge pages. To reduce the request size (currently 4423614464 bytes ), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. -207722 2020-02-11 11:33:06 EST [2969]: [7-1] user=,db=,app=,client=,remote=LOG: database system is shut down -207723 pg_ctl: could not start server -207724 Examine the log output. +logs from trying to start with not enough memory: +``` +207716 2020-02-11 11:33:02 EST [2969]: [1-1] user=,db=,app=,client=,remote=LOG: starting PostgreSQL 12.1 (Ubuntu 12.1-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit +207717 2020-02-11 11:33:02 EST [2969]: [2-1] user=,db=,app=,client=,remote=LOG: listening on IPv4 address "0.0.0.0", port 5030 +207718 2020-02-11 11:33:02 EST [2969]: [3-1] user=,db=,app=,client=,remote=LOG: listening on IPv6 address "::", port 5030 +207719 2020-02-11 11:33:04 EST [2969]: [4-1] user=,db=,app=,client=,remote=LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5030" +207720 2020-02-11 11:33:06 EST [2969]: [5-1] user=,db=,app=,client=,remote=FATAL: could not map anonymous shared memory: Cannot allocate memory +207721 2020-02-11 11:33:06 EST [2969]: [6-1] user=,db=,app=,client=,remote=HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory, swap space, or huge pages. To reduce the request size (currently 4423614464 bytes ), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. +207722 2020-02-11 11:33:06 EST [2969]: [7-1] user=,db=,app=,client=,remote=LOG: database system is shut down +207723 pg_ctl: could not start server +207724 Examine the log output. ``` \ No newline at end of file diff --git a/webmin.md b/webmin.md new file mode 100644 index 0000000..e8ef5e2 --- /dev/null +++ b/webmin.md @@ -0,0 +1,2 @@ +install on Ubunut +https://doxfer.webmin.com/Webmin/Installation#apt_.28Debian.2FUbuntu.2FMint.29 \ No newline at end of file From 73decfe6af6b2f48cb4e083ecb14b524b50d4e92 Mon Sep 17 00:00:00 2001 From: pt Date: Wed, 19 Feb 2020 23:15:51 -0500 Subject: [PATCH 5/8] remove dumy interfaces --- ubuntu/networking.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ubuntu/networking.md b/ubuntu/networking.md index 5a01539..7262600 100644 --- a/ubuntu/networking.md +++ b/ubuntu/networking.md @@ -13,4 +13,10 @@ https://certbot.eff.org/lets-encrypt/ubuntubionic-apache ip setup: -https://help.ubuntu.com/lts/serverguide/network-configuration.html \ No newline at end of file +https://help.ubuntu.com/lts/serverguide/network-configuration.html + + +## network interfaces +`ip link` lists all interfaces +multipass setup some dummy interfaces and left them there. +to delete did `ip link delete mpqemubr0-dummy` \ No newline at end of file From 0f2c3a614b05b0858fd058782dadebfb8b5401ce Mon Sep 17 00:00:00 2001 From: pt Date: Thu, 20 Feb 2020 01:41:30 -0500 Subject: [PATCH 6/8] vagrant --- vagrant.md | 17 +++++++++++++++++ virtualbox.md | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 vagrant.md create mode 100644 virtualbox.md diff --git a/vagrant.md b/vagrant.md new file mode 100644 index 0000000..af64bed --- /dev/null +++ b/vagrant.md @@ -0,0 +1,17 @@ +vagrant has releases at https://releases.hashicorp.com/vagrant/2.2.7/ + +curl -O https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb + +then `sudo apt install ./file.deb` + +although if you go to the downloads page, it looks like it gives you a zip of the binary if you want to drop that somewhere. + +set the vagrant file to uncomment the public network option and specify some additional info + +vagrant init ubuntu/bionic64 + +`config.vm.network "public_network", bridge: "eno1", ip: "192.168.1.115"` + +vagrant up +vagrant ssh +vagrant halt \ No newline at end of file diff --git a/virtualbox.md b/virtualbox.md new file mode 100644 index 0000000..ff973e5 --- /dev/null +++ b/virtualbox.md @@ -0,0 +1,16 @@ +install from Oracles repo + +https://itsfoss.com/install-virtualbox-ubuntu/ + + +add key for repo + + wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - + +add virtualbox to list of repositories + + sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" + +`apt-get install virtualbox-6.1` + +vboxmanage is the cli program \ No newline at end of file From a49ef278638e59d5bd40669f6e413d0332d4de97 Mon Sep 17 00:00:00 2001 From: Trowbridge Date: Fri, 21 Feb 2020 10:17:25 -0500 Subject: [PATCH 7/8] badges --- badges.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 badges.md diff --git a/badges.md b/badges.md new file mode 100644 index 0000000..7f27796 --- /dev/null +++ b/badges.md @@ -0,0 +1,3 @@ +shields.io + +[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) \ No newline at end of file From 3fe16ce15e5947c9417c32e504b5837431f01d56 Mon Sep 17 00:00:00 2001 From: pt Date: Sun, 23 Feb 2020 14:26:55 -0500 Subject: [PATCH 8/8] notes --- bash.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bash.md b/bash.md index 5f0bad2..b46d570 100644 --- a/bash.md +++ b/bash.md @@ -1,3 +1,5 @@ +https://wiki.bash-hackers.org/ + Update PostgreSQL ------------------------------------------------------------------------------------------------------------