Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: PostgreSQL install problem

  1. #1

    Default PostgreSQL install problem

    I am trying to install PostgreSQL 9.3.5 on OpenSUSE 13.2 via software manager but when I shall create a user I get the following error:

    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"?

    I can not start the service either with: "sudo service start postgresql"

    The install went fine and I have tried restarting the computer. According to tutorials it should be a pretty straight forward task to install PostgreSQL. What am I doing wrong?!?

  2. #2

    Default Re: PostgreSQL install problem

    Quote Originally Posted by fhansson925 View Post
    The install went fine and I have tried restarting the computer. According to tutorials it should be a pretty straight forward task to install PostgreSQL. What am I doing wrong?!?
    I have never used PostgreSQL myself. But you do have to start the service first indeed (or make it start automatically at boot by "enabling" the service).

    Code:
    I can not start the service either with: "sudo service start postgresql"
    Try "sudo systemctl start postgresql" instead.

    Then check whether it's running with "sudo systemctl status postgresql", if the start failed this might also give a clue why.

    If starting works, make it start automatically on boot with "sudo systemctl enable postgresql".

    You can also use YaST->System->Services Manager for all of that.

  3. #3

    Default Re: PostgreSQL install problem

    Yes, thanks. But there is no service called postgresql in the Services Manager either. Have I forgot to install something? According to tutorials it should be enough to mark postgresql packages in Software Manager and then create a user for the DB.

  4. #4
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: PostgreSQL install problem

    Did you remember to install the postgresql-server or did you just install the client tools?

    postgresql package only contains the client tools, -server is a separate package.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  5. #5

    Default Re: PostgreSQL install problem

    Quote Originally Posted by Miuku View Post
    Did you remember to install the postgresql-server or did you just install the client tools?

    postgresql package only contains the client tools, -server is a separate package.
    Yes, all packages are installed. I finally managed to find a tutorial that actually WORKED even though everything did not match OpenSUSE 13.2: http://garajeando.blogspot.se/2011/0...admin3-in.html

    I can still not see any service called postgresql but it is possible to start the database with sudo rcpostgresql start.


    The documentation for installing PostgreSQL in OpenSUSE is very bad and confusing imho..

  6. #6

    Default Re: PostgreSQL install problem

    Quote Originally Posted by fhansson925 View Post
    I can still not see any service called postgresql but it is possible to start the database with sudo rcpostgresql start.
    That might be a bug in YaST's Services Manager. AFAIK an update that fixes similar problems is already underway.

    Still, "sudo systemctl start postgresql" as I told you should have worked as well.

    The documentation for installing PostgreSQL in OpenSUSE is very bad and confusing imho..
    Well, write a better one!

  7. #7
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: PostgreSQL install problem

    Quote Originally Posted by fhansson925 View Post
    The documentation for installing PostgreSQL in OpenSUSE is very bad and confusing imho..
    Postgre is a bit of an oddity and that may contribute to its lack of documentation, I normally don't even use it because MariaDB 10.x and MySQL 5.6+ offer essentially the same performance and scalability for most applications and have better documentation and community support.

    For most use cases I would just advice people to go for MariaDB unless they have a very specific need.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  8. #8

    Default Re: PostgreSQL install problem

    Quote Originally Posted by wolfi323 View Post
    That might be a bug in YaST's Services Manager. AFAIK an update that fixes similar problems is already underway.

    Still, "sudo systemctl start postgresql" as I told you should have worked as well.
    No, the only way that worked was to use the rcpostgresql command. There is a file called postgresql in /etc/init.d/ but it seems OpenSUSE has mixed up the services for some reason.

    Quote Originally Posted by wolfi323 View Post
    Well, write a better one!
    Maybe, but the official PostgreSQL documentation is **** and only references to Ubuntu which happens to be common these days. For example, it took me a while to figure out the installation location which is /usr/local/pgsql according to the official documentation but in OpenSUSE it is /var/lib/pgsql/. It is very confusing..

  9. #9

    Default Re: PostgreSQL install problem

    Quote Originally Posted by Miuku View Post
    Postgre is a bit of an oddity and that may contribute to its lack of documentation, I normally don't even use it because MariaDB 10.x and MySQL 5.6+ offer essentially the same performance and scalability for most applications and have better documentation and community support.

    For most use cases I would just advice people to go for MariaDB unless they have a very specific need.
    Yes, the reason I need PostgreSQL is because I am setting up an Odoo ERP server for evaluation, that is going to be the next headache! There are much more documentation how to set up a LAMP server in OpenSUSE but that is not interesting for me. There are also better tutorials for Ubuntu and Red Hat but I prefer SUSE in an enterprise server for several reasons.

  10. #10

    Default Re: PostgreSQL install problem

    Quote Originally Posted by fhansson925 View Post
    No, the only way that worked was to use the rcpostgresql command. There is a file called postgresql in /etc/init.d/ but it seems OpenSUSE has mixed up the services for some reason.
    Hm?
    Why do you think openSUSE has mixed up anything?

    rcpostgresql is just a symlink to /etc/init.d/postgresql, i.e. you actually run "/etc/init.d/postgresql start".

    Still, as systemd supports old-style init scripts in /etc/init.d/, "systemctl start postgresql" should work as well.
    If not, there's a bug somewhere.
    What error message do you get when you run "sudo systemctl start postgresql"?

    As I said, I never used PostgreSQL myself, nor did I ever install it.

    Maybe, but the official PostgreSQL documentation is **** and only references to Ubuntu which happens to be common these days. For example, it took me a while to figure out the installation location which is /usr/local/pgsql according to the official documentation but in OpenSUSE it is /var/lib/pgsql/. It is very confusing..
    So you are talking about the official PostgreSQL documentation?
    Well, I don't think anybody here can help with that...

    Btw, it probably would end up in /usr/local/pgsql, if you would compile PostgreSQL from source yourself (with the default options).
    But a distribution (well, openSUSE at least) does not use /usr/local/ at all, as this is intended for _local_ stuff, i.e. things the admin installs on this local installation.

    You can inspect what files a package contains (and where they are installed) by selecting the package in YaST->Software Management and clicking on "File list" below the package list, or run "rpm -ql xxx" (where xxx is the name of the package).

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •