当前位置: 首页 > news >正文

免费的求职简历模板网站做彩票网站代理犯法吗

免费的求职简历模板网站,做彩票网站代理犯法吗,提交谷歌网站,网站建设和维护要花多少钱【PostgreSQL】从零开始:#xff08;二#xff09;PostgreSQL下载与安装 Winodws环境下载与安装PostgreSQL下载PostgreSQL安装PostgreSQL1.登录数据库2.查看下我们已有的数据库 Liunx环境下载与安装PostgreSQL使用YUM下载安装PostgreSQL1.下载PostgreSQL安装包2.安装PostgreS… 【PostgreSQL】从零开始:二PostgreSQL下载与安装 Winodws环境下载与安装PostgreSQL下载PostgreSQL安装PostgreSQL1.登录数据库2.查看下我们已有的数据库 Liunx环境下载与安装PostgreSQL使用YUM下载安装PostgreSQL1.下载PostgreSQL安装包2.安装PostgreSQL3.初始化数据4.设置为开机启动5.启动数据库6.查看进程7.登录数据库 下载源码包编译安装通过官网下载 使用wget1.安装规划2.创建用户组及用户并修改密码3.修改root用户配置参数并让其生效4.创建相关目录并授权5.安装相关依赖6.下载PostgreSQL源码文件2.校验文件3.解压源码文件7.进入数据库源文件目录给configure加运行权限8.执行以下语句开始编译PostgreSQL9.查看数据库文件10.配置postgres用户环境变量11.创建数据库实例12.启动数据库13.登陆数据库14.设置开机自起 Winodws环境下载与安装PostgreSQL 下载PostgreSQL 也可以直接丁路到EDB网站直接下载 【下载地址】 安装PostgreSQL 安装完成后如果勾选Stack Builder may be used to download and install additional tools,drivers and applications to complement your PostgreSQL installation. 在Finish之后会运行Stack Builder可用于下载和安装附加的工具、驱动程序和应用程序以补充PostgreSQL安装。可以不勾选勾选了会运行 Stack Builder安装插件。本次安装不附带Stack Builder安装附录1可以了解Stack Builder安装插件相关内容 1.登录数据库 2.查看下我们已有的数据库 Liunx环境下载与安装PostgreSQL 使用YUM下载安装PostgreSQL 下面我们来演示一下 1.下载PostgreSQL安装包 https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm执行结果: [rootpostgre-sql ~]# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm 已加载插件fastestmirror pgdg-redhat-repo-latest.noarch.rpm | 8.6 kB 00:00:00 正在检查 /var/tmp/yum-root-rFo7Yw/pgdg-redhat-repo-latest.noarch.rpm: pgdg-redhat-repo-42.0-32.noarch /var/tmp/yum-root-rFo7Yw/pgdg-redhat-repo-latest.noarch.rpm 将被安装 正在解决依赖关系 -- 正在检查事务 --- 软件包 pgdg-redhat-repo.noarch.0.42.0-32 将被 安装 -- 解决依赖关系完成依赖关系解决Package 架构 版本 源 大小正在安装:pgdg-redhat-repo noarch 42.0-32 /pgdg-redhat-repo-latest.noarch 13 k事务概要安装 1 软件包总计13 k 安装大小13 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction正在安装 : pgdg-redhat-repo-42.0-32.noarch 1/1 验证中 : pgdg-redhat-repo-42.0-32.noarch 1/1 已安装:pgdg-redhat-repo.noarch 0:42.0-32 完毕 [rootpostgre-sql ~]# 2.安装PostgreSQL 折腾了半天发现centos7的yum只有PostgreSQL15版本见附录2那我们就以15作为演示 yum install -y postgresql15-server执行结果 [rootpostgre-sql ~]# yum install -y postgresql15-server 已加载插件fastestmirror Loading mirror speeds from cached hostfile 正在解决依赖关系 -- 正在检查事务 --- 软件包 postgresql15-server.x86_64.0.15.5-1PGDG.rhel7 将被 安装 -- 正在处理依赖关系 postgresql15-libs(x86-64) 15.5-1PGDG.rhel7它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在处理依赖关系 postgresql15(x86-64) 15.5-1PGDG.rhel7它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在处理依赖关系 libzstd.so.1()(64bit)它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在处理依赖关系 libpq.so.5()(64bit)它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在处理依赖关系 libicuuc.so.50()(64bit)它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在处理依赖关系 libicui18n.so.50()(64bit)它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在检查事务 --- 软件包 libicu.x86_64.0.50.2-4.el7_7 将被 安装 --- 软件包 postgresql15.x86_64.0.15.5-1PGDG.rhel7 将被 安装 -- 正在处理依赖关系 libzstd 1.4.0它被软件包 postgresql15-15.5-1PGDG.rhel7.x86_64 需要 -- 正在处理依赖关系 libzstd.so.1()(64bit)它被软件包 postgresql15-15.5-1PGDG.rhel7.x86_64 需要 --- 软件包 postgresql15-libs.x86_64.0.15.5-1PGDG.rhel7 将被 安装 --- 软件包 postgresql15-server.x86_64.0.15.5-1PGDG.rhel7 将被 安装 -- 正在处理依赖关系 libzstd.so.1()(64bit)它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 解决依赖关系完成 错误软件包postgresql15-server-15.5-1PGDG.rhel7.x86_64 (pgdg15)需要libzstd.so.1()(64bit) 错误软件包postgresql15-15.5-1PGDG.rhel7.x86_64 (pgdg15)需要libzstd.so.1()(64bit) 错误软件包postgresql15-15.5-1PGDG.rhel7.x86_64 (pgdg15)需要libzstd 1.4.0您可以尝试添加 --skip-broken 选项来解决该问题您可以尝试执行rpm -Va --nofiles --nodigest [rootpostgre-sql ~]# 提示我们缺少包libzstd.so.1libzstd 1.4.0 执行 yum install epel-release.noarch -y yum install libzstd.x86_64 -y执行结果 [rootpostgre-sql ~]# yum install epel-release.noarch -y 已加载插件fastestmirror Loading mirror speeds from cached hostfile 正在解决依赖关系 -- 正在检查事务 --- 软件包 epel-release.noarch.0.7-11 将被 安装 -- 解决依赖关系完成依赖关系解决Package 架构 版本 源 大小正在安装:epel-release noarch 7-11 extras 15 k事务概要安装 1 软件包总下载量15 k 安装大小24 k Downloading packages: epel-release-7-11.noarch.rpm | 15 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction正在安装 : epel-release-7-11.noarch 1/1 验证中 : epel-release-7-11.noarch 1/1 已安装:epel-release.noarch 0:7-11 完毕 [rootpostgre-sql ~]# yum install libzstd.x86_64 -y 已加载插件fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | 7.0 kB 00:00:00 * epel: mirror.nyist.edu.cn epel | 4.7 kB 00:00:00 (1/3): epel/x86_64/group_gz | 99 kB 00:00:00 (2/3): epel/x86_64/updateinfo | 1.0 MB 00:00:00 (3/3): epel/x86_64/primary_db | 7.0 MB 00:00:00 正在解决依赖关系 -- 正在检查事务 --- 软件包 libzstd.x86_64.0.1.5.5-1.el7 将被 安装 -- 解决依赖关系完成依赖关系解决Package 架构 版本 源 大小正在安装:libzstd x86_64 1.5.5-1.el7 epel 292 k事务概要安装 1 软件包总下载量292 k 安装大小775 k Downloading packages: 警告/var/cache/yum/x86_64/7/epel/packages/libzstd-1.5.5-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 352c64e5: NOKEY 0% [ ] 0.0 B/s | 0 B --:--:-- ETA libzstd-1.5.5-1.el7.x86_64.rpm 的公钥尚未安装 libzstd-1.5.5-1.el7.x86_64.rpm | 292 kB 00:00:00 从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 检索密钥 导入 GPG key 0x352C64E5:用户ID : Fedora EPEL (7) epelfedoraproject.org指纹 : 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5软件包 : epel-release-7-11.noarch (extras)来自 : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Running transaction check Running transaction test Transaction test succeeded Running transaction正在安装 : libzstd-1.5.5-1.el7.x86_64 1/1 验证中 : libzstd-1.5.5-1.el7.x86_64 1/1 已安装:libzstd.x86_64 0:1.5.5-1.el7 完毕 [rootpostgre-sql ~]# 再次执行 yum install -y postgresql15-server执行结果 [rootpostgre-sql ~]# yum install -y postgresql15-server 已加载插件fastestmirror Loading mirror speeds from cached hostfile* epel: mirror.nyist.edu.cn 正在解决依赖关系 -- 正在检查事务 --- 软件包 postgresql15-server.x86_64.0.15.5-1PGDG.rhel7 将被 安装 -- 正在处理依赖关系 postgresql15-libs(x86-64) 15.5-1PGDG.rhel7它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在处理依赖关系 postgresql15(x86-64) 15.5-1PGDG.rhel7它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在处理依赖关系 libpq.so.5()(64bit)它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在处理依赖关系 libicuuc.so.50()(64bit)它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在处理依赖关系 libicui18n.so.50()(64bit)它被软件包 postgresql15-server-15.5-1PGDG.rhel7.x86_64 需要 -- 正在检查事务 --- 软件包 libicu.x86_64.0.50.2-4.el7_7 将被 安装 --- 软件包 postgresql15.x86_64.0.15.5-1PGDG.rhel7 将被 安装 --- 软件包 postgresql15-libs.x86_64.0.15.5-1PGDG.rhel7 将被 安装 -- 解决依赖关系完成依赖关系解决Package 架构 版本 源 大小正在安装:postgresql15-server x86_64 15.5-1PGDG.rhel7 pgdg15 5.8 M 为依赖而安装:libicu x86_64 50.2-4.el7_7 base 6.9 Mpostgresql15 x86_64 15.5-1PGDG.rhel7 pgdg15 1.6 Mpostgresql15-libs x86_64 15.5-1PGDG.rhel7 pgdg15 284 k事务概要安装 1 软件包 (3 依赖软件包)总下载量15 M 安装大小58 M Downloading packages: (1/4): libicu-50.2-4.el7_7.x86_64.rpm | 6.9 MB 00:00:01 warning: /var/cache/yum/x86_64/7/pgdg15/packages/postgresql15-15.5-1PGDG.rhel7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY 52% [ ] 3.3 MB/s | 7.6 MB 00:00:02 ETA postgresql15-15.5-1PGDG.rhel7.x86_64.rpm 的公钥尚未安装 (2/4): postgresql15-15.5-1PGDG.rhel7.x86_64.rpm | 1.6 MB 00:00:03 (3/4): postgresql15-server-15.5-1PGDG.rhel7.x86_64.rpm | 5.8 MB 00:00:00 (4/4): postgresql15-libs-15.5-1PGDG.rhel7.x86_64.rpm | 284 kB 00:00:07 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 总计 1.9 MB/s | 15 MB 00:00:07 从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG 检索密钥 导入 GPG key 0x442DF0F8:用户ID : PostgreSQL RPM Building Project pgsql-pkg-yumpostgresql.org指纹 : 68c9 e2b9 1a37 d136 fe74 d176 1f16 d2e1 442d f0f8软件包 : pgdg-redhat-repo-42.0-32.noarch (/pgdg-redhat-repo-latest.noarch)来自 : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG Running transaction check Running transaction test Transaction test succeeded Running transaction正在安装 : libicu-50.2-4.el7_7.x86_64 1/4 正在安装 : postgresql15-libs-15.5-1PGDG.rhel7.x86_64 2/4 正在安装 : postgresql15-15.5-1PGDG.rhel7.x86_64 3/4 正在安装 : postgresql15-server-15.5-1PGDG.rhel7.x86_64 4/4 验证中 : postgresql15-15.5-1PGDG.rhel7.x86_64 1/4 验证中 : postgresql15-server-15.5-1PGDG.rhel7.x86_64 2/4 验证中 : postgresql15-libs-15.5-1PGDG.rhel7.x86_64 3/4 验证中 : libicu-50.2-4.el7_7.x86_64 4/4 已安装:postgresql15-server.x86_64 0:15.5-1PGDG.rhel7 作为依赖被安装:libicu.x86_64 0:50.2-4.el7_7 postgresql15.x86_64 0:15.5-1PGDG.rhel7 postgresql15-libs.x86_64 0:15.5-1PGDG.rhel7 完毕 [rootpostgre-sql ~]# 3.初始化数据 [rootpostgre-sql ~]# /usr/pgsql-15/bin/postgresql-15-setup initdb Initializing database ... OK [rootpostgre-sql ~]# 4.设置为开机启动 [rootpostgre-sql ~]# systemctl enable postgresql-15 Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-15.service to /usr/lib/systemd/system/postgresql-15.service. [rootpostgre-sql ~]# 5.启动数据库 [rootpostgre-sql ~]# systemctl start postgresql-15 [rootpostgre-sql ~]6.查看进程 [rootpostgre-sql ~]# ps -ef | grep postgres postgres 3374 1 0 12:38 ? 00:00:00 /usr/pgsql-15/bin/postmaster -D /var/lib/pgsql/15/data/ postgres 3376 3374 0 12:38 ? 00:00:00 postgres: logger postgres 3377 3374 0 12:38 ? 00:00:00 postgres: checkpointer postgres 3378 3374 0 12:38 ? 00:00:00 postgres: background writer postgres 3380 3374 0 12:38 ? 00:00:00 postgres: walwriter postgres 3381 3374 0 12:38 ? 00:00:00 postgres: autovacuum launcher postgres 3382 3374 0 12:38 ? 00:00:00 postgres: logical replication launcher root 3411 3049 0 12:41 pts/1 00:00:00 grep --colorauto postgres [rootpostgre-sql ~]# 7.登录数据库 [rootpostgre-sql ~]# su - postgres bash-4.2$ psql psql (15.5) 输入 help 来获取帮助信息. postgres# 注意:默认用户是postgres密码是没有的 需要进入数据后修改密码 postgres# \du角色列表角色名称 | 属性 | 成员属于 ----------------------------------------------------------------postgres | 超级用户, 建立角色, 建立 DB, 复制, 绕过RLS | {}postgres# alter user postgres with password 12345678ab; ALTER ROLE postgres# 验证密码是否正确 bash-4.2$ psql -h127.0.0.1 -U postgres postgres 用户 postgres 的口令 psql (15.5) 输入 help 来获取帮助信息. postgres# 下载源码包编译安装 可以通过官网下载也可以使用wget下载 通过官网下载 使用wget 1.安装规划 数据库用户 POSTGRESQL_USERpostgres 数据库用户组 POSTGRESQL_GROUPpostgres 数据库安装文件路径 POSTGRESQL_INSTALL_PATH/root/postgresql_install 数据库版本号 POSTGRESQL_VERSION16.1 数据库安装路径 POSTGRESQL_PATH/opt/postgresql- P O S T G R E S Q L V E R S I O N 数据库端口号 P O S T G R E S Q L P O R T 5432 数据库 D A T A 存放路径 P O S T G R E S Q L D A T A / d a t a / {POSTGRESQL_VERSION} 数据库端口号 POSTGRESQL_PORT5432 数据库DATA存放路径 POSTGRESQL_DATA/data/ POSTGRESQLV​ERSION数据库端口号POSTGRESQLP​ORT5432数据库DATA存放路径POSTGRESQLD​ATA/data/{POSTGRESQL_VERSION}/data 2.创建用户组及用户并修改密码 [rootpostgre-sql ~]# groupadd postgres [rootpostgre-sql ~]# useradd -g postgres postgres [rootpostgre-sql ~]# passwd postgres 新的 密码 无效的密码 密码未通过字典检查 - 过于简单化/系统化 重新输入新的 密码 passwd所有的身份验证令牌已经成功更新。 [rootpostgre-sql ~]# 3.修改root用户配置参数并让其生效 [rootpostgre-sql ~]# vi .bash_profile [rootpostgre-sql ~]# cat .bash_profile # .bash_profile# Get the aliases and functions if [ -f ~/.bashrc ]; then. ~/.bashrc fi# User specific environment and startup programsPATH$PATH:$HOME/bin# 新增的Postgre自定义配置 export POSTGRESQL_USERpostgres export POSTGRESQL_GROUPpostgres export POSTGRESQL_INSTALL_PATH/root/postgresql_install export POSTGRESQL_VERSION16.1 export POSTGRESQL_PATH/opt/postgresql-${POSTGRESQL_VERSION} export POSTGRESQL_PORT5432 export POSTGRESQL_DATA/data/${POSTGRESQL_VERSION}/data N}/dataexport PATH [rootpostgre-sql ~]# source .bash_profile [rootpostgre-sql ~]# echo ${POSTGRESQL_VERSION} 16.1 [rootpostgre-sql ~]# 4.创建相关目录并授权 [rootpostgre-sql ~]# mkdir -p ${POSTGRESQL_INSTALL_PATH} [rootpostgre-sql ~]# mkdir -p ${POSTGRESQL_PATH} [rootpostgre-sql ~]# mkdir -p ${POSTGRESQL_DATA} [rootpostgre-sql ~]# chown -R postgres:postgres /data [rootpostgre-sql ~]# chown -R postgres:postgres /root/postgresql_install [rootpostgre-sql ~]# chown -R postgres:postgres /opt/postgresql-16.1/ 5.安装相关依赖 yum -y install bzip2 gcc gcc-c epel-release llvm5.0 llvm5.0-devel clang libicu-devel perl-ExtUtils-Embed zlib-devel openssl openssl-devel pam-devel libxml2-devel libxslt-devel openldap-devel systemd-devel tcl-devel python-devel 6.下载PostgreSQL源码文件 [rootpostgre-sql ~]# cd postgresql_install/ [rootpostgre-sql postgresql_install]# wget https://ftp.postgresql.org/pub/source/v16.1/postgresql-16.1.tar.bz2 --no-check-certificate --2023-12-13 15:11:38-- https://ftp.postgresql.org/pub/source/v16.1/postgresql-16.1.tar.bz2 正在解析主机 ftp.postgresql.org (ftp.postgresql.org)... 147.75.85.69, 217.196.149.55, 72.32.157.246, ... 正在连接 ftp.postgresql.org (ftp.postgresql.org)|147.75.85.69|:443... 失败拒绝连接。 正在连接 ftp.postgresql.org (ftp.postgresql.org)|217.196.149.55|:443... 已连接。 警告: 无法验证 ftp.postgresql.org 的由 “/CUS/OLets Encrypt/CNR3” 颁发的证书:颁发的证书已经过期。 已发出 HTTP 请求正在等待回应... 200 OK 长度24605482 (23M) [application/octet-stream] 正在保存至: “postgresql-16.1.tar.bz2”100%[] 24,605,482 5.53MB/s 用时 4.2s 2023-12-13 15:12:05 (5.53 MB/s) - 已保存 “postgresql-16.1.tar.bz2” [24605482/24605482])[rootpostgre-sql postgresql_install]# wget https://ftp.postgresql.org/pub/source/v16.1/postgresql-16.1.tar.bz2.md5 --no-check-certificate --2023-12-13 15:12:18-- https://ftp.postgresql.org/pub/source/v16.1/postgresql-16.1.tar.bz2.md5 正在解析主机 ftp.postgresql.org (ftp.postgresql.org)... 217.196.149.55, 72.32.157.246, 87.238.57.227, ... 正在连接 ftp.postgresql.org (ftp.postgresql.org)|217.196.149.55|:443... 已连接。 警告: 无法验证 ftp.postgresql.org 的由 “/CUS/OLets Encrypt/CNR3” 颁发的证书:颁发的证书已经过期。 已发出 HTTP 请求正在等待回应... 200 OK 长度58 [text/plain] 正在保存至: “postgresql-16.1.tar.bz2.md5”100%[] 58 --.-K/s 用时 0s 2023-12-13 15:12:20 (7.99 MB/s) - 已保存 “postgresql-16.1.tar.bz2.md5” [58/58])[rootpostgre-sql postgresql_install]# ls -l 总用量 24036 -rw-r--r--. 1 root root 24605482 11月 7 06:19 postgresql-16.1.tar.bz2 -rw-r--r--. 1 root root 58 11月 7 06:19 postgresql-16.1.tar.bz2.md5 [rootpostgre-sql postgresql_install]# 2.校验文件 [rootpostgre-sql postgresql_install]# md5sum postgresql-16.1.tar.bz2 9cbfb9076ed06384471802b850698a6d postgresql-16.1.tar.bz2 [rootpostgre-sql postgresql_install]# cat postgresql-16.1.tar.bz2.md5 9cbfb9076ed06384471802b850698a6d postgresql-16.1.tar.bz2 [rootpostgre-sql postgresql_install]# 两个MD5值一致就代表包是完整的 3.解压源码文件 [rootpostgre-sql postgresql_install]# tar -xjvf postgresql-16.1.tar.bz2 [rootpostgre-sql postgresql_install]# ls -l 总用量 24040 drwxrwxrwx. 6 1107 1107 4096 11月 7 06:18 postgresql-16.1 -rw-r--r--. 1 root root 24605482 11月 7 06:19 postgresql-16.1.tar.bz2 -rw-r--r--. 1 root root 58 11月 7 06:19 postgresql-16.1.tar.bz2.md5 [rootpostgre-sql postgresql_install]# 7.进入数据库源文件目录给configure加运行权限 [rootpostgre-sql postgre_install]# cd postgresql-16.1/ [rootpostgre-sql postgresql-16.1]# chmod x configure8.执行以下语句开始编译PostgreSQL ./configure --prefix${POSTGRESQL_PATH} --with-pgport${POSTGRESQL_PORT} make make install然后再执行 9.查看数据库文件 [rootpostgre-sql postgresql-16.1]# cd /opt/postgresql-16.1/ [rootpostgre-sql postgresql-16.1]# ls -l 总用量 16 drwxr-xr-x. 2 root root 4096 12月 13 14:15 bin drwxr-xr-x. 6 root root 4096 12月 13 14:15 include drwxr-xr-x. 4 root root 4096 12月 13 14:15 lib drwxr-xr-x. 6 root root 4096 12月 13 14:15 share [rootpostgre-sql postgresql-16.1]# 这里我们已经编译成功了 10.配置postgres用户环境变量 [postgrespostgre-sql ~]$ vi .bash_profile [postgrespostgre-sql ~]$ cat .bash_profile # .bash_profile# Get the aliases and functions if [ -f ~/.bashrc ]; then. ~/.bashrc fi# User specific environment and startup programsPATH$PATH:$HOME/.local/bin:$HOME/bin ## 新添加配置 export POSTGRESQL_USERpostgres export POSTGRESQL_GROUPpostgres export POSTGRESQL_INSTALL_PATH/root/postgresql_install export POSTGRESQL_VERSION16.1 export POSTGRESQL_PATH/opt/postgresql-${POSTGRESQL_VERSION} export POSTGRESQL_PORT5432 export POSTGRESQL_DATA/data/${POSTGRESQL_VERSION}/data export LD_LIBRARY_PATH${POSTGRESQL_PATH}/lib:/usr/local/lib:$LD_LIBRARY_PATH export PATH${POSTGRESQL_PATH}/bin:$PATH export PGDATA${POSTGRESQL_DATA}export PATH [postgrespostgre-sql ~]$ source .bash_profile [postgrespostgre-sql ~]$ echo $PGDATA /data/16.1/data [postgrespostgre-sql ~]$ 11.创建数据库实例 [postgrespostgre-sql ~]$ initdb -A md5 -D $PGDATA -E UTF8 --pwfile(printf %s 12345678ab) 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. 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.creating directory /data/16.1/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 ... okSuccess. You can now start the database server using:pg_ctl -D /data/16.1/data -l logfile start[postgrespostgre-sql ~]$12.启动数据库 [postgrespostgre-sql ~]$ pg_ctl -D /data/16.1/data start waiting for server to start....2023-12-13 15:51:24.695 CST [28517] LOG: starting PostgreSQL 16.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit 2023-12-13 15:51:24.698 CST [28517] LOG: listening on IPv6 address ::1, port 5432 2023-12-13 15:51:24.698 CST [28517] LOG: listening on IPv4 address 127.0.0.1, port 5432 2023-12-13 15:51:24.701 CST [28517] LOG: listening on Unix socket /tmp/.s.PGSQL.5432 2023-12-13 15:51:24.707 CST [28520] LOG: database system was shut down at 2023-12-13 15:51:14 CST 2023-12-13 15:51:24.710 CST [28517] LOG: database system is ready to accept connectionsdone server started [postgrespostgre-sql ~]$ 13.登陆数据库 [postgrespostgre-sql ~]$ psql -U postgres -d postgres Password for user postgres: psql (16.1) Type help for help.postgres# \lList of databasesName | Owner | Encoding | Locale Provider | Collate | Ctype | ICU Locale | ICU Rules | Access privileges ------------------------------------------------------------------------------------------------------------------------postgres | postgres | UTF8 | libc | zh_CN.UTF-8 | zh_CN.UTF-8 | | | template0 | postgres | UTF8 | libc | zh_CN.UTF-8 | zh_CN.UTF-8 | | | c/postgres | | | | | | | | postgresCTc/postgrestemplate1 | postgres | UTF8 | libc | zh_CN.UTF-8 | zh_CN.UTF-8 | | | c/postgres | | | | | | | | postgresCTc/postgres (3 rows)postgres# 登陆数据库并查看到了数据库列表到这里部署已经完成了 14.设置开机自起 [rootpostgre-sql ~]# cat /usr/lib/systemd/system/postgresql.service -EOF [Unit] DescriptionPostgreSQL v${POSTGRESQL_VERSION} database server Documentationhttps://www.postgresql.org Requiresnetwork.target local-fs.target Afternetwork.target local-fs.target[Service] TypeforkingUserpostgres GrouppostgresEnvironmentPGDATA/data/${POSTGRESQL_VERSION}/dataOOMScoreAdjust-1000ExecStart${POSTGRESQL_PATH}/bin/pg_ctl start -D \${PGDATA} ExecStop${POSTGRESQL_PATH}/bin/pg_ctl stop -D \${PGDATA} ExecReload${POSTGRESQL_PATH}/bin/pg_ctl reload -D \${PGDATA} ExecRestart${POSTGRESQL_PATH}/bin/pg_ctl restart -D \${PGDATA} TimeoutSec0[Install] WantedBymulti-user.target EOF [rootpostgre-sql ~]# systemctl daemon-reload [rootpostgre-sql ~]# systemctl enable --now postgresql.service Postgis 是数据库地理信息位图的插件用户开启GIS拓展 pem-httpd 是http服务工具 [rootpostgre-sql ~]# yum search postgresql1 已加载插件fastestmirror Loading mirror speeds from cached hostfileN/S matched: postgresql1 postgresql12-odbc-debuginfo.x86_64 : Debug information for package postgresql12-odbc postgresql11.x86_64 : PostgreSQL client programs and libraries postgresql11-contrib.x86_64 : Contributed source and binaries distributed with PostgreSQL postgresql11-devel.x86_64 : PostgreSQL development header files and libraries postgresql11-docs.x86_64 : Extra documentation for PostgreSQL postgresql11-libs.x86_64 : The shared libraries required for any PostgreSQL clients postgresql11-llvmjit.x86_64 : Just-in-time compilation support for PostgreSQL postgresql11-odbc.x86_64 : PostgreSQL ODBC driver postgresql11-plperl.x86_64 : The Perl procedural language for PostgreSQL postgresql11-plpython.x86_64 : The Python procedural language for PostgreSQL postgresql11-plpython3.x86_64 : The Python3 procedural language for PostgreSQL postgresql11-pltcl.x86_64 : The Tcl procedural language for PostgreSQL postgresql11-server.x86_64 : The programs needed to create and run a PostgreSQL server postgresql11-tcl.x86_64 : A Tcl client library for PostgreSQL postgresql11-test.x86_64 : The test suite distributed with PostgreSQL postgresql12.x86_64 : PostgreSQL client programs and libraries postgresql12-contrib.x86_64 : Contributed source and binaries distributed with PostgreSQL postgresql12-devel.x86_64 : PostgreSQL development header files and libraries postgresql12-docs.x86_64 : Extra documentation for PostgreSQL postgresql12-libs.x86_64 : The shared libraries required for any PostgreSQL clients postgresql12-llvmjit.x86_64 : Just-in-time compilation support for PostgreSQL postgresql12-odbc.x86_64 : PostgreSQL ODBC driver postgresql12-plperl.x86_64 : The Perl procedural language for PostgreSQL postgresql12-plpython.x86_64 : The Python procedural language for PostgreSQL postgresql12-plpython3.x86_64 : The Python3 procedural language for PostgreSQL postgresql12-pltcl.x86_64 : The Tcl procedural language for PostgreSQL postgresql12-server.x86_64 : The programs needed to create and run a PostgreSQL server postgresql12-tcl.x86_64 : A Tcl client library for PostgreSQL postgresql12-test.x86_64 : The test suite distributed with PostgreSQL postgresql13.x86_64 : PostgreSQL client programs and libraries postgresql13-contrib.x86_64 : Contributed source and binaries distributed with PostgreSQL postgresql13-devel.x86_64 : PostgreSQL development header files and libraries postgresql13-docs.x86_64 : Extra documentation for PostgreSQL postgresql13-libs.x86_64 : The shared libraries required for any PostgreSQL clients postgresql13-llvmjit.x86_64 : Just-in-time compilation support for PostgreSQL postgresql13-odbc.x86_64 : PostgreSQL ODBC driver postgresql13-plperl.x86_64 : The Perl procedural language for PostgreSQL postgresql13-plpython3.x86_64 : The Python3 procedural language for PostgreSQL postgresql13-pltcl.x86_64 : The Tcl procedural language for PostgreSQL postgresql13-server.x86_64 : The programs needed to create and run a PostgreSQL server postgresql13-test.x86_64 : The test suite distributed with PostgreSQL postgresql14.x86_64 : PostgreSQL client programs and libraries postgresql14-contrib.x86_64 : Contributed source and binaries distributed with PostgreSQL postgresql14-devel.x86_64 : PostgreSQL development header files and libraries postgresql14-docs.x86_64 : Extra documentation for PostgreSQL postgresql14-libs.x86_64 : The shared libraries required for any PostgreSQL clients postgresql14-llvmjit.x86_64 : Just-in-time compilation support for PostgreSQL postgresql14-odbc.x86_64 : PostgreSQL ODBC driver postgresql14-plperl.x86_64 : The Perl procedural language for PostgreSQL postgresql14-plpython3.x86_64 : The Python3 procedural language for PostgreSQL postgresql14-pltcl.x86_64 : The Tcl procedural language for PostgreSQL postgresql14-server.x86_64 : The programs needed to create and run a PostgreSQL server postgresql14-tcl.x86_64 : A Tcl client library for PostgreSQL postgresql14-test.x86_64 : The test suite distributed with PostgreSQL postgresql15.x86_64 : PostgreSQL client programs and libraries postgresql15-contrib.x86_64 : Contributed source and binaries distributed with PostgreSQL postgresql15-devel.x86_64 : PostgreSQL development header files and libraries postgresql15-docs.x86_64 : Extra documentation for PostgreSQL postgresql15-libs.x86_64 : The shared libraries required for any PostgreSQL clients postgresql15-llvmjit.x86_64 : Just-in-time compilation support for PostgreSQL postgresql15-odbc.x86_64 : PostgreSQL ODBC driver postgresql15-plperl.x86_64 : The Perl procedural language for PostgreSQL postgresql15-plpython3.x86_64 : The Python3 procedural language for PostgreSQL postgresql15-pltcl.x86_64 : The Tcl procedural language for PostgreSQL postgresql15-server.x86_64 : The programs needed to create and run a PostgreSQL server postgresql15-tcl.x86_64 : A Tcl client library for PostgreSQL postgresql15-test.x86_64 : The test suite distributed with PostgreSQL名称和简介匹配 only使用“search all”试试。 [rootpostgre-sql ~]# Stack Builder Add-ons,tools and utilities的展开项是插件: EDB language PACK 是pgAdmin工具的中文包 pgAgent 是pg数据库计划任务插件用来实现PostgreSQL 的自动任务执行 pgBouncer是 PostgreSQL的轻量的连接池 Database Drivers的展开项是数据库驱动 Database Server的展开项是数据库服务 migrationtoolkit 是数据库的迁移工具 PEM SQL profiler pulgin 是数据库的性能监控工具 Postgres Enterprise Manager 是postgresql管理和监控工具 replication server 是postgresql复制服务用于搭建集群 sql/protect 是数据库的防火墙工具 ↩︎ PostgreSQL yum支持列表 更多信息查看 https://yum.postgresql.org/packages/#pg11 ↩︎
文章转载自:
http://www.morning.rlqwz.cn.gov.cn.rlqwz.cn
http://www.morning.hjwzpt.com.gov.cn.hjwzpt.com
http://www.morning.mtjwp.cn.gov.cn.mtjwp.cn
http://www.morning.rfdqr.cn.gov.cn.rfdqr.cn
http://www.morning.zrwlz.cn.gov.cn.zrwlz.cn
http://www.morning.qykxj.cn.gov.cn.qykxj.cn
http://www.morning.dkslm.cn.gov.cn.dkslm.cn
http://www.morning.lhxrn.cn.gov.cn.lhxrn.cn
http://www.morning.gkmwk.cn.gov.cn.gkmwk.cn
http://www.morning.mlbdr.cn.gov.cn.mlbdr.cn
http://www.morning.wpsfc.cn.gov.cn.wpsfc.cn
http://www.morning.qymqh.cn.gov.cn.qymqh.cn
http://www.morning.tgmfg.cn.gov.cn.tgmfg.cn
http://www.morning.yqsq.cn.gov.cn.yqsq.cn
http://www.morning.mrfjr.cn.gov.cn.mrfjr.cn
http://www.morning.dygsz.cn.gov.cn.dygsz.cn
http://www.morning.fbnsx.cn.gov.cn.fbnsx.cn
http://www.morning.rglzy.cn.gov.cn.rglzy.cn
http://www.morning.kyflr.cn.gov.cn.kyflr.cn
http://www.morning.npxht.cn.gov.cn.npxht.cn
http://www.morning.wsnbg.cn.gov.cn.wsnbg.cn
http://www.morning.yrck.cn.gov.cn.yrck.cn
http://www.morning.tgyqq.cn.gov.cn.tgyqq.cn
http://www.morning.xywfz.cn.gov.cn.xywfz.cn
http://www.morning.zlcsz.cn.gov.cn.zlcsz.cn
http://www.morning.bkppb.cn.gov.cn.bkppb.cn
http://www.morning.mhmdx.cn.gov.cn.mhmdx.cn
http://www.morning.tyhfz.cn.gov.cn.tyhfz.cn
http://www.morning.bksbx.cn.gov.cn.bksbx.cn
http://www.morning.xdfkrd.cn.gov.cn.xdfkrd.cn
http://www.morning.gkgr.cn.gov.cn.gkgr.cn
http://www.morning.wwkft.cn.gov.cn.wwkft.cn
http://www.morning.jzxqj.cn.gov.cn.jzxqj.cn
http://www.morning.zpzys.cn.gov.cn.zpzys.cn
http://www.morning.hfytgp.cn.gov.cn.hfytgp.cn
http://www.morning.bnmfq.cn.gov.cn.bnmfq.cn
http://www.morning.mxnrl.cn.gov.cn.mxnrl.cn
http://www.morning.btqqh.cn.gov.cn.btqqh.cn
http://www.morning.zwfgh.cn.gov.cn.zwfgh.cn
http://www.morning.sffkm.cn.gov.cn.sffkm.cn
http://www.morning.yrxcn.cn.gov.cn.yrxcn.cn
http://www.morning.blznh.cn.gov.cn.blznh.cn
http://www.morning.cjwkf.cn.gov.cn.cjwkf.cn
http://www.morning.pznhn.cn.gov.cn.pznhn.cn
http://www.morning.sjjtz.cn.gov.cn.sjjtz.cn
http://www.morning.mooncore.cn.gov.cn.mooncore.cn
http://www.morning.xjwtq.cn.gov.cn.xjwtq.cn
http://www.morning.fpkdd.cn.gov.cn.fpkdd.cn
http://www.morning.spfq.cn.gov.cn.spfq.cn
http://www.morning.nwcgj.cn.gov.cn.nwcgj.cn
http://www.morning.ghxtk.cn.gov.cn.ghxtk.cn
http://www.morning.ynlbj.cn.gov.cn.ynlbj.cn
http://www.morning.wqcbr.cn.gov.cn.wqcbr.cn
http://www.morning.qyfrd.cn.gov.cn.qyfrd.cn
http://www.morning.pdghl.cn.gov.cn.pdghl.cn
http://www.morning.wyppp.cn.gov.cn.wyppp.cn
http://www.morning.caswellintl.com.gov.cn.caswellintl.com
http://www.morning.kyflr.cn.gov.cn.kyflr.cn
http://www.morning.dbnrl.cn.gov.cn.dbnrl.cn
http://www.morning.qwpyf.cn.gov.cn.qwpyf.cn
http://www.morning.wpmqq.cn.gov.cn.wpmqq.cn
http://www.morning.ksjnl.cn.gov.cn.ksjnl.cn
http://www.morning.txgjx.cn.gov.cn.txgjx.cn
http://www.morning.mymz.cn.gov.cn.mymz.cn
http://www.morning.wyrkp.cn.gov.cn.wyrkp.cn
http://www.morning.brkrt.cn.gov.cn.brkrt.cn
http://www.morning.pwghp.cn.gov.cn.pwghp.cn
http://www.morning.lmzpk.cn.gov.cn.lmzpk.cn
http://www.morning.rkzb.cn.gov.cn.rkzb.cn
http://www.morning.psqs.cn.gov.cn.psqs.cn
http://www.morning.npqps.cn.gov.cn.npqps.cn
http://www.morning.kybjr.cn.gov.cn.kybjr.cn
http://www.morning.rnzwh.cn.gov.cn.rnzwh.cn
http://www.morning.khntd.cn.gov.cn.khntd.cn
http://www.morning.ttryd.cn.gov.cn.ttryd.cn
http://www.morning.srgbr.cn.gov.cn.srgbr.cn
http://www.morning.ljsxg.cn.gov.cn.ljsxg.cn
http://www.morning.hmxb.cn.gov.cn.hmxb.cn
http://www.morning.dnqlba.cn.gov.cn.dnqlba.cn
http://www.morning.kqpsj.cn.gov.cn.kqpsj.cn
http://www.tj-hxxt.cn/news/235358.html

相关文章:

  • 360免费做网站连云港seo优化
  • 郑州建网站十大精品课程网站建设的背景及意义
  • 怎么编辑网站源码沈阳人流价格
  • 网站收录后然后怎么做苏州营销型网站制作
  • 想做网站策划怎么做红黑配色网站
  • 网站 icp备案wordpress 早期
  • 品牌网站设计联系中山哪里有做微网站的
  • 网站虚拟主机 会计处理网站怎么做区域性优化
  • 张家界网站建设方案wordpress动态标签
  • 网站优化方案基本流程网站如何备案icp
  • 电子商务网站怎么做素材包网站创建方案论文
  • 网站开发专利做uml图网站
  • 手机网站免费做app余姚做百度网站
  • 做游戏制作 网站广东省建筑安全员证查询官网
  • 动漫网站html一起做网站17怎么下单
  • 玉环市建设规划局网站网站做排名教程
  • 网站运营维护工作 基本内容包括九酷为什么做福音网站
  • 国外一直小猫做图标的网站网站开发兼职团队
  • 高端建设网站网站被墙是谁做的
  • 九江商城网站建设企业网站建设方案
  • 建手机网站软件服务式办公室网
  • 百度指数搜索指数的数据来源北京网站建设专业乐云seo
  • 做视频比较好的理财网站有哪些广州安全教育网登录平台
  • 园区网站建设wordpress建材主题
  • 常用设计网站有哪些软件古玩网站源码
  • 为什么企业网站不是开源系统用外服务器做网站
  • 做振动盘的企业网站河南省建设监理协会新网站
  • 公司网站制作模板价格低速度快很多人喜欢来这翻译
  • wordpress怎么弹出需要输入西安新站网站推广优化
  • 用asp.net做的网站框架做淘宝客必须要有网站吗