开源数据库postgreSQL13在麒麟v10sp1源码安装过程详解

 更新时间:2021年01月14日 08:56:09   作者:PKS生态服务平台  
这篇文章主要介绍了开源数据库postgreSQL13在麒麟v10sp1源码安装过程详解,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
(福利推荐:【腾讯云】服务器最新限时优惠活动,云服务器1核2G仅99元/年、2核4G仅768元/3年,立即抢购>>>:9i0i.cn/qcloud

(福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun

一、中标麒麟v10sp1在飞腾2000+系统安装略

二、系统依赖包安装

[root@ft2000db opt]# yum install bzip*
[root@ft2000db opt]# nkvers
############## Kylin Linux Version #################
Release:
Kylin Linux Advanced Server release V10 (Tercel)

Kernel:
4.19.90-17.ky10.aarch64

Build:
Kylin Linux Advanced Server
release V10 (SP1) /(Tercel)-aarch64-Build04/20200711
#################################################
[root@ft2000db opt] # yum install -y perl-ExtUtils-Embed
[root@ft2000db opt]# yum install -y flex
root@ft2000db opt]# yum install -y bison
root@ft2000db opt]# yum install -y readline-devel
root@ft2000db opt]# yum install -y zlib-devel
root@ft2000db opt]# yum install -y openssl-devel
root@ft2000db opt]# yum install -y pam-devel
root@ft2000db opt]# yum install -y libxml2-devel
root@ft2000db opt]# yum install -y libxslt-devel
root@ft2000db opt]# yum install -y openldap-devel
root@ft2000db opt]# yum install -y python-devel
root@ft2000db opt]# yum install -y gcc-c++
root@ft2000db opt]# yum install -y libssh2-devel

下载安装软件及创建安装目录

[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.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: creating src/include/pg_config_ext.h
config.status: creating src/interfaces/ecpg/include/ecpg_config.h
config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking src/backend/port/posix_sema.c to src/backend/port/pg_sema.c
config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking src/include/port/linux.h to src/include/pg_config_os.h
config.status: linking src/makefiles/Makefile.linux to src/Makefile.port

[root@ft2000db postgresql-13.1]# gmake //这里编译时间大约30分钟,如果失败一般都是系统依赖包原因,根据提示解决
.............................................................................................................

gmake[2]: 离开目录“/opt/postgresql-13.1/src/test/isolation”
gmake -C test/perl all
gmake[2]: 进入目录“/opt/postgresql-13.1/src/test/perl”
gmake[2]: 对“all”无需做任何事。
gmake[2]: 离开目录“/opt/postgresql-13.1/src/test/perl”
gmake[1]: 离开目录“/opt/postgresql-13.1/src”
gmake -C config all
gmake[1]: 进入目录“/opt/postgresql-13.1/config”
gmake[1]: 对“all”无需做任何事。
gmake[1]: 离开目录“/opt/postgresql-13.1/config”
All of PostgreSQL successfully made. Ready to install.

[root@ft2000db postgresql-13.1]#gmake install

..........................................................................................

gmake[1]: 离开目录“/opt/postgresql-13.1/src”
gmake -C config install
gmake[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]# /opt/pgsql/bin/postgres --version
postgres (PostgreSQL) 13.1

创建用户和组

[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 programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

PATH=/opt/pgsql/bin:$PATH
export PATH
LD_LIBRARY_PATH=/opt/pgsql/lib
export LD_LIBRARY_PATH

初始化数据库

[postgres@ft2000db ~]$ mkdir -p /opt/pgsql/data
[postgres@ft2000db ~]$ initdb -D /opt/pgsql/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 "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 ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Asia/Shanghai
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: 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 /opt/pgsql/data -l logfile start

启动数据库

[postgres@ft2000db ~]$ pg_ctl -D /opt/pgsql/data start
waiting 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-bit
2020-11-20 16:01:05.882 CST [34826] LOG: listening on IPv6 address "::1", port 5432
2020-11-20 16:01:05.882 CST [34826] LOG: listening on IPv4 address "127.0.0.1", port 5432
2020-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 CST
2020-11-20 16:01:05.887 CST [34826] LOG: database system is ready to accept connections
done
server started

登录数据库

[postgres@ft2000db ~]$ psql -p 5432
psql (13.1)
type "help" for help.

postgres=#

到此postgresql数据库安装完毕。

到此这篇关于开源数据库postgreSQL13在麒麟v10sp1源码安装过程详解的文章就介绍到这了,更多相关postgreSQL13在麒麟v10sp1源码安装内容请搜索程序员之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持程序员之家!

相关文章

  • PostgreSQL 实现子查询返回多行的案例

    PostgreSQL 实现子查询返回多行的案例

    这篇文章主要介绍了PostgreSQL 实现子查询返回多行的案例,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2021-01-01
  • PostgreSQL流复制参数max_wal_senders的用法说明

    PostgreSQL流复制参数max_wal_senders的用法说明

    这篇文章主要介绍了PostgreSQL流复制参数max_wal_senders的用法说明,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2020-12-12
  • PostgreSQL中实现自增的三种方式举例

    PostgreSQL中实现自增的三种方式举例

    很多小伙伴在把mysql数据库里面的表导入pgsql数据库的时候,会遇到新增数据的时候id不自增,这篇文章主要给大家介绍了关于PostgreSQL中实现自增的三种方式,需要的朋友可以参考下
    2024-02-02
  • PostgreSQL 恢复误删数据的操作

    PostgreSQL 恢复误删数据的操作

    这篇文章主要介绍了PostgreSQL 恢复误删数据的操作,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2021-01-01
  • PostgreSQL 更新视图脚本的注意事项说明

    PostgreSQL 更新视图脚本的注意事项说明

    这篇文章主要介绍了PostgreSQL 更新视图脚本的注意事项说明,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2021-01-01
  • Windows下PostgreSQL安装图解

    Windows下PostgreSQL安装图解

    这篇文章主要为大家介绍了如果在Windows下安装PostgreSQL数据库的方法,需要的朋友可以参考下
    2013-11-11
  • PostgreSQL 自动Vacuum配置方式

    PostgreSQL 自动Vacuum配置方式

    这篇文章主要介绍了PostgreSQL 自动Vacuum配置方式,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2021-01-01
  • PostgreSQL教程(十五):系统表详解

    PostgreSQL教程(十五):系统表详解

    这篇文章主要介绍了PostgreSQL教程(十五):系统表详解,本文讲解了pg_class、pg_attribute、pg_attrdef、pg_authid、pg_auth_members、pg_constraint、pg_tablespace、pg_namespace、pg_database等表的作用和字段介绍,需要的朋友可以参考下
    2015-05-05
  • postgresql 导入数据库表并重设自增属性的操作

    postgresql 导入数据库表并重设自增属性的操作

    这篇文章主要介绍了postgresql 导入数据库表并重设自增属性的操作,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2021-01-01
  • PostgreSQL教程(七):函数和操作符详解(3)

    PostgreSQL教程(七):函数和操作符详解(3)

    这篇文章主要介绍了PostgreSQL教程(七):函数和操作符详解(3),本文讲解了序列操作函数、条件表达式、数组函数和操作符、系统信息函数、系统管理函数等内容,需要的朋友可以参考下
    2015-05-05

最新评论

?


http://www.vxiaotou.com