linux 环境 postgresql + postgis 安装

news2024/11/16 0:35:12

postgis 是 postgresql 的一个扩展插件,具有强大的空间计算功能,很适合用于地图系统。

本次演示使用的操作系统为

CentOS Linux release 7.9.2009 (Core)

postgis 下载

登录 postgis 的官方网站:

http://postgis.net/

下载符合 postgresql 数据库版本的 postgis 安装包。

本文档使用的版本为 3.2.4,查看该版本的使用文档,安装要求如下:

包下载

经过多次尝试,最终整个环境包的版本使用情况如下:

postgresql 14.6

gcc 4.8.5

make 3.82

proj 8.2.1(新版本需要使用 cmake 进行编译安装)

libxml2 2.9.9(新版本需要使用 cmake 进行编译安装)

json-c 0.10(新版本需要使用 cmake 进行编译安装)

gdal 3.5.3(新版本需要使用 cmake 进行编译安装)

geos 3.6.6(新版本需要使用 cmake 进行编译安装)

各安装包的下载地址:

postgresql

https://www.postgresql.org/ftp/source/

gcc

https://gcc.gnu.org/releases.html

proj

https://proj.org/download.html

libxml2

https://download.gnome.org/sources/libxml2/

json-c

https://s3.amazonaws.com/json-c_releases/releases/index.html

gdal

https://github.com/OSGeo/gdal/releases

geos

https://libgeos.org/usage/download/

cmake(如果使用的是proj等包的高级版本时可能需要)

https://cmake.org/download/

安装 postgresql

1、创建安装用户

[root@test ~]$ useradd postgres

[root@test ~]$ passwd postgres

2、上传安装包到执行目录

[root@test ~]$ mkdir -p /opt/postgresql/soft

[root@test ~]$ chown -R postgres:postgres /opt/postgresql

[root@test ~]$ cd /opt/postgresql/soft

[root@test soft]$ yum install lrzsz

[root@test soft]$ rz

[root@test soft]$ ls

postgresql-14.6.tar.bz2

3、解压缩安装包,.bz2 格式解压需要安装 bzip2

[root@test soft]$ yum install bzip2

[root@test soft]$ tar -xvf postgresql-14.6.tar.bz2

4、开始安装

[root@test soft]# cd postgresql-14.6

[root@test postgresql-14.6]# ls

aclocal.m4 config config.log configure configure.ac contrib COPYRIGHT doc GNUmakefile.in HISTORY INSTALL Makefile README src

[root@test postgresql-14.6]# ./configure

checking build system type... x86_64-pc-linux-gnu

checking host system type... x86_64-pc-linux-gnu

checking which template to use... linux

checking whether NLS is wanted... no

checking for default port number... 5432

checking for block size... 8kB

checking for segment size... 1GB

checking for WAL block size... 8kB

checking for gcc... no

checking for cc... no

configure: error: in `/opt/postgresql/soft/postgresql-14.6':

configure: error: no acceptable C compiler found in $PATH

See `config.log' for more details

报错很明显,没有找到 C 语言的编译器

安装 gcc 之后继续安装

[root@test postgresql-14.6]# yum install gcc

[root@test postgresql-14.6]# ./configure

......

checking for library containing dlsym... -ldl

checking for library containing socket... none required

checking for library containing shl_load... no

checking for library containing getopt_long... none required

checking for library containing shm_open... -lrt

checking for library containing shm_unlink... none required

checking for library containing clock_gettime... none required

checking for library containing fdatasync... none required

checking for library containing shmget... none required

checking for library containing backtrace_symbols... none required

checking for library containing gethostbyname_r... none required

checking for library containing pthread_barrier_wait... -lpthread

checking for library containing readline... no

configure: error: readline library not found

If you have readline already installed, see config.log for details on the

failure. It is possible the compiler isn't looking in the proper directory.

Use --without-readline to disable readline support.

报错显示为没有找到 readline 的库文件

安装 readline-devel 包解决

[root@test postgresql-14.6]# yum install readline

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

Package readline-6.2-11.el7.x86_64 already installed and latest version

Nothing to do

[root@test postgresql-14.6]# yum install readline-devel.x86_64

继续安装

[root@test postgresql-14.6]# ./configure

......

checking for library containing readline... -lreadline

checking for inflate in -lz... no

configure: error: zlib library not found

If you have zlib already installed, see config.log for details on the

failure. It is possible the compiler isn't looking in the proper directory.

Use --without-zlib to disable zlib support.

[root@test postgresql-14.6]# yum install zlib

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

Package zlib-1.2.7-20.el7_9.x86_64 already installed and latest version

Nothing to do

报错显示为没有找到 zlib 的库文件,同样安装 devel 包解决

[root@test postgresql-14.6]# yum install zlib-devel.x86_64

继续安装

[postgres@test postgresql-14.6]$ ./configure --prefix=/usr/local/pgsql-14.6

......

configure: using LDFLAGS= -Wl,--as-needed

configure: creating ./config.status

config.status: creating GNUmakefile

config.status: creating src/Makefile.global

config.status: creating src/include/pg_config.h

./config.status: line 1378: src/include/stamp-h: Permission denied

config.status: creating src/include/pg_config_ext.h

config.status: src/include/pg_config_ext.h is unchanged

./config.status: line 1382: src/include/stamp-ext-h: Permission denied

config.status: creating src/interfaces/ecpg/include/ecpg_config.h

config.status: src/interfaces/ecpg/include/ecpg_config.h is unchanged

./config.status: line 1384: src/interfaces/ecpg/include/stamp-h: Permission denied

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

[postgres@test postgresql-14.6]$ exit

logout

[root@test postgresql-14.6]# mkdir /usr/local/pgsql-14.6

[root@test postgresql-14.6]# chown postgres:postgres /usr/local/pgsql-14.6/

[root@test postgresql-14.6]# su - postgres

Last login: Tue Feb 28 10:01:38 CST 2023 on pts/1

[postgres@test ~]$ cd /opt/postgresql/soft/postgresql-14.6

[postgres@test postgresql-14.6]$ make

......

gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 isolation_main.o pg_regress.o -L../../../src/port -L../../../src/common -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql-14.6/lib',--enable-new-dtags -lpgcommon -lpgport -lz -lreadline -lpthread -lrt -ldl -lm -o pg_isolation_regress

make[2]: Leaving directory `/opt/postgresql/soft/postgresql-14.6/src/test/isolation'

make -C test/perl all

make[2]: Entering directory `/opt/postgresql/soft/postgresql-14.6/src/test/perl'

make[2]: Nothing to be done for `all'.

make[2]: Leaving directory `/opt/postgresql/soft/postgresql-14.6/src/test/perl'

make[1]: Leaving directory `/opt/postgresql/soft/postgresql-14.6/src'

make -C config all

make[1]: Entering directory `/opt/postgresql/soft/postgresql-14.6/config'

make[1]: Nothing to be done for `all'.

make[1]: Leaving directory `/opt/postgresql/soft/postgresql-14.6/config'

[postgres@test postgresql-14.6]$ make install

......

make -C config install

make[1]: Entering directory `/opt/postgresql/soft/postgresql-14.6/config'

/bin/mkdir -p '/usr/local/pgsql-14.6/lib/pgxs/config'

/bin/install -c -m 755 ./install-sh '/usr/local/pgsql-14.6/lib/pgxs/config/install-sh'

/bin/install -c -m 755 ./missing '/usr/local/pgsql-14.6/lib/pgxs/config/missing'

make[1]: Leaving directory `/opt/postgresql/soft/postgresql-14.6/config'

5、创建软连接,方便以后升级

[postgres@test pgsql-14.6]$ exit

logout

[root@test postgresql-14.6]# ln -s /usr/local/pgsql-14.6/ /usr/local/pgsql

6、配置环境变量

[postgres@test ~]$ vim .bash_profile

#末尾添加这些信息:

export PATH=/usr/local/pgsql/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/pgsql/lib:$LD_LIBRARY_PATH

[postgres@test ~]$ source .bash_profile

7、初始化环境

[postgres@test ~]$ export PGDATA=/opt/postgresql/pgdata

[postgres@test ~]$ mkdir /opt/postgresql/pgdata

[postgres@test ~]$ initdb

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 database encoding has accordingly been set to "UTF8".

The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /opt/postgresql/pgdata ... 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/postgresql/pgdata -l logfile start

8、启动数据库

[postgres@test ~]$ pg_ctl -D /opt/postgresql/pgdata -l logfile start

[postgres@test ~]$ ps -ef | grep postgres

root 75725 25505 0 14:59 pts/0 00:00:00 su - postgres

postgres 75729 75725 0 14:59 pts/0 00:00:00 -bash

postgres 75755 75729 0 15:00 pts/0 00:00:00 ps -ef

postgres 75756 75729 0 15:00 pts/0 00:00:00 grep --color=auto postgres

postgres 122926 1 0 Feb28 ? 00:00:00 /usr/local/pgsql-14.6/bin/postgres -D /opt/postgresql/pgdata

postgres 122928 122926 0 Feb28 ? 00:00:00 postgres: checkpointer

postgres 122929 122926 0 Feb28 ? 00:00:00 postgres: background writer

postgres 122930 122926 0 Feb28 ? 00:00:00 postgres: walwriter

postgres 122931 122926 0 Feb28 ? 00:00:00 postgres: autovacuum launcher

postgres 122932 122926 0 Feb28 ? 00:00:01 postgres: stats collector

postgres 122933 122926 0 Feb28 ? 00:00:00 postgres: logical replication launcher

安装 libxml2

1、上传安装包

[postgres@test ~]$ cd /opt/postgresql/soft

[postgres@test soft]$ rz

2、解压缩

[postgres@test soft]$ xz -d libxml2-2.9.9.tar.xz

[postgres@test soft]$ tar -xvf libxml2-2.9.9.tar

3、安装

[postgres@test soft]$ cd libxml2-2.9.9

[postgres@test libxml2-2.9.9]$ ./configure --prefix=/usr/local/libxml2

[postgres@test libxml2-2.9.9]$ make && make install

......

make[4]: Entering directory `/opt/postgresql/soft/libxml2-2.9.9/python'

CC libxml.lo

libxml.c:14:20: fatal error: Python.h: No such file or directory

#include <Python.h>

^

compilation terminated.

make[4]: *** [libxml.lo] Error 1

make[4]: Leaving directory `/opt/postgresql/soft/libxml2-2.9.9/python'

make[3]: *** [all-recursive] Error 1

make[3]: Leaving directory `/opt/postgresql/soft/libxml2-2.9.9/python'

make[2]: *** [all] Error 2

make[2]: Leaving directory `/opt/postgresql/soft/libxml2-2.9.9/python'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/opt/postgresql/soft/libxml2-2.9.9'

make: *** [all] Error 2

报错没有找到 python 的头文件,安装 python 开发包解决

[postgres@test libxml2-2.9.9]$ exit

logout

[root@test postgresql-14.6]# mkdir /usr/local/libxml2

[root@test postgresql-14.6]# chown postgres:postgres /usr/local/libxml2

[root@test postgresql-14.6]# yum install python-devel

[root@test postgresql-14.6]# su - postgres

Last login: Tue Feb 28 10:01:38 CST 2023 on pts/1

[postgres@test ~]$ cd /opt/postgresql/soft/libxml2-2.9.9

[postgres@test libxml2-2.9.9]$ make && make install

安装 geos

1、上传安装包

[postgres@test ~]$ cd /opt/postgresql/soft

[postgres@test soft]$ rz

2、解压缩

[postgres@test soft]$ tar -xvf geos-3.6.6.tar.bz2

3、安装

[postgres@test soft]$ cd geos-3.6.6

[postgres@test geos-3.6.6]$ ./configure --prefix=/usr/local/geos

[postgres@test geos-3.6.6]$ exit

logout

[root@test postgresql-14.6]# mkdir /usr/local/geos

[root@test postgresql-14.6]# chown postgres:postgres /usr/local/geos

[root@test postgresql-14.6]# su - postgres

[postgres@test ~]$ cd /opt/postgresql/soft/geos-3.6.6

[postgres@test geos-3.6.6]$ make && make install

安装 proj

1、上传安装包

[postgres@test ~]$ cd /opt/postgresql/soft

[postgres@test soft]$ rz

2、解压缩

[postgres@test soft]$ tar -xvf proj-8.2.1.tar.gz

3、安装

[postgres@test soft]$ cd proj-8.2.1

[postgres@test proj-8.2.1]$ ./configure --prefix=/usr/local/proj

......

enabled, pthread

checking for SQLITE3... configure: error: Package requirements (sqlite3 >= 3.11) were not met:

No package 'sqlite3' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you

installed software in a non-standard prefix.

Alternatively, you may set the environment variables SQLITE3_CFLAGS

and SQLITE3_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

proj8 对于 sqlite 数据库有版本要求,重新安装 sqlite 数据库

sqlite下载地址:

https://www.sqlite.org/download.html

上传并安装

[postgres@test ~]$ cd /opt/postgresql/soft

[postgres@test soft]$ rz

[postgres@test soft]$ tar -xvf sqlite-autoconf-3410000.tar.gz

[postgres@test soft]$ cd sqlite-autoconf-3410000

[postgres@test sqlite-autoconf-3410000]$ ./configure --prefix=/usr/local/sqlite

[postgres@test sqlite-autoconf-3410000]$ exit

[root@test postgresql-14.6]# mkdir /usr/local/sqlite

[root@test postgresql-14.6]# su - postgres

[postgres@test ~]$ cd /opt/postgresql/soft/sqlite-autoconf-3410000

[postgres@test sqlite-autoconf-3410000]$ make && make install

修改链接

[root@test postgresql-14.6]# cd /usr/bin/

[root@test postgresql-14.6]# mv sqlite3 sqlite3_old

[root@test postgresql-14.6]# ln -s /usr/local/sqlite/bin/sqlite3 sqlite3

继续安装 proj

[root@test postgresql-14.6]$ su - postgres

[postgres@test ~]$ cd /opt/postgresql/soft/proj-8.2.1

[postgres@test proj-8.2.1]$ ./configure --prefix=/usr/local/proj

......

checking for sqlite3... yes

checking for TIFF... configure: error: Package requirements (libtiff-4) were not met:

No package 'libtiff-4' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you

installed software in a non-standard prefix.

Alternatively, you may set the environment variables TIFF_CFLAGS

and TIFF_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

报错找不到 libtiff-4 包,服务器已经安装了

[postgres@test proj-8.2.1]$ rpm -qa libtiff

libtiff-4.0.3-35.el7.x86_64

尝试安装开发包,发现可以解决问题

[root@test postgresql-14.6]# yum install libtiff-devel

继续安装 proj

[postgres@test proj-8.2.1]# ./configure --prefix=/usr/local/proj

.....

checking for SQLITE3... yes

checking for sqlite3... yes

checking for TIFF... yes

checking for curl-config... not-found

configure: error: curl not found. If wanting to do a build without curl support (and thus without built-in networking capability), explictly disable it with --without-curl

报错缺少 curl 包

[root@test postgresql-14.6]# yum install curl

继续安装 proj

[postgres@test proj-8.2.1]# ./configure --prefix=/usr/local/proj

[postgres@test proj-8.2.1]# exit

[root@test postgresql-14.6]# mkdir /usr/local/proj

[root@test postgresql-14.6]# chown postgres:postgres /usr/local/proj

[root@test postgresql-14.6]# su - postgres

[postgres@test ~]$ cd /opt/postgresql/soft/proj-8.2.1

[postgres@test ~]$ make && make install

安装 gdal

1、上传安装包

[postgres@test ~]$ cd /opt/postgresql/soft

[postgres@test soft]$ rz

2、解压缩

[postgres@test soft]$ tar -xvf gdal-3.5.3.tar.gz

3、安装

[postgres@test soft]$ exit

[root@test postgresql-14.6]# mkdir /usr/local/gdal

[root@test postgresql-14.6]# chown postgres:postgres /usr/local/gdal

[root@test postgresql-14.6]# su - postgres

[postgres@test ~]$ cd /opt/postgresql/soft/gdal-3.5.3

[postgres@test gdal-3.5.3]# ./configure --prefix=/usr/local/gdal

......

checking for curl_global_init in -lcurl... yes

checking for SQLite3 library >= 3.0.0... disabled

checking for PROJ >= 6 library... checking for proj_create_from_wkt in -lproj... no

checking for internal_proj_create_from_wkt in -lproj... no

checking for internal_proj_create_from_wkt in -linternalproj... no

configure: error: PROJ 6 symbols not found

报错找不到 PROJ 包,添加环境变量到 /etc/profile 也不见效,选择手动指定proj安装目录的方式解决。

应该再尝试在 /etc/ld.so.conf 中配置库包位置试试

[postgres@test gdal-3.5.3]# ./configure --prefix=/usr/local/gdal --with-proj=/usr/local/proj/

[postgres@test gdal-3.5.3]# make && make install

安装 json-c

1、上传安装包

[postgres@test ~]$ cd /opt/postgresql/soft

[postgres@test soft]$ rz

2、解压缩

[postgres@test soft]$ tar -xvf json-c-0.10.tar.gz

3、安装

[postgres@test soft]$ exit

[root@test postgresql-14.6]# mkdir /usr/local/jons-c

[root@test postgresql-14.6]# chown postgres:postgres /usr/local/jons-c

[root@test postgresql-14.6]# su - postgres

[postgres@test ~]$ cd /opt/postgresql/soft/json-c-0.10

[postgres@test json-c-0.10]$ ./configure --prefix=/usr/local/json-c

[postgres@test json-c-0.10]$ make && make install

安装 postgis

1、上传安装包

[postgres@test ~]$ cd /opt/postgresql/soft

[postgres@test soft]$ rz

2、解压缩

[postgres@test soft]$ tar -xvf postgis-3.2.4.tar.gz

3、安装

[postgres@test postgis-3.2.4]# ./configure --prefix=/usr/local/postgis

......

checking libxml/xpathInternals.h usability... yes

checking libxml/xpathInternals.h presence... yes

checking for libxml/xpathInternals.h... yes

checking for xmlInitParser in -lxml2... yes

checking for geos-config... no

configure: error: could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter.

[postgres@test postgis-3.2.4]# ./configure --prefix=/usr/local/postgis --with-geosconfig=/usr/local/bin/geos-config

......

configure: WARNING: "Could not find json-c"

checking for PROTOBUFC... no

libprotobuf-c not found in pkg-config

checking protobuf-c/protobuf-c.h usability... no

checking protobuf-c/protobuf-c.h presence... no

checking for protobuf-c/protobuf-c.h... no

configure: error: unable to find protobuf-c/protobuf-c.h using CPPFLAGS. You can disable MVT and Geobuf support using --without-protobuf

报错找不到 protobuf-c 包,尝试使用 yum 安装,安装完成之后问题未解决

手动下载 protobuf-c 进行安装

安装 protobuf-c

下载地址

https://github.com/protobuf-c/protobuf-c/releases

上传并安装

[postgres@test ~]$ cd /opt/postgresql/soft

[postgres@test soft]$ rz

[postgres@test soft]# tar -xvf protobuf-c-1.4.1.tar.gz

[postgres@test soft]$ exit

[root@test postgresql-14.6]# mkdir /usr/local/protobuf-c

[root@test postgresql-14.6]# chown postgres:postgres /usr/local/protobuf-c

[root@test postgresql-14.6]# su - postgres

[postgres@test soft]# cd /opt/postgresql/soft/protobuf-c-1.4.1

[postgres@test protobuf-c-1.4.1]# ./configure --prefix=/usr/local/protobuf-c

......

checking whether g++ supports C++11 features with -std=c++11... yes

checking for protobuf... no

checking for protobuf... no

configure: error: Package requirements (protobuf >= 2.6.0) were not met:

No package 'protobuf' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you

installed software in a non-standard prefix.

Alternatively, you may set the environment variables protobuf_CFLAGS

and protobuf_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

protobuf-c 依赖与 protobuf 包,需要先安装 protobuf 包

安装 protobuf 包

https://github.com/google/protobuf/releases

上传并安装

[postgres@test ~]$ cd /opt/postgresql/soft

[postgres@test soft]$ rz

[postgres@test soft]# tar -xvf protobuf-all-3.6.1.tar.gz

[postgres@test soft]$ exit

[root@test postgresql-14.6]# mkdir /usr/local/protobuf

[root@test postgresql-14.6]# chown postgres:postgres /usr/local/protobuf

[root@test postgresql-14.6]# su - postgres

[postgres@test ~]$ cd /opt/postgresql/soft/protobuf-3.6.1

[postgres@test protobuf-c-1.4.1]$ ./configure --prefix=/usr/local/protobuf

[postgres@test protobuf-c-1.4.1]$ make && make install

继续安装 protobuf-c

[postgres@test protobuf-c-1.4.1]$ ./configure --prefix=/usr/local/protobuf-c

[postgres@test protobuf-c-1.4.1]$ make && make install

继续安装 postgis

[postgres@test postgis-3.2.4]$ ./configure --prefix=/usr/local/postgis --with-geosconfig=/usr/local/bin/geos-config

如果还报 protobuf-c 找不到的问题,把 protobuf-c 的库加入到环境变量中去

vim /etc/profile

export LD_LIBRARY_PATH=/usr/local/protobuf/lib:$LD_LIBRARY_PATH

[postgres@test postgis-3.2.4]$ make && make install

postgresql 接入 postgis 扩展

1、创建一个数据库

[postgres@test ~]$ psql

gisdb=# create database gisdb;

2、加载 postgis 插件

gisdb=# create extension postgis;

ERROR: could not load library "/usr/local/pgsql-14.6/lib/postgis-3.so": libgeos_c.so.1: cannot open shared object file: No such file or directory

将所安装的软件库都加入到共享库解决上述问题

[root@test ~]# vim /etc/ld.so.conf

/usr/local/gdal/lib

/usr/local/geos/lib

/usr/local/proj/lib

/usr/local/pgsql/lib

/usr/local/json-c/lib

/usr/local/libxml2/lib

/usr/local/protobuf/lib

/usr/local/protobuf-c/lib

[root@test ~]# ldconfig

gisdb=# create extension postgis;

CREATE EXTENSION

至此安装完成

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/381543.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

ShardingSphere官方文档感悟

ShardingSphere官方文档感悟什么是ShardingSphereShardingSphere-JDBCShardingSphere-Proxy功能产品优势设计哲学连接增强可插拔L1内核层L2功能层L3生态层部署形态ShardingSphere-JDBC独立部署ShardingSphere-Proxy独立部署混合部署架构官网地址&#xff1a; https://shardings…

HTTP的前世今生

承接上文HTTP请求的详细过程http协议版本历史http造就了万维网&#xff0c;http成就了互联网第三次信息技术革命并且影响着即将到来的第四次人工智能技术革命。1989年第一个http协议&#xff0c;http0.9发布&#xff0c;发明了万维网&#xff0c;创建了世界第一个网页浏览器&am…

软件测试面试必杀篇:【2023软件测试面试八股文宝典】

800道软件测试面试真题&#xff0c;高清打印版打包带走&#xff0c;横扫软件测试面试高频问题&#xff0c;涵盖测试理论、Linux、MySQL、Web测试、接口测试、App测试、Python、Selenium、性能测试、LordRunner、计算机网络、数据结构与算法、逻辑思维、人力资源等模块面试题&am…

Jinja2----------过滤器的使用、控制语句

目录 1.过滤器的使用 1.过滤器和测试器 2.过滤器 templates/filter.html app.py 效果 3.自定义过滤器 app.py templates/filter.html 效果 2.控制语句 1.if app.py templates/control.html 2.for app.py templates/control.htm 1.过滤器的使用 1.过滤器和测…

在linux中配置环境变量

1. 环境变量的作用 环境变量是操作系统在运行的时候&#xff0c;记录的一些关键性信息&#xff0c;用于辅助系统的运行。 在linux中执行 evn 命令即可查看当前系统中记录的环境变量。 环境变量是一种KeyValue结构 2. 符号$ 在linux系统中&#xff0c;$&#xff0c;用于取“…

【C++】STL——list的模拟实现

list的模拟实现 文章目录list的模拟实现一、list三个基本类的模拟实现总览二、节点类接口实现模拟实现构造函数三、迭代器类接口实现1.正向迭代器默认成员函数构造函数六种运算符重载 */->//--/!/2.反向迭代器四、list类接口实现1.默认成员函数1.1.构造函数1.2.析构函数1.3.…

Hive3.1.3安装部署_最小化部署_元数据MySQL部署_Hiveserver2部署_metastore部署---大数据之Hive工作笔记0012

hbase 实时分析 hive 离线分析 这里是新版本的hive3.1.3的安装 关于hive的原理之前的博客已经详细说了 可以看到上面是hive运行的原理图 词法分析 语法分析

P6软件如何设置权重体系

卷首语 同时&#xff0c;由于项目包含不同专业、不同类型的活动&#xff0c;需通过建立科学的测量体系以将底层活动的进度逐层汇总从而获得项目总体进度数据。 权重体系的确定 进度检测权重体系的建立过程&#xff0c;即是确定进度检测层级中的每项元素对其上一级元素进度的…

Github每日精选(第102期): PyGWalker将panda数据帧转换为Tableau风格的用户界面,用于可视化分析

PyGWalker可以简化Jupyter笔记本的数据分析和数据可视化工作流程&#xff0c;方法是将panda数据帧转换为Tableau风格的用户界面进行可视化探索。 PyGWalker&#xff08;发音像“Pig Walker”&#xff0c;只是为了好玩&#xff09;被命名为“Graphic Walker的Python绑定”的缩写…

ChIP-seq 分析:Peak 注释与可视化(9)

1. 基因注释 到目前为止&#xff0c;我们一直在处理对应于转录因子结合的 ChIPseq 峰。顾名思义&#xff0c;转录因子可以影响其靶基因的表达。 转录因子的目标很难单独从 ChIPseq 数据中确定&#xff0c;因此我们通常会通过一组简单的规则来注释基因的峰&#xff1a; 如果峰与…

二月安全月报 | 45亿条快递数据疑泄露,Twitter史上最大规模宕机

为了让大家更全面的了解网络安全的风险&#xff0c;顶象针对每月值得关注的安全技术和事件进行盘点总结。 国内安全热点 &#x1f449;业务安全 男子注册上万账号薅羊毛获利13万 近日&#xff0c;上海市&#xff0c;由闵行区人民检察院提起公诉的刘某某诈骗一案开庭审理&…

Stream流和不可变集合

一、不可变集合 什么是不可变集合&#xff1f; 不可变集合&#xff0c;就是不可被修改的集合。 集合的数据项在创建的时候提供&#xff0c;并且在整个生命周期中都不可改变。否则报错。 为什么要创建不可变集合&#xff1f; 如果某个数据不能被修改&#xff0c;把它防御性地拷…

Apache Airflow Hive Provider 任意Hive命令执行漏洞

漏洞描述 Apache Airflow 是一个以编程方式管理 workflow 的平台&#xff0c;Airflow Hive Provider 是一个使用 SQL 进行读取、写入和管理分布式存储中的大型数据集的工具包&#xff0c;_prepare_cli_cmd 方法用于创建 Hive 连接命令列表。 由于 Airflow Hive Provider 5.1.…

论文阅读:MPViT : Multi-Path Vision Transformer for Dense Prediction

中文标题&#xff1a;基于多路视觉Transformer的密集预测 提出问题 创新点 提出了一种具有多路径结构的多尺度嵌入方法&#xff0c;以同时表示密集预测任务的精细和粗糙特征。全局到局部的特征交互&#xff08;GLI&#xff09;&#xff0c;以同时利用卷积的局部连通性和转换器…

汽车刹车传感

一、方案概述&#xff1a;刹车传感器&#xff0c;作用于刹车系统的传感器类型&#xff0c;帮助驾驶人员判断刹车片的磨损情况&#xff0c;便于及时检修维护&#xff0c;保证制度系正常稳定工作。刹车片报警基本有两种&#xff0c;第一种是比较简单的机械报警&#xff0c;就是当…

Android Framework-Android进程/线程和程序内存优化

Android进程和线程 进程&#xff08;Process&#xff09;是程序的一个运行实例&#xff0c;以区别于“程序”这一静态的概念&#xff1b;而线程&#xff08;Thread&#xff09;则是CPU调度的基本单位。 Android中的程序和进程具体是什么概念呢&#xff1f; 一个应用程序的主入…

十一、Vben框架部分组件样式的重新封装

在使用vben框架的时候发现部分的样式不符合实际的需求&#xff0c;ant-design-vue的样式也不支持我们的需求&#xff0c;那怎么办呢&#xff0c;只能自己来修改&#xff0c;下面我就改大家说说我遇到的一些修改过的样式和组件。 一、inputNumber带前后标志 先看下目前支持的样…

命令查看Linux服务器内存、CPU、显卡、硬盘使用情况

命令查看Linux服务器内存、CPU、显卡、硬盘使用情况 查看内存使用情况 使用命令&#xff1a;free -m 大致结果类似下图&#xff1a; 内存占用情况 参数解释&#xff1a; Mem行&#xff08;单位均为M&#xff09;&#xff1a; total&#xff1a;内存总数used&#xff1a;已…

4.4 like通配符关键字过滤查询数据

文章目录1.概述2.LIKE关键字3.百分号&#xff08;%&#xff09;通配符3.1 单个百分号&#xff08;%&#xff09;通配符3.2 多个百分号&#xff08;%&#xff09;通配符3.3 在值的中间使用百分号&#xff08;%&#xff09;通配符3.4 注意事项4.下划线&#xff08;_&#xff09;通…

centos7 配置samba

samba概述&#xff1a; Windows与Linux之间通信的桥梁&#xff0c;Samba是一个非常强大的文件服务器。Samba端口&#xff1a;udp 137 udp138&#xff0c;tcp139 tcp445。Samba工作模式&#xff1a;C/S模式&#xff08;客户端-服务器&#xff09; samba应用环境 1、文件共享&…