您好,登錄后才能下訂單哦!
一、yum安裝pgsql10
二、
一、yum安裝pgsql10
創(chuàng)建用戶
[root@localhost ~]#useradd postgres
配置你的yum存儲(chǔ)庫
[root@localhost ~]# vim /etc/yum.repos.d/CentOS-Base.repo
[base] 和[updates] 區(qū)段之間添加:
exclude=postgresql*
安裝pg的rpm文件
[root@localhost ~]# yum localinstall https://download.postgresql.org/pub/repos/yum/testing/10/redhat/rhel-7-x86_64/pgdg-centos10-10-1.noarch.rpm
安裝pg數(shù)據(jù)庫
[root@localhost ~]# yum list postgresql*
[root@localhost ~]# yum install postgresql10-server.x86_64
[root@localhost ~]# mkdir postgres /var/lib/pgsql/10/data
初始化數(shù)據(jù)庫
[root@localhost ~]# /usr/pgsql-10/bin/postgresql10-setup initdb
Initializing database ... OK
[root@localhost ~]# su - postgres
[postgres@localhost ~]$ /usr/pgsql-10/bin/pg_ctl -D /var/lib/pgsql/10/data start
[postgres@localhost ~]$ /usr/pgsql-10/bin/psql -p 5432
psql (10devel)
輸入 "help" 來獲取幫助信息.
postgres=#
安裝完成!
2.2 修改配置文件,允許遠(yuǎn)程登陸。
和pg_hba.conf一個(gè)目錄下的,postgresql.conf,
listen_addresses = 'localhost' ,改成listen_addresses = '*'
2.3 修改端口
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。