时间:2021-05-23
下载安装软件及创建安装目录
[root@ft2000db opt]# wget http://ftp.postgresql.org/pub/source/v13.1/postgresql-13.1.tar.bz2[root@ft2000db opt]# tar xjvf postgresql-13.1.tar.bz2[root@ft2000db opt]# cd postgresql-13.1/[root@ft2000db postgresql-13.1]# mkdir -p /opt/pgsql[root@ft2000db postgresql-13.1]# ./configure --prefix=/opt/pgsql................................................................configure: creating ./config.statusconfig.status: creating GNUmakefileconfig.status: creating src/Makefile.globalconfig.status: creating src/include/pg_config.hconfig.status: creating src/include/pg_config_ext.hconfig.status: creating src/interfaces/ecpg/include/ecpg_config.hconfig.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.sconfig.status: linking src/backend/port/posix_sema.c to src/backend/port/pg_sema.cconfig.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.cconfig.status: linking src/include/port/linux.h to src/include/pg_config_os.hconfig.status: linking src/makefiles/Makefile.linux to src/Makefile.port[root@ft2000db postgresql-13.1]# gmake //这里编译时间大约30分钟,如果失败一般都是系统依赖包原因,根据提示解决
.............................................................................................................
..........................................................................................
gmake[1]: 离开目录“/opt/postgresql-13.1/src”gmake -C config installgmake[1]: 进入目录“/opt/postgresql-13.1/config”/usr/bin/mkdir -p '/opt/pgsql/lib/pgxs/config'/usr/bin/install -c -m 755 ./install-sh '/opt/pgsql/lib/pgxs/config/install-sh'/usr/bin/install -c -m 755 ./missing '/opt/pgsql/lib/pgxs/config/missing'gmake[1]: 离开目录“/opt/postgresql-13.1/config”PostgreSQL installation complete.创建用户和组
[root@ft2000db postgresql-13.1]# groupadd -g 1002 postgres[root@ft2000db postgresql-13.1]# useradd -g 1002 -u 1002 postgres[root@ft2000db postgresql-13.1]# passwd postgres[root@ft2000db postgresql-13.1]# chown -R postgres:postgres /opt/[root@ft2000db postgresql-13.1]# chmod -R 775 /opt/配置环境变量
[postgres@ft2000db ~]$ cat .bash_profile# Source /root/.bashrc if user has one[ -f ~/.bashrc ] && . ~/.bashrc# User specific environment and startup programsPATH=$PATH:$HOME/.local/bin:$HOME/binexport PATHPATH=/opt/pgsql/bin:$PATHexport PATHLD_LIBRARY_PATH=/opt/pgsql/libexport LD_LIBRARY_PATH初始化数据库
[postgres@ft2000db ~]$ mkdir -p /opt/pgsql/data[postgres@ft2000db ~]$ initdb -D /opt/pgsql/dataThe 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 "zh_CN.UTF-8".The default database encoding has accordingly been set to "UTF8".initdb: could not find suitable text search configuration for locale "zh_CN.UTF-8"The default text search configuration will be set to "simple".Data page checksums are disabled.fixing permissions on existing directory /opt/pgsql/data ... okcreating subdirectories ... okselecting dynamic shared memory implementation ... posixselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting default time zone ... Asia/Shanghaicreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... oksyncing data to disk ... okinitdb: warning: 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 /opt/pgsql/data -l logfile start启动数据库
[postgres@ft2000db ~]$ pg_ctl -D /opt/pgsql/data startwaiting for server to start....2020-11-20 16:01:05.881 CST [34826] LOG: starting PostgreSQL 13.1 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 7.3.0, 64-bit2020-11-20 16:01:05.882 CST [34826] LOG: listening on IPv6 address "::1", port 54322020-11-20 16:01:05.882 CST [34826] LOG: listening on IPv4 address "127.0.0.1", port 54322020-11-20 16:01:05.882 CST [34826] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"2020-11-20 16:01:05.884 CST [34827] LOG: database system was shut down at 2020-11-20 16:00:27 CST2020-11-20 16:01:05.887 CST [34826] LOG: database system is ready to accept connectionsdoneserver started登录数据库
[postgres@ft2000db ~]$ psql -p 5432psql (13.1)type "help" for help.postgres=#到此postgresql数据库安装完毕。
到此这篇关于开源数据库postgreSQL13在麒麟v10sp1源码安装过程详解的文章就介绍到这了,更多相关postgreSQL13在麒麟v10sp1源码安装内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
PostgreSQL是一款功能强大的开源关系型数据库,本文使用python实现了对开源数据库PostgreSQL的常用操作,其开发过程简介如下:一、环境信息:1
前言最近工作上使用的数据库一直是Postgresql,这是一款开源的数据库,而且任何个人可以将该数据库用于商业用途。在使用Postgresql的时候,让我最明显
前言就在2019年1月份微软收购了PostgreSQL数据库的初创公司CitusData,在云数据库方面可以增强与AWS的竟争。AWS的RDS两大开源数据库就是
引言 今天学习python连接数据库,就想安装一下mysql数据库,没想到小小的数据库也遇到了不少挫折,所以我就把自己的安装过程以及问题写出来分享给大家。
介绍众所周知PostgreSQL是自由的对象-关系型数据库服务器(数据库管理系统),在ubuntu下安装Postgresql是一件非常容易的事情,下面话不多说了