Ubuntu 16.04 怎样安装 PostgreSQL 和 phpPgAdmin

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu 16.04 怎样安装 PostgreSQL 和 phpPgAdmin相关的知识,希望对你有一定的参考价值。

参考技术A 您好,很高兴能帮助您1.安装PostgreSQL首先根据你的服务器架构添加PostgreSQL库:对CentOS6.x32bit:rpm-Uvhtcpfirewall-cmd--reload3.访问PostgreSQL常用的命令提示符默认情况下数据库名和用户名都是postgres。切换至用户以执行相关操作:su–postgres输入以下命令登陆:psql会有以下样例输出:psql(9.3.5)Type"help"forhelp.Postgres=#可通过输入\q退出postgresql返回命令终端:4.设置用户密码登陆至postgres命令提示符界面su–postgrespsql然后使用命令设置密码postgres=#\passwordpostgresEnternewpassword:Enteritagain:postgres=#\q输入命令以建立PostgreSQL系统管理工具postgres=#CREATEEXTENSIONadminpack;CREATEEXTENSION5.创建用户和数据库例如:用户名:senthil密码:centos数据库名:mydb转到postgres用户su–postgres创建用户senthil$createusersenthil创建数据库$createdbmydb现在登陆至psql提示符界面,为用户senthil设置密码及授权对数据库mydb的访问:$psqlpsql(9.3.5)Type"help"forhelp.postgres=#alterusersenthilwithencryptedpassword'centos';ALTERROLEpostgres=#grantallprivilegesondatabasemydbtosenthil;GRANTpostgres=#6.删除用户和数据库首先转到p...

以上是关于Ubuntu 16.04 怎样安装 PostgreSQL 和 phpPgAdmin的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu 16.04 怎样安装 PostgreSQL 和 phpPgAdmin

怎样在Ubuntu16.04上安装GTK+

ubuntu 16.04怎样配置tftp服务器

Ubuntu Server 16.04 LTS上怎样安装下载安装Nginx并启动

Django,Nginx,Gunicorn。 Ubuntu 16.04 错误

ubuntu16.04 mincon怎样配置