Raspberry pi
아으.. pi에 postgresql 설치하기
케이오스
2022. 12. 10. 07:17
항상 너무 오랜만에 하는거라
할때마다 까먹어서 기록으로 남김
...
근데, 이것도 중간에 생각남 ㅋㅋㅋ
$ sudo apt-get install postgresql
$ sudo apt-get install pgadmin4
// 파이에서는 안 됨. 헛수고 말자
// pgadmin4 InRelease' doesn't support architecture 'armhf'
$ sudo vi /etc/postgresql/13/main/pg_hba.conf
파일 하단부
# Database administrative login by Unix domain socket
local all postgres peer
// peer -> trust 변경. 어떤 글에서는 md5 로 하란 글도 있었음
// 비번 어차피 까먹긴 할것 같은데;;; -0-;
$ sudo systemctl restart postgresql
$ psql -U postgres
psql (13.8 (Raspbian 13.8-0+deb11u1))
Type "help" for help.
postgres-# \list
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 |
template0 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres
(3 rows)
postgres-# \q
됐다.