In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Install source code 1. Redhat7 modify hostname: [root@localhost ~] # hostnamectl set-hostname ygg
Check:
[root@localhost ~] # hostnamectl Static hostname: ygg Icon name: computer-vm Chassis: vm Machine ID: 19e8c6b6164b453b8816e1a002badeec Boot ID: b9793f1a2e8c4dbcbf99f9f011563fe6 Virtualization: vmware Operating System: Red Hat Enterprise Linux Server 7.2 (Maipo) CPE OS Name: cpe:/o:redhat:enterprise_linux:7.2:GA:server Kernel: Linux 3.10.0-327.el7.x86_64 Architecture: x86-64 [root@localhost ~] #
two。 Install dependency package: yum install gcc* gcc-c++* zlib-devel* readline-devel* perl-ExtUtils-Embed* pam-devel* libxml2-devel* libxslt-devel* openldap-devel* python-devel* openssl-devel* cmake* readline* flex* bison* tcl*-y
3. Linux system kernel adjustment:
Vi / etc/sysctl.conf#addkernel.shmmax = 68719476736 # maximum shared memory segment size (default) kernel.shmall = 4294967296 # Total amount of shared memory that can be used (default) kernel.shmmni = 4096 # maximum number of shared memory segments for the whole system kernel.sem = 50100 6412800050100 1280 # per letter The maximum number of signal objects in the number of objects set System-wide # maximum number of signal objects; maximum operands supported by each signal object # system-wide maximum number of signal object sets fs.file-max = 7672460 # maximum number of file handles The file handle setting indicates the number of files that can be opened in the linux system net.ipv4.ip_local_port_range = 9000 65000 # range of IPv4 ports available to applications net.core.rmem_default = 1048576 # default value of socket receive buffer size net.core.wmem_default = 262144 # default value of socket send buffer size Net.core.wmem_max = 1048576 # maximum size of socket send buffer size
Kernel parameters take effect:
Sysctl-p4. Turn off the firewall and selinux.
5. Create a user:
[root@ygg soft] # useradd postgresql [root@ygg soft] # passwd postgresql
6. Decompress and install: (1) decompress the file:
[root@ygg soft] # su-postgresql [postgresql@ygg ~] $cd / soft/postgresql-10.3.tar.gz rlwrap-0.43rlwrap-0.43.tar.gz [postgresql@ygg soft] $gunzip postgresql-10.3.tar.gz [postgresql@ygg soft] $tar-xf postgresql-10.3.tar [postgresql@ygg soft] $cd postgresql-10.3/ [postgresql@ygg postgresql-10.3] $lltotal 672-rw-r--r--.1 postgresql postgresql 457 Feb 272018 aclocal.m4drwxrwxr-x.2 postgresql postgresql 4096 Feb 272018 config source code installation configuration script-rwxr-xr-x.1 postgresql postgresql 498962 Feb 272018 configure-rw-r--r--.1 postgresql postgresql 76915 Feb 272018 configure.indrwxrwxr-x. 55 postgresql postgresql 4096 Feb 27 2018 contrib has been packaged into PG source code for third-party contributed plug-ins-rw-r--r--.1 postgresql postgresql 1192 Feb 27 2018 COPYRIGHTdrwxrwxr-x.3 postgresql postgresql 101 Feb 27 2018 doc documentation-rw-r--r--.1 postgresql postgresql 3638 Feb 27 2018 GNUmakefile.in-rw-r--r--.1 postgresql postgresql 284 Feb 27 2018 HISTORY version change History-rw-r Postgresql postgresql 71584 Feb 27 2018 INSTALL installation instructions-rw-r--r--.1 postgresql postgresql 1682 Feb 27 2018 Makefile-rw-r--r--.1 postgresql postgresql 1212 Feb 27 2018 READMEdrwxrwxr-x. 16 postgresql postgresql 4096 Feb 272018 src source code (2) configuration compilation installation: configuration help: [postgresql@ygg postgresql-10.3] $. / configure-- help`configure 'configures PostgreSQL 272018 to adapt to many kinds of systems.
Usage:. / configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them asVAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:-h,-- help display this help and exit-- help=short display options specific to this package-- help=recursive display the short help of all the included packages-V,-- version display version information and exit-Q,-- quiet,-- silent do not print `checking...' Messages-- cache-file=FILE cache test results in FILE [disabled]-C,-- config-cache alias for `--cache-file=config.cache'-n,-- no-create do not create output files-- srcdir=DIR find the sources in DIR [configure dir or`..']
Installation directories:-- prefix=PREFIX install architecture-independent files in PREFIX [/ usr/local/pgsql]-- exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX]
By default, `make install' will install all the files in` / usr/local/pgsql/bin', `/ usr/local/pgsql/lib' etc .You can specifyan installation prefix other than` / usr/local/pgsql' using `--prefix',for instance`-- prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:-- bindir=DIR user executables [EPREFIX/bin]-- sbindir=DIR system admin executables [EPREFIX/sbin]-- libexecdir=DIR program executables [EPREFIX/libexec]-- sysconfdir=DIR read-only single-machine data [PREFIX/etc]-- sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]-- localstatedir=DIR modifiable single-machine data [PREFIX/var]-libdir=DIR object code libraries [EPREFIX/lib ]-- includedir=DIR C header files [PREFIX/include]-- oldincludedir=DIR C header files for non-gcc [/ usr/include]-- datarootdir=DIR read-only arch.-independent dataroot [PREFIX/share]-- datadir=DIR read-only architecture-independent data [DATAROOTDIR]-- infodir=DIR info documentation [DATAROOTDIR/info]-- localedir=DIR locale-dependent data [DATAROOTDIR/locale]-mandir=DIR man documentation [ DATAROOTDIR/man]-- docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]-- htmldir=DIR html documentation [DOCDIR]-- dvidir=DIR dvi documentation [DOCDIR]-- pdfdir=DIR pdf documentation [DOCDIR]-- psdir=DIR ps documentation [DOCDIR]
System types:-- build=BUILD configure for building on BUILD [guessed]-- host=HOST cross-compile to build programs to run on HOST [BUILD]
Optional Features:-- disable-option-checking ignore unrecognized-- enable/--with options-- disable-FEATURE do not include FEATURE (same as-- enable-FEATURE=no)-- enable-FEATURE [= ARG] include FEATURE [ARG=yes]-disable-integer-datetimes obsolete option No longer supported-enable-nls [= LANGUAGES] enable Native Language Support-disable-rpath do not embed shared library search path in executables-disable-spinlocks do not use spinlocks-disable-atomics do not use atomic operations-disable-strong-random do not use a strong random number source-enable-debug build with debugging symbols (- g) -enable-profiling build with profiling enabled-- enable-coverage build with coverage testing instrumentation-- enable-dtrace build with DTrace support-- enable-tap-tests enable TAP tests (requires Perl and IPC::Run)-- enable-depend turn on automatic dependency tracking-- enable-cassert enable assertion checks (for debugging)-- disable-thread-safety disable thread-safety in client libraries-- disable-largefile omit support for large Files-disable-float4-byval disable float4 passed by value-disable-float8-byval disable float8 passed by value
Optional Packages:-- with-PACKAGE [= ARG] use PACKAGE [ARG=yes]-without-PACKAGE do not use PACKAGE (same as-- with-PACKAGE=no)-- with-extra-version=STRING append STRING to version-- with-template=NAME override operating system template-- with-includes=DIRS look for additional header files in DIRS-- with-libraries=DIRS look for additional libraries in DIRS-- with-libs=DIRS alternative spelling of-- with-libraries With-pgport=PORTNUM set default port number [5432]-- with-blocksize=BLOCKSIZE set table blocksize in kB [8]-- with-segsize=SEGSIZE set table segment size in GB [1]-- with-wal-blocksize=BLOCKSIZE set WAL blocksize in kB [8]-- with-wal-segsize=SEGSIZE set WAL segment size in MB [16]-- with-CC=CMD Set compiler (deprecated)-with-icu build with ICU support-with-tcl build Tcl modules (PL/Tcl)-with-tclconfig=DIR tclConfig.sh is in DIR-with-perl build Perl modules (PL/Perl)-with-python build Python modules (PL/Python)-with-gssapi build with GSSAPI support-with-krb- Srvnam=NAME default service principal name in Kerberos (GSSAPI) [postgres]-with-pam build with PAM support-- with-bsd-auth build with BSD Authentication support-- with-ldap build with LDAP support-- with-bonjour build with Bonjour support-- with-openssl build with OpenSSL support-- with-selinux build with SELinux support-- With-systemd build with systemd support-without-readline do not use GNU Readline nor BSD Libedit for editing-with-libedit-preferred prefer BSD Libedit over GNU Readline-with-uuid=LIB build contrib/uuid-ossp using LIB (bsd With-ossp-uuid obsolete spelling of-- with-uuid=ossp-- with-libxml build with XML support-- with-libxslt use XSLT support when building contrib/xml2-- with-system-tzdata=DIR use system time zone data in DIR-- without-zlib do not use Zlib-- with-gnu-ld assume the C compiler uses GNU ld [default=no]
Some influential environment variables: CCC compiler command CFLAGSC compiler flags LDFLAGSlinker flags, e.g.-L if you have libraries in a nonstandard directory LIBSlibraries to pass to the linker, e.g.-l CPPFLAGS (Objective) Cmax + preprocessor flags E.g.-I if you have headers in a nonstandard directory CPPC preprocessor PKG_CONFIGpath to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path ICU_CFLAGSC compiler flags for ICU, overriding pkg-config ICU_LIBSlinker flags for ICU, overriding pkg-config LDFLAGS_EXextra linker flags for linking executables only LDFLAGS_SLextra linker flags for linking shared libraries only
Use these variables to override the choices made by `configure' or to helpit to find libraries and programs with nonstandard names/locations.
Report bugs to.
Configuration parameter notes:
[postgresql @ ygg postgresql-10.3] $. / configure-- help`configure'to configure PostgreSQL 10.3 to accommodate multiple systems.
Usage:. / configure [OPTION]... [VAR = VALUE]...
To assign environment variables (such as CC,CFLAGS...), specify them as VAR = VALUE. See below for descriptions of some useful variables.
The default value for the option is specified in square brackets.
Configuration:-help talk help displays this help and exits-- help = options for short display of this package-help = recursive shows short help for all included packages-Vmaine talk version displays version information and exits-QMH talk talk does not print "check." Message-- cache-file = FILE cache test results in FILE [disabled]-C, "- cache-file = config.cache"-- config-cache alias-- NKI Yukuo create does not create an output file-- srcdir = DIR finds the source [configure dir or `..'] in DIR
Installation directory:-- prefix = PREFIX installs architecture-independent files in PREFIX [/ usr / local / pgsql]-- exec-prefix = EPREFIX installs architecture-related files in EPREFIX [prefix]
By default, "make install" installs all files / usr / local / pgsql / bin,/ usr / local / pgsql / lib, and so on. You can specify an installation prefix other than `/ usr / local / pgsql' of`-- prefix', for example, `--prefix = $HOME'.
For better control, use the following options.
Fine-tune the installation directory:-- bindir = DIR user executable [EPREFIX / bin]-- sbindir = DIR system administrator executable [EPREFIX / sbin]-- libexecdir = DIR program executable [EPREFIX / libexec]-- sysconfdir = DIR read-only stand-alone data [PREFIX / etc]-- sharedstatedir = DIR repairable Modified architecture independent data [PREFIX / com]-- localstatedir = DIR modifiable stand-alone data [PREFIX / var]-- libdir = DIR target code base [EPREFIX / lib]-- includedir = DIR C header file [PREFIX / include]-- oldincludedir = non-gcc DIR C header file [/ usr / include]-- datarootdir = DIR read-only independent arch Data root of [PREFIX / share]-- datadir = DIR architecture-independent read-only data [DATAROOTDIR]-- infodir = DIR information document [DATAROOTDIR / info]-- localedir = DIR locale dependent data [DATAROOTDIR / locale]-- mandir = DIR manual file [DATAROOTDIR / man]-- docdir = DIR Document root [DATAROOTDIR / doc / postgresql]-- htmldir = DIR html document [DOCDIR]-- dvidir = DIR dvi document [DOCDIR]-- pdfdir = DIR pdf document [DOCDIR]-- psdir = DIR ps document [DOCDIR]
System type:-- build = BUILD is configured to build [guess] on BUILD-- host = HOST cross-compilation to build programs to run on HOST [BUILD]
Optional feature:-- disable-option-checking ignores unrecognized-- enable /-with options-- disable-FEATURE does not contain FEATURE (same as-- enable-FEATURE = no)-- enable-FEATURE [= ARG] includes function [ARG = yes]-- disable-integer-datetimes outdated option No longer supported-- enable-nls [= LANGUAGES] enables mother tongue support-- disable-rpath does not embed shared library search paths into executables-- disable-spinlocks does not use spin locks-- disable-atomics does not use atomic operations-- disable-strong-random does not use strong random number sources-- enable-debug Build with debug symbols (- g)-enable-profiling builds and enables performance analysis using coverage testing tools to enable coverage builds-enable-dtrace builds with DTrace support-enable-tap-tests enables TAP tests (requires Perl and IPC:: Run)-enable-depend opens from Dynamic dependency tracking-enable-cassert enables assertion checking (for debugging)-disable-thread-safety disables thread safety in client libraries-disable-largefile omits support for large files-disable-float4-byval disables float4--disable-float8-byval passed by value disables float8 passed by value
Optional package:-- with-PACKAGE [= ARG] use package [ARG = yes]-- without-PACKAGE do not use PACKAGE (same as-- with-PACKAGE = no)-- with-extra-version = STRING attach STRING to version-- with-template = NAME overwrite operating system template-- with-includes = DIRS find other header files in DIRS-- with -libraries = DIRS find other libraries in DIRS-- with-libs = DIRS-- alternative spelling of with-libraries-- with-pgport = PORTNUM sets the default port number [5432]-- with-blocksize = blocksize sets the size of the table block to kB [8]-- with-segsize = SEGSIZE sets the size of the table segment in GB [1]-- with-wal-blocksize=blocksize is set in kB Set WAL block size [8]-- with-wal-segsize = SEGSIZE set WAL segment size in MB [16]-- with-CC = CMD setting compiler (not recommended)-- with-icu is built with ICU support-- with-tcl build Tcl module (PL / Tcl)-- with-tclconfig = DIR TclConfig.sh in DIR-- with-perl build Perl module (PL / Perl)-- with-python build Python module (PL / Python)-- with-gssapi build has GSSAPI support-- with-krb-srvnam = NAME Kerberos (GSSAPI) default service principal name [postgres]-- with-pam Establish and support PAM-with-bsd-auth build with BSD authentication support-with-ldap build LDAP support-with-bonjour build with Bonjour support-with-openssl build with OpenSSL support-with-selinux build with SELinux support -- with-systemd built with systemd support-- without-readline do not use GNU Readline or BSD Libedit for editing-- with-libedit-preferred prefers BSD Libedit to GNU Readline-- with-uuid = LIB uses LIB (bsd) E2fs Ossp) build outdated spelling of contrib / uuid-ossp-- with-ossp-uuid-- with-uuid = ossp-- with-libxml build XML support-- with-libxslt uses XSLT support when building contrib / xml2-- with-system-tzdata = DIR uses system time zone data in DIR-- without-zlib do not Use Zlib-- with-gnu-ld to assume that the C compiler uses GNU ld [default = no]
Some influential environment variables: CC C compiler commands CFLAGS C compiler flag LDFLAGS linker flag, such as-L (if you pass to the linker in a non-standard directory LIBS library, such as-l CPPFLAGS (objective) C / C + + preprocessor flag, for example If-I you have the title CPP C preprocessor PKG_CONFIG to pkg-config utility path in a non-standard directory PKG_CONFIG_PATH the directory of the search path to be added to pkg-config PKG_CONFIG_LIBDIR overrides the path of pkg-config 's built-in search path ICU_CFLAGS C compiler flag of ICU Overrides the ICU_LIBS linker flag of pkg-config ICU, overrides the additional linker flag of pkg-config LDFLAGS_EX, and is only used to link the executable file LDFLAGS_SL additional linker flag, only for link shared libraries
Use these variables to override the selections made by `configure' or to help find libraries and programs with non-standard names / locations.
Report an error to.
The current configuration is as follows:
/ configure-- prefix=/home/postgresql/postgresql10/prefix-- exec-prefix=/home/postgresql/postgresql10/execprefix-- htmldir=/home/postgresql/postgresql10/html-- with-pgport=1922-- with-openssl-- with-perl-- with-tcl-- with-python-- with-pam-- without-ldap-- with-libxml-- with-libxslt-- enable-thread-safety-- with-wal-blocksize=16-- with-blocksize=8-- enable-dtrace-- enable-debug
The completion does not report an error as follows:
If an error is reported that the dependency package is missing, follow the prompt to yum the related package and reconfigure it
Compile:
Gmake world-- including all third-party plug-ins compiled
The results are as follows:
Gmake check-world-this needs to be performed by ordinary users, optional and time-consuming
The results are as follows:
Installation:
Gmake install-world-including full installation of third-party plug-ins
7. Configure environment variables:
After the installation is completed according to the current configuration, the relevant directory structure is as follows:
[postgresql@ygg ~] $tree-d.`-- postgresql10 |-- data |-- execprefix | |-- bin | `--lib | |-- pgxs |-- config | |`-- src |-- makefiles | | `--test | |`-- regress | `--pkgconfig | | |-- html | `--html`-- prefix |-- include |-- informix | | `--esql | |-- internal | |`-- libpq | |-- libpq | `--server | |-- access | |-- bootstrap | |-- catalog | | |-- commands | |-- common | |-- datatype | |-- executor | |-- fe_utils | |-- foreign | |-- lib | |-- libpq | |-- mb | |-- nodes | |-- optimizer | |-- parser | |-- port |-- atomics |-- win32 |-- arpa |-- netinet | `--sys | |`-- win32_msvc | | `--| Sys | |-- portability | |-- postmaster | |-- regex | |-- replication | |-- rewrite | |-- snowball | | `--libstemmer | |-- statistics | |-- storage | |-- tcop | | |-- tsearch | | `--dicts |`-- utils `--share |-- doc |`-- extension |-- extension |-- man | |-- man1 | |-- man3 | `--man7 |-- timezone | |-- Africa | |-- America |-- Argentina |-- Indiana |-- Kentucky | | `--North_Dakota | |-- Antarctica | |-- Arctic | |-- Asia | |-- Atlantic | |-- Australia | |-- Brazil | |-- Canada | |-- Chile | |-- Etc | |-- Europe | |-- Indian | |-- Mexico | |-- Pacific | `--US |-- timezonesets`-- tsearch_ data. | Uninstall: how to uninstall after compilation and installation
In general, clear the installation directory, install again you can try to re-specify the path (specify the installation directory at the time of installation) add prefix at the time of installation, otherwise, although you can use the find command to find out some related files, but for modified configuration, such as adding startup items and other operations is not good eradication usually can only be manually cleared with find. So the software usually provides uninstall programs to perform the uninstall operation.
3. Install only the client if you only want to install the client application and interface library, you can use the following command: make-C src/bin installmake-C src/include installmake-C src/interfaces installmake-C doc install
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.