标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (102)
- 数据库 (1,671)
- DB2 (22)
- MySQL (73)
- Oracle (1,533)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (21)
- ORA-xxxxx (159)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (14)
- ORACLE 21C (3)
- Oracle 23ai (7)
- Oracle ASM (65)
- Oracle Bug (8)
- Oracle RAC (52)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (560)
- Oracle安装升级 (92)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (78)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- Kylin Linux 安装19c
- ORA-600 krse_arc_complete.4
- Oracle 19c 202410补丁(RUs+OJVM)
- ntfs MFT损坏(ntfs文件系统故障)导致oracle异常恢复
- .mkp扩展名oracle数据文件加密恢复
- 清空redo,导致ORA-27048: skgfifi: file header information is invalid
- A_H_README_TO_RECOVER勒索恢复
- 通过alert日志分析客户自行对一个数据库恢复的来龙去脉和点评
- ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的SERVICE_NAME
- ORA-01092 ORA-00604 ORA-01558故障处理
- ORA-65088: database open should be retried
- Oracle 19c异常恢复—ORA-01209/ORA-65088
- ORA-600 16703故障再现
- 数据库启动报ORA-27102 OSD-00026 O/S-Error: (OS 1455)
- .[metro777@cock.li].Elbie勒索病毒加密数据库恢复
- 应用连接错误,初始化mysql数据库恢复
- RAC默认服务配置优先节点
- Oracle 19c RAC 替换私网操作
- 监听报TNS-12541 TNS-12560 TNS-00511错误
- drop tablespace xxx including contents恢复
标签归档:PostgreSQL源码安装
PostgreSQL 16 源码安装
空闲中尝试在linux 8的版本上,源码安装PostgreSQL 16,参考文章:PostgreSQL16.2源码部署教程
[root@xifenfei tmp]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.7 (Ootpa) [root@xifenfei tmp]# uname -osr Linux 5.15.0-3.60.5.1.el8uek.x86_64 GNU/Linux
下载pg源码程序:PostgreSQL 16源码下载
linux配置
--关闭selinux sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config setenforce 0 --安装相应的包 yum -y install readline readline-devel zlib zlib-devel gettext \ gettext-devel openssl openssl-devel pam pam-devel libxml2 \ libxml2-devel libxslt libxslt-devel perl perl-devel tcl-devel \ libuuid-devel gcc gcc-c++ make flex bison perl-ExtUtils* libicu libicu-devel --修改内核参数 cat>>/etc/sysctl.conf<<EOF fs.file-max = 76724200 kernel.sem = 10000 10240000 10000 1024 kernel.shmmni = 4096 kernel.shmall = 253702 kernel.shmmax = 1039163392 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.wmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_max = 1048576 fs.aio-max-nr = 40960000 vm.dirty_ratio=20 vm.dirty_background_ratio=3 vm.dirty_writeback_centisecs=100 vm.dirty_expire_centisecs=500 vm.swappiness=10 vm.min_free_kbytes=524288 vm.swappiness=0 vm.overcommit_memory=2 vm.overcommit_ratio=75 net.ipv4.ip_local_port_range = 10000 65535 EOF sysctl -p --创建组和用户 groupadd postgres -g 3000 useradd postgres -g 3000 -u 3000 --用户 limits 配置 cat>>/etc/security/limits.conf<<EOF postgres soft nofile 1048576 postgres hard nofile 1048576 postgres soft nproc 131072 postgres hard nproc 131072 postgres soft stack 10240 postgres hard stack 32768 postgres soft core 6291456 postgres hard core 6291456 EOF --创建相关目录和权限 mkdir -p /pg/database/server mkdir -p /pg/database/data mkdir -p /pg/database/wal mkdir -p /pg/database/archive chown -R postgres:postgres /pg -R chmod 0775 /pg chmod 0700 /pg/database/data --设置环境变量 vi /home/postgres/.bash_profile export PGPORT=5432 export PGUSER=postgres export PGHOME=/pg/database/server export PGDATA=/pg/database/data export PATH=$PGHOME/bin:$PATH --编译pg软件 su - postgres tar xzvf postgresql-16.2.tar.gz cd /tmp/postgresql-16.2 ./configure --prefix=/pg/database/server --with-pgport=5432 make make install --确认软件安装成功(检查编译日志和测试如下命令) [postgres@xifenfei ~]$ postgres --version postgres (PostgreSQL) 16.2
创建数据库
[postgres@xifenfei ~]$ /pg/database/server/bin/initdb -D/pg/database/data\ -X/pg/database/wal -EUTF8 -Upostgres -W 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 text search configuration will be set to "english". Data page checksums are disabled. Enter new superuser password: Enter it again: fixing permissions on existing directory /pg/database/data ... ok fixing permissions on existing directory /pg/database/wal ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... America/New_York 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 initdb: hint: 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/database/server/bin/pg_ctl -D /pg/database/data -l logfile start
启动数据库
[postgres@xifenfei ~]$ /pg/database/server/bin/pg_ctl -D /pg/database/data -l logfile start waiting for server to start.... done server started [postgres@xifenfei ~]$ psql psql (16.2) Type "help" for help. postgres=# \d pg_class Table "pg_catalog.pg_class" Column | Type | Collation | Nullable | Default ---------------------+--------------+-----------+----------+--------- oid | oid | | not null | relname | name | | not null | relnamespace | oid | | not null | reltype | oid | | not null | reloftype | oid | | not null | relowner | oid | | not null | relam | oid | | not null | relfilenode | oid | | not null | reltablespace | oid | | not null | relpages | integer | | not null | reltuples | real | | not null | relallvisible | integer | | not null | reltoastrelid | oid | | not null | relhasindex | boolean | | not null | relisshared | boolean | | not null | relpersistence | "char" | | not null | relkind | "char" | | not null | relnatts | smallint | | not null | relchecks | smallint | | not null | relhasrules | boolean | | not null | relhastriggers | boolean | | not null | relhassubclass | boolean | | not null | relrowsecurity | boolean | | not null | relforcerowsecurity | boolean | | not null | relispopulated | boolean | | not null | relreplident | "char" | | not null | relispartition | boolean | | not null | relrewrite | oid | | not null | relfrozenxid | xid | | not null | relminmxid | xid | | not null | relacl | aclitem[] | | | reloptions | text[] | C | | relpartbound | pg_node_tree | C | | Indexes: "pg_class_oid_index" PRIMARY KEY, btree (oid) "pg_class_relname_nsp_index" UNIQUE CONSTRAINT, btree (relname, relnamespace) "pg_class_tblspc_relfilenode_index" btree (reltablespace, relfilenode)
配置开机自动启动
[root@xifenfei tmp]# cp /tmp/postgresql-16.2/contrib/start-scripts/linux /etc/init.d/PostgreSQL [root@xifenfei tmp]# vi /etc/init.d/PostgreSQL --修改如下值 prefix=/pg/database/server PGDATA="/pg/database/data" [root@xifenfei tmp]# chkconfig --add PostgreSQL [root@xifenfei tmp]# chkconfig --list Note: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. If you want to list systemd services use 'systemctl list-unit-files'. To see services enabled on particular target use 'systemctl list-dependencies [target]'. PostgreSQL 0:off 1:off 2:on 3:on 4:on 5:on 6:off