oracle sql developer下载_oracledeveloper安装教程

oracle sql developer下载_oracledeveloper安装教程
之前整理的是PostgreSQL9和PostGIS2的安装手册,最近在安装PostgreSQL13时发现由于版本过新,安装步骤略有不同,这里简单记录一下安装…

	PostgreSQL13+PostGIS31安装手册[数据库教程]

之前整理的是PostgreSQL9和PostGIS2的安装手册,最近在安装PostgreSQL13时发现由于版本过新,安装步骤略有不同,这里简单记录一下安装过程.

一 各软件包版本依赖关系检查

检查PostGIS、PostgreSQL、GEOS、GDAL、PROJ等各软件的版本依赖关系

http://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS

 

二. 版本选择

  • PostgreSQL13.1

https://ftp.postgresql.org/pub/source/v13.1/postgresql-13.1.tar.gz

  • PostGIS

https://download.osgeo.org/postgis/source/postgis-3.1.0.tar.gz

  • GEOS

http://download.osgeo.org/geos/geos-3.9.0.tar.bz2

  • proj

https://download.osgeo.org/proj/proj-7.2.0.tar.gz

  • gdal

https://github.com/OSGeo/gdal/releases/download/v3.2.0/gdal-3.2.0.tar.gz

  • sqlite3(系统自带版本低于proj安装最低版本要求,所以我们自己重新编译新的sqlite3版本)

https://www.sqlite.org/snapshot/sqlite-snapshot-202101022356.tar.gz

 

三 系统配置

1. 创建postgres用户和组

# groupadd -g 101 dba
# useradd -u 501 -g dba -G root -d /usr/local/pgsql postgres

2. 添加postgres用户环境变量

$ cat ~/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

export PGHOME=/usr/local/pgsql
export PGDATA=/usr/local/pgsql/data
export PATH=$PGHOME/bin:$PATH:$HOME/bin
export LD_LIBRARY_PATH=$PGHOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/lib:/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH
export DATE=`date +"%Y%m%d%H%M"`
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S> "

3. 调整系统参数

# tail -n 12 /etc/sysctl.conf
vm.overcommit_memory=1
vm.overcommit_ratio=90
fs.aio-max-nr=1048576
fs.file-max= 7672460
net.ipv4.ip_local_port_range=9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
kernel.sem= 50100 64128000 50100 1280
kernel.shmall=5242880
kernel.shmmax=12884901888

# tail -n 4 /etc/security/limits.conf
postgres soft nproc 8192
postgres hard nproc 16384
postgres soft nofile 4096
postgres hard nofile 65536

4. 安装依赖包

# yum install -y python-devel perl-ExtUtils-Embed python-devel gcc-c++ openssl-devel readline readline-devel bzip2 zlib zlib-devel openssl openssl-devel pam pam-devel libxml2 libxml2-devel libxslt libxslt-devel openldap openldap-devel libgeos-dev libproj-dev libgdal-dev xsltproc docbook-xsl docbook-xml imagemagick libmagickcore-dev dblatex tcl tcl-devel unixODBC unixODBC-devel libpng12 libpng12-devel libtiff libtiff-devel curl-devel

三 PostgreSQL数据库安装

$ mkdir /usr/local/pgsql
$ mkdir /usr/local/pgsql/{data,arch,plugin}
$ chown -R postgres.dba /usr/local/pgsql
$ tar -zxf postgresql-13.1.tar.gz
$ cd postgresql-13.1
$ ./configure --prefix=/usr/local/pgsql --with-segsize=32 --with-tcl --with-perl --with-python --with-gssapi --with-pam --with-openssl --with-libxml --with-libxslt
$ make world
$ make install-world
$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data/

$ cat /usr/local/pgsql/data/postgresql.conf | grep -v "^$" | grep -v "^#"
listen_addresses = *
port = 5432
max_connections = 600
superuser_reserved_connections = 3
unix_socket_directories = /tmp
shared_buffers = 16GB
huge_pages = try
temp_buffers = 256MB
work_mem = 256MB
maintenance_work_mem = 256MB
logging_collector = on
log_directory = log
log_filename = postgresql-%Y-%m-%d_%H%M%S.log
log_file_mode = 0600
log_rotation_size = 10MB

$ cat /usr/local/pgsql/data/pg_hba.conf | grep -v "^$" | grep -v "^#"
local   all             all                                     trust
host    all             all             127.0.0.1/32            trust
host    all             all             0.0.0.0/0               md5
host    all             all             ::1/128                 trust

使用systemctl来管理PostgreSQL服务

# cat /usr/lib/systemd/system/pgsql.service 
[Unit]
Description=PostgreSQL database server
Documentation=https://www.postgresql.org/docs/
After=syslog.target
After=network.target

[Service]
Type=forking
User=postgres
Group=dba
Restart=always
LimitNOFILE=65536

# Note: avoid inserting whitespace in these Environment= lines, or you may
# break postgresql-setup.

# Location of database directory
Environment=PGDATA=/usr/local/pgsql/data/

# Maximum number of seconds pg_ctl will wait for postgres to start.  Note that
# PGSTARTTIMEOUT should be less than TimeoutSec value.
Environment=PGSTARTTIMEOUT=200

# Where to send early-startup messages from the server (before the logging
# options of postgresql.conf take effect)
# This is normally controlled by the global default set by systemd
# StandardOutput=syslog

# Disable OOM kill on the postmaster
OOMScoreAdjust=-1000
Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
Environment=PG_OOM_ADJUST_VALUE=0

ExecStart=/usr/local/pgsql/bin/pg_ctl start -D ${PGDATA} -s -w -t ${PGSTARTTIMEOUT}
ExecStop=/usr/local/pgsql/bin/pg_ctl stop -D ${PGDATA} -s -m fast
ExecReload=/usr/local/pgsql/bin/pg_ctl reload -D ${PGDATA} -s
KillMode=mixed
KillSignal=SIGINT
 

# Do not set any timeout value, so that systemd will not kill postmaster
# during crash recovery.
TimeoutSec=0

[Install]
WantedBy=multi-user.target
# systemctl daemon-reload
# systemctl start pgsql
# systemctl enable pgsql
# su - postgres
$ psql 
psql (13.1)
Type "help" for help.

postgres=# 

 

四 安装PostGIS扩展

1. 安装SQLITE3

$ tar -zxf sqlite-snapshot-202101022356.tar.gz
$ cd sqlite-snapshot-202101022356
$ ./configure --prefix=/usr/local/pgsql/plugin/sqlite
$ make
$ make install

2. 安装proj

$ tar -zxf proj-7.2.0.tar.gz
$ cd proj-7.2.0
$ ./configure --prefix=/usr/local/pgsql/plugin/proj SQLITE3_CFLAGS=-I/usr/local/pgsql/plugin/sqlite/include SQLITE3_LIBS="-L/usr/local/pgsql/plugin/sqlite/lib -lsqlite3"
$ make
$ make install
$ echo "/usr/local/pgsql/plugin/proj/lib" > /etc/ld.so.conf.d/proj.conf
$ ldconfig

3. 安装geos

$ tar -jxf geos-3.9.0.tar.bz2
$ cd geos-3.9.0
$ ./configure --prefix=/usr/local/pgsql/plugin/geos
$ make
$ make install
$ echo "/usr/local/pgsql/plugin/geos/lib" > /etc/ld.so.conf.d/geos.conf
$ ldconfig

4. 安装gdal

$ tar -zxf gdal-3.2.0.tar.gz
$ cd gdal-3.2.0
$ ./configure --prefix=/usr/local/pgsql/plugin/gdal --with-proj=/usr/local/pgsql/plugin/proj
$ make
$ make install
$ echo "/usr/local/pgsql/plugin/gdal/lib" > /etc/ld.so.conf.d/gdal.conf
$ ldconfig

5. 安装PostGIS

$ tar -zxf postgis-3.1.0.tar.gz
$ cd postgis-3.1.0
$ ./configure --prefix=/usr/local/pgsql/plugin/postgis --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-geosconfig=/usr/local/pgsql/plugin/geos/bin/geos-config --with-gdalconfig=/usr/local/pgsql/plugin/gdal/bin/gdal-config --with-projdir=/usr/local/pgsql/plugin/proj --without-protobuf
$ make
$ make install

6. 创建PostgGIS扩展

postgres=# c template1
template1=# CREATE EXTENSION hstore;
CREATE EXTENSION
template1=# CREATE EXTENSION postgis;
CREATE EXTENSION
template1=# CREATE EXTENSION postgis_topology;
CREATE EXTENSION
template1=# CREATE EXTENSION fuzzystrmatch;
CREATE EXTENSION
template1=# CREATE EXTENSION postgis_tiger_geocoder;
CREATE EXTENSION
template1=# dx
                                        List of installed extensions
          Name          | Version |   Schema   |                        Description                         
------------------------+---------+------------+------------------------------------------------------------
 fuzzystrmatch          | 1.1     | public     | determine similarities and distance between strings
 hstore                 | 1.7     | public     | data type for storing sets of (key, value) pairs
 plpgsql                | 1.0     | pg_catalog | PL/pgSQL procedural language
 postgis                | 3.1.0   | public     | PostGIS geometry and geography spatial types and functions
 postgis_tiger_geocoder | 3.1.0   | tiger      | PostGIS tiger geocoder and reverse geocoder
 postgis_topology       | 3.1.0   | topology   | PostGIS topology spatial types and functions
(6 rows)

 

PostgreSQL13+PostGIS31安装手册

原文地址:https://www.cnblogs.com/ilifeilong/p/14253883.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/6564.html

(0)
上一篇 2023-04-07
下一篇 2023-04-07

相关推荐

  • 数据库学习之二:mysql安装及启动[通俗易懂]

    数据库学习之二:mysql安装及启动[通俗易懂]二、mysql安装及启动 1、mysql安装方式介绍 2、mysql安装 3、客户端程序连接到MySQL方式 4、mysql 的SQL层处理: 5、mysql常用命令 6、清理不常用的数据库

    2023-02-24
    155
  • Python实例在Java中的引用方法

    Python实例在Java中的引用方法Python和Java都是非常流行的编程语言。Python是一种动态语言,使用起来非常简单和高效,特别是对于数据处理和科学计算方面很方便。而Java则是一种跨平台的语言,运行速度也很快,被广泛应用于服务器端和企业级应用开发中。

    2024-01-06
    111
  • 二维列表使用详解

    二维列表使用详解二维列表,在Python开发中是非常实用的数据结构之一。二维列表是指由多个列表组成的列表,也称为矩阵。在日常开发中,我们经常需要处理具有二维结构的数据,例如二维表格、图片、视频等。因此,熟练使用二维列表是非常必要的。

    2024-08-24
    35
  • Python工程师必备pip技巧

    Python工程师必备pip技巧Pip是Python语言的包管理工具,可以方便地安装、升级和卸载Python模块。

    2024-08-01
    31
  • 与oracle 有关的那点事「终于解决」

    与oracle 有关的那点事「终于解决」常用操作 1.查看创建表参数 提取完整的DDL: SELECT DBMS_METADATA.GET_DDL('TABLE','table_name&am

    2023-03-08
    156
  • 麒麟985处理器怎么样?[通俗易懂]

    麒麟985处理器怎么样?[通俗易懂]  最近上网时,发现很多朋友对于荣耀30系列首发的麒麟985处理器非常感兴趣,作为一个从事手机行业很多年的人士,今天就在这里和大家聊一聊,荣耀30系列首发的麒麟985处理器究竟怎么样?   首先在5…

    2023-02-26
    140
  • mysql中union与union all的区别[通俗易懂]

    mysql中union与union all的区别[通俗易懂] UNION用的比较多union all是直接连接,取到得是所有值,记录可能有重复 union 是取唯一值,记录没有重复 1、UNION 的语法如下: [SQL 语句 1] UNION [SQ…

    2023-03-30
    168
  • Python解释器安装

    Python解释器安装 Python是一门高级的编程语言,因其具有简洁、易读、功能强大以及可用于多种编程领域的特性而备受青睐。在进行Python的开发过程中,我们需要先对其解释器进行安装与配置,才能在本地开发环境上进行Python的编写、运行、调试与测试等操作。本文将介绍Python解释器的安装流程,帮助你成功地安装Python解释器,并为后续的Python开发打下坚实的基础。

    2024-07-27
    32

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注