Postgres-为Fedora 14安装和创建数据库和用户
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Postgres-为Fedora 14安装和创建数据库和用户相关的知识,希望对你有一定的参考价值。
#Fedora % sudo rpm -Uvh http://yum.pgrpms.org/reporpms/8.4/pgdg-fedora-8.4-2.noarch.rpm % sudo yum install postgresql postgresql-server postgresql-contrib #Initialize % service postgresql initdb # Edit conf adding permited addresses and port % nano -w /var/lib/pgsql/data/postgresql.conf # listen_addresses = '*' # port = 5432 # Edit damned pg_hba.conf and allow login for no encryption for local and network connections # "local" is for Unix domain socket connections only local all all password #IPv4 local connections: host all all 127.0.0.1/32 password # Start postgres % service postgresql start # Create database % su postgres % createdb test # Login on database % psql test # Create new role with grants to database test=# # Create new superuser to connect to test database test=# CREATE ROLE testuser WITH SUPERUSER LOGIN PASSWORD 'test';
以上是关于Postgres-为Fedora 14安装和创建数据库和用户的主要内容,如果未能解决你的问题,请参考以下文章
VMware安装Fedora 35 Workstation及使用体验
VMware安装Fedora 35 Workstation及使用体验