当前位置:网站首页>PostgreSQL installation
PostgreSQL installation
2022-07-03 13:09:00 【liliang950210】
- Get installation package
http://www.postgres.cn/v2/download Download the corresponding source installation package
- Unzip package
Upload the software package to the server directory
decompression :tar xjvf postgresql*.bz2 # Extract to a directory
- Preconfigured
cd potgresql-12.2 # The directory extracted above
./configure --prefix=/opt/pgsql # To be installed to /opt/pgsql
- Compilation and installation
make world
make install-world
- Create installation users
useradd postgres -m
- Create a database data directory and empower the installation user
mkdir /opt/pgsql/data
chown -R postgres:postgres /opt/pgsql/data
- Set the environment variable
su - postgres
vi .bashrc
Add... At the end of the file :
export PGDATA=/opt/pgsql/data
export PGHOME=/opt/pgsql
export PATH=$PATH:$PGHOME/bin
- postgres Initialize database under user
Initdb -D $PGDATA
- Start database
pg_ctl -D $PGDATA start
- Create database
createdb testdb #testdb Name the database
- Log in to the database
psql testdb
Reference resources :http://www.postgres.cn/v2/download
边栏推荐
- Tianyi ty1208-z brush machine detailed tutorial (free to remove)
- Kotlin notes - popular knowledge points asterisk (*)
- [problem exploration and solution of one or more filters or listeners failing to start]
- Kotlin - 改良装饰者模式
- Sitescms v3.1.0 release, launch wechat applet
- Image component in ETS development mode of openharmony application development
- 2022-02-14 analysis of the startup and request processing process of the incluxdb cluster Coordinator
- 有限状态机FSM
- Integer case study of packaging
- [Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter V exercises]
猜你喜欢

35道MySQL面试必问题图解,这样也太好理解了吧

Harmonic current detection based on synchronous coordinate transformation

Sword finger offer 12 Path in matrix

Some thoughts on business

Xctf mobile--app1 problem solving

Node. Js: use of express + MySQL

基于同步坐标变换的谐波电流检测
![[problem exploration and solution of one or more filters or listeners failing to start]](/img/82/e7730d289c4c1c4800b520c58d975a.jpg)
[problem exploration and solution of one or more filters or listeners failing to start]

Method overloading and rewriting

2022-02-14 incluxdb cluster write data writetoshard parsing
随机推荐
Using swift language features, write a pseudo-random number generator casually
C graphical tutorial (Fourth Edition)_ Chapter 18 enumerator and iterator: enumerator samplep340
Application of ncnn Neural Network Computing Framework in Orange Pi 3 Lts Development Board
C graphical tutorial (Fourth Edition)_ Chapter 20 asynchronous programming: examples - cases without asynchronous
C graphical tutorial (Fourth Edition)_ Chapter 17 generic: genericsamplep315
解决 System has not been booted with systemd as init system (PID 1). Can‘t operate.
剑指 Offer 15. 二进制中1的个数
【R】 [density clustering, hierarchical clustering, expectation maximization clustering]
Glide 4.6.1 API initial
[exercise 6] [Database Principle]
【R】【密度聚类、层次聚类、期望最大化聚类】
C graphical tutorial (Fourth Edition)_ Chapter 20 asynchronous programming: examples - using asynchronous
Logback 日志框架
Xctf mobile--rememberother problem solving
电压环对 PFC 系统性能影响分析
Image component in ETS development mode of openharmony application development
[combinatorics] permutation and combination (multiple set permutation | multiple set full permutation | multiple set incomplete permutation all elements have a repetition greater than the permutation
When the R language output rmarkdown is in other formats (such as PDF), an error is reported, latex failed to compile stocks Tex. solution
Swift bit operation exercise
Application of ncnn neural network computing framework in orange school orangepi 3 lts development board