centOS下安裝postgres資料庫

2021-09-25 15:23:33 字數 1072 閱讀 1888

需在root使用者許可權下安裝

yum install 

yum install postgresql11

yum install postgresql11-server

初始化資料庫,並使其自啟動服務

/usr/pgsql-11/bin/postgresql-11-setup initdb

systemctl enable postgresql-11

systemctl start postgresql-11

安裝完成後,系統會自動建立名為postgres的資料庫管理使用者

passwd postgres

changing password for user postgres.

new password:

retype new password:

passwd: all authentication tokens updated successfully.

root使用者下

su postgres  # 切換到資料庫使用者

bash-4.2$ psql # 進入資料庫終端

psql (11.4)

type "help" for help.

postgres=#

非root使用者

su eshel

su postgres

password: # 需輸入postgres使用者密碼

bash-4.2$ psql

psql (11.4)

type "help" for help.

postgres=#

postgres=# \q  

bash-4.2$ exit

centOS系統下安裝和配置postgreDB

版本資訊 系統 centos linux release 7.7.1908 core 資料庫版本 postgresql 10.10,64 bit 訪問postgre官網,獲取想要的版本,本人比較保守,選擇了老版本 01.安裝rpm檔案 yum install02.安裝客戶端 這次安裝其實我沒有做,也...

CentOS下安裝linux kernel原始碼

1.centos下安裝linux kernel的原始碼 以root使用者進行以下操作 yum install rpm build yum install redhat rpm config lynx rpm ivh kernel 2.6.32 71.el6.src.rpm 3.執行rpmbuild命...

centos下mysqlreport安裝和使用

首先檢視你的機器是否安裝了perl perl v 顯示版本號即表示已安裝 然後 yum install perl dbd mysql perl dbi yum install mysqlreport ok,到這裡就安裝成功了。使用的時候大概是這樣 mysqlreport user password ...