glimmbo / hack-attack

Leaflet, Turf.js, geospatial web app game
1 stars 0 forks source link

Installing postgress. #2

Open kidCaulfield opened 4 years ago

kidCaulfield commented 4 years ago

install postgres on buster

looks like we need to set up a gpg key on the server.

I made it to the beginning of step to before I started getting this error:

https://computingforgeeks.com/install-postgresql-11-on-debian-10-buster/

Err:3 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FCC7D46ACCC4CF8

server log

root@raspberrypi:~# sudo apt update
Hit:1 https://deb.nodesource.com/node_12.x buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease                     
Get:3 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]        
Fetched 15.0 kB in 3s (5,986 B/s)   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
root@raspberrypi:~# sudo apt -y upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@raspberrypi:~# sudo apt install -y vim wget
Reading package lists... Done
Building dependency tree       
Reading state information... Done
wget is already the newest version (1.20.1-1.1).
wget set to manually installed.
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,780 kB of archives.
After this operation, 32.6 MB of additional disk space will be used.
Get:1 http://mirrors.switch.ca/raspbian/raspbian buster/main armhf vim-runtime all 2:8.1.0875-5 [5,775 kB]
Get:2 http://mirrors.switch.ca/raspbian/raspbian buster/main armhf vim armhf 2:8.1.0875-5 [1,005 kB]
Fetched 6,780 kB in 2s (4,155 kB/s)
Selecting previously unselected package vim-runtime.
(Reading database ... 47074 files and directories currently installed.)
Preparing to unpack .../vim-runtime_2%3a8.1.0875-5_all.deb ...
Adding 'diversion of /usr/share/vim/vim81/doc/help.txt to /usr/share/vim/vim81/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim81/doc/tags to /usr/share/vim/vim81/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:8.1.0875-5) ...
Selecting previously unselected package vim.
Preparing to unpack .../vim_2%3a8.1.0875-5_armhf.deb ...
Unpacking vim (2:8.1.0875-5) ...
Setting up vim-runtime (2:8.1.0875-5) ...
Setting up vim (2:8.1.0875-5) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
Processing triggers for man-db (2.8.5-2) ...
root@raspberrypi:~# RELEASE=$(lsb_release -cs)
root@raspberrypi:~# echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo tee  /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main
root@raspberrypi:~# sudo apt update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease                                    
Get:3 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease [46.2 kB]                   
Hit:4 https://deb.nodesource.com/node_12.x buster InRelease
Err:3 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FCC7D46ACCC4CF8
Reading package lists... Done
W: GPG error: http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FCC7D46ACCC4CF8
E: The repository 'http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@raspberrypi:~# gpg --keyserver keys.gnupg.net --recv-key
gpg: keybox '/root/.gnupg/pubring.kbx' created
root@raspberrypi:~# gpg -a --export 82B129927FA3303E| apt-key add -
gpg: WARNING: nothing exported
gpg: no valid OpenPGP data found.
root@raspberrypi:~# cat /root/.gnupg/pubring.kbx
 KBXf]ǂ.]ǂ.root@raspls -a /root/.gnupg/
.  ..  private-keys-v1.d  pubring.kbx
root@raspberrypi:~# apt-get update
Hit:1 https://deb.nodesource.com/node_12.x buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease                                  
Hit:3 http://archive.raspberrypi.org/debian buster InRelease                                     
Get:4 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease [46.2 kB]
Err:4 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FCC7D46ACCC4CF8
Reading package lists... Done
W: GPG error: http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FCC7D46ACCC4CF8
E: The repository 'http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@raspberrypi:~# gpg -a --export 7FCC7D46ACCC4CF8| apt-key add -
gpg: WARNING: nothing exported
gpg: no valid OpenPGP data found.
root@raspberrypi:~# gpg --keyserver keys.gnupg.net --recv-key 
root@raspberrypi:~# gpg -a --export 7FCC7D46ACCC4CF8| apt-key add -
gpg: WARNING: nothing exported
gpg: no valid OpenPGP data found.
glimmbo commented 4 years ago

I feel like this is a very specific way to set up pg-11, maybe we can just do an older version? I'm gonna put time in on this Friday