Compile and install PostgreSQL in Mac OSX
Originally, the official installation package was used. However, the installation package will create postgre, which is a bit uncomfortable on the login interface. After searching for a long time, I did not find a tutorial on how to compile and install it under osx, in addition, compiling and installation methods based on official documents will surely cause you to crash. Based on the idea similar to source code installation, based on past experience in Linux, the installation methods have been successfully implemented, be sure to install commander line developers.
./Configure
Make
Sudo mkdir/u01
Sudo mkdir-p/u01/pgdata
Sudo chown-R bkjia: staff/u01/pgdata
Sudo make install
Vi. bash_profile
Export PGDATA =/u01/pgdata
Export PG_HOME =/usr/local/pgsql
Export PGDATABASE = postgres
Export PATH =/usr/local/bin: $ PG_HOME/bin: $ PATH
Export LD_LIBRARY_PATH = $ PG_HOME/lib: $ LD_LIBRARY_PATH
Export DYLD_LIBRARY_PATH = $ PG_HOME/lib: $ DYLD_LIBRARY_PATH
Initdb/u01/pgdata-E utf8
Pg_ctl-l $ PGDATA/server. log start
Bkjia :~ Gtlions $ ps-ef | grep postgres
501 1624 1622 0 AM ?? 0: 00. 00 postgres: checkpointer process
501 1625 1622 0 AM ?? 0: 00. 02 postgres: writer process
501 1626 1622 0 AM ?? 0: 00. 00 postgres: wal writer process
501 1627 1622 0 AM ?? 0: 00. 00 postgres: autovacuum launcher process
501 1628 1622 0 AM ?? 0: 00. 00 s: stats collector process
501 1622 1 0 am ttys001. 02/usr/local/pgsql/bin/postgres
501 1636 1613 0 ttys001. 00 grep postgres
Bkjia :~ Gtlions $ psql-l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
----------- + --------- + ---------- + ------------- + ---------------------
Postgres | bkjia | UTF8 | zh_CN.UTF-8 | zh_CN.UTF-8 |
Template0 | bkjia | UTF8 | zh_CN.UTF-8 | = c/bkjia +
| Bkjia = CTc/gtlions
Template1 | bkjia | UTF8 | zh_CN.UTF-8 | = c/bkjia +
| Bkjia = CTc/gtlions
(3 rows)
Bkjia :~ Gtlions $ psql-ac "select version ();"
Select version ();
Version
Certificate -----------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 9.3.5 on x86_64-apple-darwin14.0.0, compiled by Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn), 64-bit
(1 row)
Bkjia :~ Gtlions $
-EOF-
------------------------------------ Lili split line ------------------------------------
Install PostgreSQL 6.3 on yum in CentOS 9.3
PostgreSQL cache details
Compiling PostgreSQL on Windows
Configuration and installation of LAPP (Linux + Apache + PostgreSQL + PHP) Environment in Ubuntu
Install and configure phppgAdmin on Ubuntu
Install PostgreSQL9.3 on CentOS
Configure a Streaming Replication cluster in PostgreSQL
How to install PostgreSQL 7/6 and phpPgAdmin in CentOS 5/6. 4
------------------------------------ Lili split line ------------------------------------
PostgreSQL details: click here
PostgreSQL: click here
This article permanently updates the link address: