Google Plus

postgresql-server in opoensuse 11.x

Written by Mel Kham on . Posted in Linux tutorials

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

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

SK

|

Yes i will. Keep visiting. Subscribe us to get daily updates. Thanks for the comment

Rakesh Vijayan

|

Hi SK

I am Rakesh vijayan thanks for your great work ,by your work I start to learn what is ldap , my request is will you make tutorial for ldap and samba pdc for us on ubuntu 12.04

Guest

|

It was a typo. Now its corrected. Thanks for pointing out.

Michael T

|

You shouldn’t be so stupid, in the first time.

PrestaShop

|

Hi! Thank you for this nice article. We’ve 130,000+ active stores, you forgot the “1″ ;-)

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .