资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

PostgreSQLforLinux安装方式-创新互联

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 postgres
passwd postgres

3)创建 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]# ll
total 12
drwxrwxrwx 9 root root 4096 Apr 10 03:24 pgsql 
drwx------ 19 postgres postgres 4096 Apr 15 11:33 pgsql_data

5)初始化数据库

[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 ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You 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 start

6)启动数据库

[postgres@leo bin]$ ./pg_ctl -D /home/postgres/data/ -l logfile start 
waiting for server to start.... done
server started

7)停止数据库

./pg_ctl -D /home/postgres/data/ stop

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


文章名称:PostgreSQLforLinux安装方式-创新互联
文章起源:http://cdkjz.cn/article/jopgp.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220