postgresql 数据库 在Red Hat family里的 安装

1.使用yum命令安装在 RHEL 5,6 and 7环境下:

root# yum install postgresql-server

2.for RHEL / CentOS / SL / OL 5,6 环境下完成基础配置及启动服务:   

root# service postgresql initdb
root# chkconfig postgresql on

2.For RHEL / CentOS / SL / OL 7 环境下完成基础配置及启动服务:

root# postgresql-setup initdb
root# systemctl enable postgresql.service
root# systemctl start postgresql.service

3.进入postgres用户下,输入 psql 就可进行数据库操作了。

root# su postgres
bash-4.2$ psql

psql (9.2.24)
Type "help" for help.

postgres=# 

猜你喜欢

转载自www.cnblogs.com/yufu02/p/10171520.html