PostgreSQL for Linux 安装方式
发表于:2025-11-08 作者:千家信息网编辑
千家信息网最后更新 2025年11月08日,1、环境规划目录名称存放位置Postgres 用户家目录/home/postgres软件存放目录/home/soft安装目录/usr/local数据目录/home/postgres/data/2、安装
千家信息网最后更新 2025年11月08日PostgreSQL for Linux 安装方式
1、环境规划
| 目录名称 | 存放位置 |
|---|---|
| Postgres 用户家目录 | /home/postgres |
| 软件存放目录 | /home/soft |
| 安装目录 | /usr/local |
| 数据目录 | /home/postgres/data/ |
2、安装流程
2.1 解压安装
在操作系统安装完成后,按照表格规划目录。
1)安装部署参考文档
下载页:https://www.enterprisedb.com/download-postgresql-binaries
软件包:postgresql-10.7-2-linux-x64-binaries.tar.gz
2)创建 postgre 安装用户
useradd postgrespasswd postgres3)创建 postgre 安装目录及数据目录
mkdir -p /home/postgres/data/chown -R postgres:postgres /home/postgres/data/chmod -R 775 /home/postgres/data/4)解压安装
tar -xvf postgresql-10.8-4-linux-x64-binaries.tar -C /home/postgres/[root@leo postgres]# chmod -R 777 pgsql[root@leo postgres]# lltotal 12drwxrwxrwx 9 root root 4096 Apr 10 03:24 pgsql drwx------ 19 postgres postgres 4096 Apr 15 11:33 pgsql_data5)初始化数据库
[postgres@leo bin]$cd /home/postgres/pgsql/bin[postgres@leo bin]$ ./initdb -D /home/postgres/data/The files belonging to this database system will be owned by user "postgres". This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/data ... ok creating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posix creating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... oksyncing data to disk ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.Success. You can now start the database server using: ./pg_ctl -D /home/postgres/data/ -l logfile start6)启动数据库
[postgres@leo bin]$ ./pg_ctl -D /home/postgres/data/ -l logfile start waiting for server to start.... doneserver started7)停止数据库
./pg_ctl -D /home/postgres/data/ stop
目录
数据
数据库
用户
软件
规划
操作系统
位置
名称
文档
文档下载
流程
环境
环境规划
系统
表格
软件包
参考
方式
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
计算机网络技术专业职业晋升渠道
数据库远程访问方法
智能软件开发免费咨询
网络安全教育的目标
做单片机软件开发前景如何
我们都是网络安全检查员图画
数据库考试系统新版窗体设计部分
如何查询服务器托管商
32路视频服务器
泉州正丁网络技术有限公司
mysql数据库的字符长度
kafka 游戏服务器
联想服务器sr850
家庭服务器的重要性和意义
服务器冗余方案怎么写
软件开发 系统keil4
网站直连服务器
文明重启自定义服务器怎么创造
中国民航大学网络安全题库
果加智能怎么一直服务器异常
数据库租赁
怎么在数据库中新建存储过程
null在数据库中
核心业务与数据库的连接应用功能
我们都是网络安全检查员图画
软件开发 校园招聘
网络安全短视频大赛
第一届中国广电网络技术大会
复古传奇三端互通服务器
java8桌面软件开发