forked from judasn/Linux-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhang
committed
Jun 12, 2019
1 parent
5cb4b2a
commit 5f7743f
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# PostgreSQL 安装和配置 | ||
|
||
|
||
## 官网 | ||
|
||
- 官网:<https://www.postgresql.org/> | ||
- 201906 最新版本 | ||
- 12 beat | ||
- 11 release | ||
- 官网 Docker hub:<https://hub.docker.com/_/postgres> | ||
|
||
|
||
## Docker 安装 PostgreSQL(带挂载) | ||
|
||
``` | ||
docker run \ | ||
-d \ | ||
--name pgsql \ | ||
-p 5432:5432 \ | ||
-e POSTGRES_USER=adg_user \ | ||
-e POSTGRES_PASSWORD=adg123456 \ | ||
-v ~/docker_data/pgsql/data:/var/lib/postgresql/data \ | ||
postgres:11 | ||
``` | ||
|
||
- 连上容器:`docker exec -it pgsql /bin/bash` | ||
- 连上 PostgreSQL:`psql -h 127.0.0.1 -p 5432 -U adg_user` | ||
|
||
|
||
## 资料 | ||
|
||
- <https://codeday.me/bug/20180726/203876.html> |