postgresql-server in opoensuse 11.x

by
Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0StumbleUpon0

PostgreSQL is an object-relational database management system (ORDBMS). It is released under a BSD-style license and is thus free software. As with many other open-source programs, PostgreSQL is not controlled by any single company, but has a global community of developers and companies to develop it.

 

 

Install postgresql-server in opoensuse 11.x

download and install the package:

Unixmen-net:/etc/init.d # zypper install   postgresql-server 

Retrieving repository ‘openSUSE-11.1-Update’ metadata [done]

Building repository ‘openSUSE-11.1-Update’ cache [done]

Loading repository data…

Reading installed packages…

Resolving package dependencies…

The following NEW packages are going to be installed:

postgresql postgresql-server

Overall download size: 4.0 M. After the operation, additional 16.6 M will be used.

Continue? [YES/no]: Y

the installation directory is this : /usr/share/postgresql/

Data and Runtimes file s in : /var/lib/pgsql/

Config files : /var/lib/pgsql/data

For example : pg_hba.conf and postgresql.conf

Now we have to start the server with :

Unixmen-net:/etc/init.d # rcpostgresql start

Initializing the PostgreSQL database at location /var/lib/pgsql/data

done

Starting PostgreSQL done

now we have to add user and password

Unixmen-net:~ # su   - postgres
postgres@Unixmen-net:~> pwd
/var/lib/pgsql
postgres@Unixmen-net:~> psql postgres

Welcome to psql 8.3.7, the PostgreSQL interactive terminal.

Type: copyright for distribution terms

h for help with SQL commands

? for help with psql commands

g or terminate with semicolon to execute query

q to quit

 

Dont forget to edit /var/lib/pgsql/data/pg_hba.conf if you get this error :

Error!

“IDENT authentication failed for user”

and change from

 

localte all all ident sameuser

host all all 127.0.0.1/32 ident sameuser
host all all ::1/128 ident sameuser

to

local all all trsut
host all all 127.0.0.1/32 trust
host all all ::1/128 trust

To create users :

#su   postgres
Unixmen-net:~ # su postgres
postgres@Unixmen-net:/root> createuser   -D   unixmen

could not change directory to “/root”

Shall the new role be a superuser? (y/n) y

create user with password . createuser -D -p user

Now to delete a user :

#dropeuser user

 

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0StumbleUpon0