当前位置:网站首页>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
边栏推荐
- Attack and defense world mobile--ph0en1x-100
- Quick learning 1.8 front and rear interfaces
- [exercise 6] [Database Principle]
- Tencent cloud tdsql database delivery and operation and maintenance Junior Engineer - some questions of Tencent cloud cloudlite certification (TCA) examination
- sitesCMS v3.0.2发布,升级JFinal等依赖
- How to stand out quickly when you are new to the workplace?
- Application of ncnn Neural Network Computing Framework in Orange Pi 3 Lts Development Board
- 【数据库原理及应用教程(第4版|微课版)陈志泊】【第四章习题】
- My creation anniversary: the fifth anniversary
- Analysis of a music player Login Protocol
猜你喜欢

(latest version) WiFi distribution multi format + installation framework

【数据库原理及应用教程(第4版|微课版)陈志泊】【第六章习题】
![[comprehensive question] [Database Principle]](/img/d7/8c51306bb390e0383a017d9097e1e5.png)
[comprehensive question] [Database Principle]

正则表达式

剑指 Offer 14- II. 剪绳子 II

Finite State Machine FSM
![[network counting] Chapter 3 data link layer (2) flow control and reliable transmission, stop waiting protocol, backward n frame protocol (GBN), selective retransmission protocol (SR)](/img/45/c2d7934b886d8090373ca9e6e23c97.gif)
[network counting] Chapter 3 data link layer (2) flow control and reliable transmission, stop waiting protocol, backward n frame protocol (GBN), selective retransmission protocol (SR)
![[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [sqlserver2012 comprehensive exercise]](/img/47/78d9dd098dcb894ba1f459873d5f52.png)
[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [sqlserver2012 comprehensive exercise]

Cache penetration and bloom filter

4. Wireless in vivo nano network: electromagnetic propagation model and key points of sensor deployment
随机推荐
2022-01-27 redis cluster brain crack problem analysis
Sitescms v3.0.2 release, upgrade jfinal and other dependencies
The foreground uses RSA asymmetric security to encrypt user information
2022-02-10 introduction to the design of incluxdb storage engine TSM
Application of ncnn neural network computing framework in orange school orangepi 3 lts development board
【数据库原理及应用教程(第4版|微课版)陈志泊】【第四章习题】
Powerful avatar making artifact wechat applet
[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter V exercises]
4. 无线体内纳米网:电磁传播模型和传感器部署要点
Mysqlbetween implementation selects the data range between two values
Tencent cloud tdsql database delivery and operation and maintenance Junior Engineer - some questions of Tencent cloud cloudlite certification (TCA) examination
【习题五】【数据库原理】
sitesCMS v3.1.0发布,上线微信小程序
[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter IV exercises]
mysqlbetween实现选取介于两个值之间的数据范围
[combinatorics] permutation and combination (the combination number of multiple sets | the repetition of all elements is greater than the combination number | the derivation of the combination number
Sword finger offer 14- ii Cut rope II
ncnn神經網絡計算框架在香柳丁派OrangePi 3 LTS開發板中的使用介紹
Finite State Machine FSM
有限状态机FSM