一、postgres是什么?
因为大家都在用所以想挣钱就得知道、会、
好处 https://www.zhihu.com/question/20010554
https://blog.csdn.net/weixin_45727359/article/details/110790043
https://www.bilibili.com/video/BV1V5411G7YS
https://www.liuzhishi.com/5626.html
二、软件下载及安装
1.软件下载
官网下载地址: https://www.postgresql.org/download/
这个是我提前准备好的13安装rpm包,有的时候内网环境无法上网。
链接:https://pan.baidu.com/s/1bmOuUZjFueELZLySNS0pLw
提取码:akal
pgadmin4 这个是监控管理工具,可以自己开发监控的页面
2.软件安装
内网本地安装
yum install --downloadonly --downloaddir=/ postgresql13-server----软件包下载本地不安装
[root@localhost /]# ls -l post*
-rw-r--r-- 1 root root 1418396 Nov 11 15:50 postgresql13-13.1-1PGDG.rhel7.x86_64.rpm
-rw-r--r-- 1 root root 388056 Nov 11 15:50 postgresql13-libs-13.1-1PGDG.rhel7.x86_64.rpm
-rw-r--r-- 1 root root 5683544 Nov 11 15:50 postgresql13-server-13.1-1PGDG.rhel7.x86_64.rpm
[root@localhost /]#
yum localinstall postgres* --nogpgcheck ----本地化安装
官网下载源码安装
常用参数:
–prefix=PREFIX 安装目录
–sysconfdir=DIRECTORY 系统文件存放
–datadir=DIRECTORY 数据文件存放
3.软件使用
-bash-4.2$ psql --help
psql is the PostgreSQL interactive terminal.
Usage:
psql [OPTION]... [DBNAME [USERNAME]]
General options:
-c, --command=COMMAND run only single command (SQL or internal) and exit
-d, --dbname=DBNAME database name to connect to (default: "postgres")
-