0
华为鲲鹏CentOS 7.6上PostgreSQL 11安装迁移以及主从复制搭建
1351
6页
4次
墨值5
摘要:
本文介绍华为鲲鹏 CentOS 7.6 安装 PostgreSQL 11 以及数据迁移步骤,另外介绍
PostgreSQL 11 流复制主从同步搭建。
环境介绍
老环境为 x86 CentOS 7.4 postgresql 10,新环境为两台鲲鹏云服务器 CentOS
7.4 postgresql 11,完成数据的迁移,以及主从复制的搭建。
cat /etc/redhat-release
CentOS Linux release 7.6.1810 (AltArch)
uname -a
Linux mo-db-0001 4.14.0-115.5.1.el7a.aarch64 #1 SMP Mon Feb 4 16:38:08
UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
新环境搭建
安装需要的包
yum install wget gcc gcc-c++ readline-devel zlib-devel
下载软件:
wget https://ftp.postgresql.org/pub/source/v11.4/postgresql-
11.4.tar.gz
解压编译安装
mkdir -p /u01/pg11
tar -zxvf postgresql-11.4.tar.gz
cd postgresql-11.4
./configure --prefix=/u01/pg11/
make
make install
创建目录和用户
mkdir /u01/pg11/data
adduser postgres
chown postgres:postgres /u01/pg11/data/
初始化数据库
su - postgres
/u01/pg11/bin/initdb -D /u01/pg11/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".
The default database encoding has accordingly been set to "LATIN1".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /u01/pg11/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... PRC
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:
/u01/pg11/bin/pg_ctl -D /u01/pg11/data -l logfile start
查看日志
cat logfile
2019-07-30 18:18:37.274 CST [12350] LOG: listening on IPv6 address
of 6
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜
近期活动
全部
暂无活动,敬请期待...
相关课程
全部