Re: Postgresql setup on Debian system
On Tue, Dec 10, 2013 at 06:25:16PM -0800, Gary Roach wrote: automatically (I think). I found the Debian README confusing, especially in regards to setting up a special shell that I don't think I need. Are you referring to the postgres user? -- If you're not careful, the newspapers will have you hating the people who are being oppressed, and loving the people who are doing the oppressing. --- Malcolm X -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20131211121125.GB12607@tal
Re: Postgresql setup on Debian system
On 12/10/2013 11:13 PM, Raffaele Morelli wrote: 2013/12/11 Gary Roach gary719_li...@verizon.net mailto:gary719_li...@verizon.net I just switched from using PHP and Mysql to Python / Django and Postgresql. I am having trouble with the setup of Postgresql permissions. I am locked out of some parts of the system and am unsure when to use postgres login vs user login. Most of the Postgresql instructions are written for non-debian like installations. They have one do a bunch of things that Debian does automatically (I think). I found the Debian README confusing, especially in regards to setting up a special shell that I don't think I need. Most of the instructions seem to have already been done automatically. Debian does not tweak things for you, the special shell you are talking about is just (I guess) the psql terminal interface to postgres. Postgres permissions administration is not trivial and if you are looking for security on a per database basis you should read carefully how it works. http://www.postgresql.org/docs/9.1/static/client-authentication.html BTW you are not clear: what are you trying to achieve? Not too surprising that I wasn't clear. I feel like I'm floundering around. I am trying to build a data archiving system that will have multiple levels of users and has a web page access system. Python, Django, html and javascript will take care of most of the project. I just need to get the permissions setup for Postgresql. Thanks for pointing out Chapter 19 of the manual. I haven't read it yet but will do so asap. I guess I am primarily struggling with the setting up of accounts and roles; which I guess is about 90% of the database setup. I probably need to just read more and hope for the best. Gary R.
Re: Postgresql setup on Debian system
2013/12/11 Gary Roach gary719_li...@verizon.net On 12/10/2013 11:13 PM, Raffaele Morelli wrote: BTW you are not clear: what are you trying to achieve? Not too surprising that I wasn't clear. I feel like I'm floundering around. I am trying to build a data archiving system that will have multiple levels of users and has a web page access system. Python, Django, html and javascript will take care of most of the project. I just need to get the permissions setup for Postgresql. Thanks for pointing out Chapter 19 of the manual. I haven’t read it yet but will do so asap. I guess I am primarily struggling with the setting up of accounts and roles; which I guess is about 90% of the database setup. I probably need to just read more and hope for the best. Gary R. you are using a frontend that should keep care of user permissions, then you should create one role (user) on postgres with all permission on a database he must own. so, as user postgres create a role for the frontend (eg. groach), then log into postgres as groach and create a database (eg. mydatabase). pgadmin or phppgadmin are your friends if you're not familiar with terminal interfaces in doing this. next add the relevant line to your pg_hba.conf (first line is for clarity). this will grant connection to database `mydatabase` to user `groach` from all ip addresses, using md5 encryption method. # TYPE DATABASEUSERADDRESS METHOD hostmydatabasegroachall md5
Postgresql setup on Debian system
I just switched from using PHP and Mysql to Python / Django and Postgresql. I am having trouble with the setup of Postgresql permissions. I am locked out of some parts of the system and am unsure when to use postgres login vs user login. Most of the Postgresql instructions are written for non-debian like installations. They have one do a bunch of things that Debian does automatically (I think). I found the Debian README confusing, especially in regards to setting up a special shell that I don't think I need. Most of the instructions seem to have already been done automatically. I'm using Debian Wheezy with a KDE4 desktop. My main problem is security although I am not sure whether there are any tweeks that need to be done manually. Tweeks seem to be the rule for most installations. If I seem vague, it's because I'm confused. I need information on security for the engine vs. the individual databases etc. There are various references to changes needed in config files and as mentioned above, the set up of a special shell for Postgresql. I don't understand the need for the shell and don't believe that a lot of the scripts and config changes are necessary if you are using Debian. Most of the documentation I have found seems to concentrate on Windoz and Mac installations. If someone knows where there is an up to date road map for a debian installation I will be eternally grateful. I'm not trying to become a guru on the system, I just want the damn thing to work. Gary R. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/52a7cd0c.2080...@verizon.net
Re: Postgresql setup on Debian system
2013/12/11 Gary Roach gary719_li...@verizon.net I just switched from using PHP and Mysql to Python / Django and Postgresql. I am having trouble with the setup of Postgresql permissions. I am locked out of some parts of the system and am unsure when to use postgres login vs user login. Most of the Postgresql instructions are written for non-debian like installations. They have one do a bunch of things that Debian does automatically (I think). I found the Debian README confusing, especially in regards to setting up a special shell that I don't think I need. Most of the instructions seem to have already been done automatically. Debian does not tweak things for you, the special shell you are talking about is just (I guess) the psql terminal interface to postgres. Postgres permissions administration is not trivial and if you are looking for security on a per database basis you should read carefully how it works. http://www.postgresql.org/docs/9.1/static/client-authentication.html BTW you are not clear: what are you trying to achieve?
Re: postgresql setup
On Fri, Jan 30, 2009 at 10:02:01AM -0200, Eduardo M KALINOWSKI wrote: Jude DaShiell wrote: Okay, I figured all of it out. postgresql is uninstallable because postgresql-common requires postgresql79 and that's uninstallable. I'm probably feeding a troll right now (and I know I shouldn't), but neither the etch nor the lenny/sid versions of 'postgresql' depend on 'postgresql79'. It's definitely not a Debian package name in any suite. It doesn't exist. merkel% psql -d projectb -c SELECT package FROM binaries WHERE package = 'postgresql79'; package - (0 rows) Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `-GPG Public Key: 0x25BFB848 Please GPG sign your mail. signature.asc Description: Digital signature
Re: postgresql setup
Jude DaShiell wrote: Okay, I figured all of it out. postgresql is uninstallable because postgresql-common requires postgresql79 and that's uninstallable. I'm probably feeding a troll right now (and I know I shouldn't), but neither the etch nor the lenny/sid versions of 'postgresql' depend on 'postgresql79'. -- It's raisins that make Post Raisin Bran so raisiny ... Eduardo M KALINOWSKI edua...@kalinowski.com.br http://move.to/hpkb -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
postgresql setup
I found out a little more just now. Having failed to find the debian packager's installation instructions for postgresql I removed the packages from this system. Later I figured to install everything and take another look. I used the current sid tasksel and checked data base and hit ok. The installation went error free until after postgresql-doc got installed then tasksel failed with an error code of 255. So current version of tasksel is not the way to get this done. I'll check out aptitude and see what if any it can clean up and straighten out then do a command line aptitude command to download and install the rest of what's needed. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: postgresql setup
On Thu, Jan 29, 2009 at 04:19:40PM -0500, Jude DaShiell wrote: I found out a little more just now. Having failed to find the debian packager's installation instructions for postgresql I removed the packages from this system. Later I figured to install everything and take another look. I used the current sid tasksel and checked data base and hit ok. The installation went error free until after postgresql-doc got installed then tasksel failed with an error code of 255. So current version of tasksel is not the way to get this done. I'll check out aptitude and see what if any it can clean up and straighten out then do a command line aptitude command to download and install the rest of what's needed. What do you need, exactly? For the server basically install the package postgresql. Then if you need to add users or manage the database in any way, su - postgres -- Tzafrir Cohen | tzaf...@jabber.org | VIM is http://tzafrir.org.il || a Mutt's tzaf...@cohens.org.il || best ICQ# 16849754 || friend -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
re: postgresql setup
Okay, I figured all of it out. postgresql is uninstallable because postgresql-common requires postgresql79 and that's uninstallable. That sets up a situation almost similar to what I encountered when I tried installing emacs and gnus but at least gnus is already in the current version of emacs. So I cleaned out postgresql and will probably be doing my data base work with mysql until mysql gets broken by updates. At least this isn't windows, -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
re: postgresql setup
This gets stranger by the second. I managed to get postgresql going as user postgres with postgresql -h 127.0.0.1 cr. Then I was able to run createuser dashielljt successfully and createdb too. So I exited the postgres identity and dropped back to dashielljt and tried psql -h 127.0.0.1 and psql asked if connections were being accepted locally on 127.0.0.1 and would not run. so I go back to postgres and ran psql -s and got psql up. I tried \i basics.sql in the /usr/share/doc/postgresql-doc-8.3 tutorial directory and perfectly useable sql queries came up and ran on a weather table several operations for San Fransisco and Hayward. So I'm pretty sure something needs configuring and then it will run. I've been warned about localhost and maybe the warning is correct even without an ssh server installed. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: re: postgresql setup
On Wed, 28 Jan 2009 23:40:12 +0100, Jude DaShiell wrote: This gets stranger by the second. I managed to get postgresql going as user postgres with postgresql -h 127.0.0.1 cr. Then I was able to run createuser dashielljt successfully and createdb too. So I exited the postgres identity and dropped back to dashielljt and tried psql -h 127.0.0.1 and psql asked if connections were being accepted locally on 127.0.0.1 and would not run. This sounds as if the service is configured but perhaps not yet started. Run something like `/etc/init.d/postgresql-8.3 restart` as root and tell us what happens then try your psql call again. -- Regards Alex -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
re: postgresql setup
It makes no difference if you've done su - postgres before running createuser, the same error message appears. I checked that to make sure. I do have a firewall up and running on this machine and port 5432 is not open to the world if that helps any. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
re: postgresql setup
I installed version 8.3.5 with tasksel. When I ran initdb, it ran in debug mode but ran successfully so far as I can tell. I was then able to run postgres -D /usr/local/postgresql/data and the message that came back said postgres was ready to accept connections. I exited that and the database system shut down. Then I tried createuser dashielljt and the following came back as an error dialog. cut here. Script started on Sun 25 Jan 2009 05:56:42 AM EST verizon:~# createuser dashielljt Shall the new role be a superuser? (y/n) y createuser: could not connect to database postgres: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket /var/run/postgresql/.s.PGSQL.5432? verizon:~# exit exit Script done on Sun 25 Jan 2009 05:57:09 AM EST cut here. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
re: postgresql setup
On Sun, 2009-01-25 at 06:04 -0500, Jude DaShiell wrote: Script started on Sun 25 Jan 2009 05:56:42 AM EST verizon:~# createuser dashielljt Shall the new role be a superuser? (y/n) y createuser: could not connect to database postgres: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket /var/run/postgresql/.s.PGSQL.5432? verizon:~# exit I'm not sure why those particular messages, but I'd normally su to 'postgres' to do administrative stuff like that. Does that help? Richard -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
postgresql setup question
I managed to make the postgresql cluster with initdb but can't do anything with createuser because postgresql by default is trying to use a unix socket at address 5432. I'm running on amd hardware and don't know what needs to be done to either enable this socket or go with another alternative so this socket problem goes away. In earlier notes I had used to set up earlier versions of postgresql which I used to try to set 8.3 up I didn't have this problem so am wondering what additional information I need. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: postgresql setup question
On 01/24/2009 06:37 AM, Jude DaShiell wrote: I managed to make the postgresql cluster with initdb but can't do Are you *sure* that PostgreSQL is clusterable? anything with createuser because postgresql by default is trying to use a unix socket at address 5432. I'm running on amd hardware and don't know what needs to be done to either enable this socket or go with another alternative so this socket problem goes away. In earlier notes I had used to set up earlier versions of postgresql which I used to try to set 8.3 up I didn't have this problem so am wondering what additional information I need. What error message are you getting? Are you also running an earlier version of PostgresSQL? I *know* that there's a way to tell PG to use an alternate port. There should be something in the conf file. (It's been a while since I've used PG, so don't remember the specifics. Google should help.) -- Ron Johnson, Jr. Jefferson LA USA I am not surprised, for we live long and are celebrated poopers. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org