Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Postgresql

  1. #1

    Default Postgresql

    Trying to install Postgresql

    https://software.opensuse.org/package/postgresql10


    It looks like a successful install but then I run into the issue below:


    Code:
    by79@linux-3ztp:~> systemctl start postgresql
    Failed to start postgresql.service: Unit postgresql.service failed to load: No such file or directory.
    by79@linux-3ztp:~> sudo systemctl -l status postgresql
    ● postgresql.service
       Loaded: not-found (Reason: No such file or directory)
       Active: inactive (dead)

    Any ideas?

    Thanks!

  2. #2
    Join Date
    Mar 2011
    Location
    Sauerland
    Posts
    4,067

    Default AW: Postgresql

    Please post
    Code:
    zypper se -si postgresql

  3. #3
    Join Date
    Mar 2011
    Location
    Sauerland
    Posts
    4,067

    Default AW: Postgresql

    The service is in the postgresql-server.rpm and requires root:
    Code:
    linux64:~ # systemctl start postgresql.service 
    linux64:~ # systemctl status postgresql.service 
    ● postgresql.service - PostgreSQL database server
       Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
       Active: active (running) since Sat 2018-11-03 09:14:47 CET; 14s ago
      Process: 7822 ExecStart=/usr/share/postgresql/postgresql-script start (code=exited, status=0/SUCCESS)
     Main PID: 7846 (postgres)
        Tasks: 8 (limit: 4915)
       CGroup: /system.slice/postgresql.service
               ├─7846 /usr/lib/postgresql10/bin/postgres -D /var/lib/pgsql/data
               ├─7847 postgres: logger process   
               ├─7849 postgres: checkpointer process   
               ├─7850 postgres: writer process   
               ├─7851 postgres: wal writer process   
               ├─7852 postgres: autovacuum launcher process   
               ├─7853 postgres: stats collector process   
               └─7854 postgres: bgworker: logical replication launcher   
    
    Nov 03 09:14:43 linux64.linux systemd[1]: Starting PostgreSQL database server...
    Nov 03 09:14:43 linux64.linux postgresql-script[7822]: Initializing PostgreSQL 10.5 at location /var/lib>
    Nov 03 09:14:47 linux64.linux postgresql-script[7822]: 2018-11-03 09:14:47.236 CET   [7846]LOG:  listeni>
    Nov 03 09:14:47 linux64.linux postgresql-script[7822]: 2018-11-03 09:14:47.236 CET   [7846]LOG:  could n>
    Nov 03 09:14:47 linux64.linux postgresql-script[7822]: 2018-11-03 09:14:47.236 CET   [7846]HINT:  Is ano>
    Nov 03 09:14:47 linux64.linux postgresql-script[7822]: 2018-11-03 09:14:47.238 CET   [7846]LOG:  listeni>
    Nov 03 09:14:47 linux64.linux postgresql-script[7822]: 2018-11-03 09:14:47.242 CET   [7846]LOG:  listeni>
    Nov 03 09:14:47 linux64.linux postgresql-script[7822]: 2018-11-03 09:14:47.274 CET   [7846]LOG:  redirec>
    Nov 03 09:14:47 linux64.linux postgresql-script[7822]: 2018-11-03 09:14:47.274 CET   [7846]HINT:  Future>
    Nov 03 09:14:47 linux64.linux systemd[1]: Started PostgreSQL database server.

  4. #4

    Default Re: Postgresql

    Hi,

    Code:
    by79@linux-3ztp:~> systemctl start postgresql.service
    Failed to start postgresql.service: Unit postgresql.service failed to load: No such file or directory.
    by79@linux-3ztp:~> systemctl status postgresql.service
    ● postgresql.service
       Loaded: not-found (Reason: No such file or directory)
       Active: inactive (dead)
    by79@linux-3ztp:~> zypper se -si postgresql
    Loading repository data...
    Reading installed packages...
    
    S  | Name         | Type    | Version  | Arch   | Repository                
    ---+--------------+---------+----------+--------+---------------------------
    i+ | postgresql   | package | 11-2.3   | noarch | server:database:postgresql
    i+ | postgresql10 | package | 10.5-2.1 | x86_64 | openSUSE-Leap-42.3-Update 
    i  | postgresql11 | package | 11.0-1.3 | x86_64 | server:database:postgresql
    by79@linux-3ztp:~>

  5. #5
    Join Date
    Mar 2011
    Location
    Sauerland
    Posts
    4,067

    Default AW: Postgresql

    qed

    The service is in the postgresql-server.rpm and requires root:
    Read carefully.
    Last edited by Sauerland; 03-Nov-2018 at 02:46.

  6. #6
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Postgresql

    one more thing to consider afaik postgresql requires a postgresql user to access the server and it refuses connections from localhost you need to edit some files before you can access the server from localhost also don't forget to create a postgresql user login to that account before accessing the server
    http://suite.opengeo.org/docs/latest...stconnect.html

    ps don't forget to open the postgresql ports in firewalld or you won't get any connections

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,477
    Blog Entries
    2

    Default Re: Postgresql

    I don't know if it's relevant,\
    \But you seem to have tried to install PosgreSQL 10.5, but instead installed 11.

    Before installing a major app like a relational database,, I always manually update my machine first. Although you might not have done that, I recommend you run the following now on the chance it might clean up any inconsistencies
    Code:
    zypper up
    You may also want to reboot although it shouldn't ordinarily be required.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #8

    Default Re: Postgresql

    Thanks guys for pointers.

    @Sauerland

    The service is in the postgresql-server.rpm and requires root:
    Tried that again but seems to run into the same problem.

    Code:
    by79@linux-3ztp:~> su
    Password: 
    su: Authentication failure
    by79@linux-3ztp:~> su
    Password: 
    linux-3ztp:/home/by79 # systemctl start postgresql.service
    Failed to start postgresql.service: Unit postgresql.service failed to load: No such file or directory.
    linux-3ztp:/home/by79 # systemctl status postgresql.service
    ● postgresql.service
       Loaded: not-found (Reason: No such file or directory)
       Active: inactive (dead)
    linux-3ztp:/home/by79 #

    @Tsu2

    this is after
    Code:
    zypper up

    You may also want to reboot although it shouldn't ordinarily be required.
    Tried rebooting but same outcome

    I don't know if it's relevant,\
    \But you seem to have tried to install PosgreSQL 10.5, but instead installed 11.
    After 1-click install, and YAST came out, it listed two repos:

    1) http://download.opensuse.org/update/leap/42.3/oss

    and

    2) http://download.opensuse.org/distrib.../42.3/repo/oss

    By default, only the box for "1" is checked but I checked the box for "2" as well before clicking on "Next"

    Not sure if that would install Postgresql 11 as well but it says that the installation is successful. By the way, understand that Postgresql 11 is currently in beta version but don't think that is a big hindrance as I doubt what I plan to do will be that complex for a start. Both 10.5 or 11 will be ok for now. I have not knowingly use postgreql on this computer before as I did a reinstall of Leap 42.3.


    @I_A
    one more thing to consider afaik postgresql requires a postgresql user to access the server and it refuses connections from localhost you need to edit some files before you can access the server from localhost also don't forget to create a postgresql user login to that account before accessing the server
    This is my concern but before that, I just want to know if what I have done so far is correct. Would like to hear from the experts here first as I messed up a previous installation and did a complete reinstall of LEAP 42.3. Try not to go down that path again.

  9. #9
    Join Date
    Mar 2011
    Location
    Sauerland
    Posts
    4,067

    Default AW: Postgresql

    Tried that again but seems to run into the same problem.
    Post
    Code:
    zypper lr -d
    Code:
    zypper se -si postgresql
    Code:
    update-alternatives --config postgresql
    Last edited by Sauerland; 04-Nov-2018 at 00:06.

  10. #10

    Default Re: Postgresql

    Hi Sauerland,

    zypper lr -d
    Code:
    by79@linux-3ztp:~> zypper lr -d
    
     Repository priorities are without effect. All enabled repositories share the same priority.
    
     
     
     #  | Alias                               | Name                                    | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                        | Service
     ---+-------------------------------------+-----------------------------------------+---------+-----------+---------+----------+--------+--------------------------------------------------------------------------------------------+--------
      1 | NVIDIA                              | NVIDIA                                  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://http.download.nvidia.com/opensuse/leap/42.3                                         |         
      2 | google-chrome                       | google-chrome                           | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://dl.google.com/linux/chrome/rpm/stable/x86_64                                        |         
      3 | http-download.opensuse.org-2123bb60 | server:database:postgresql              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_Leap_42.3/ |         
      4 | libdvdcss                           | libdvdcss                               | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://opensuse-guide.org/repo/openSUSE_Leap_42.3/                                         |         
    
      5 | openSUSE-Leap-42.3-0                | openSUSE-Leap-42.3-0                    | No      | ----      | ----    |   99     | yast2  | hd:///?device=/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C531001560725109115-0:0-part1         |         
    
      6 | packman                             | packman                                 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://packman.inode.at/suse/openSUSE_Leap_42.3/                                           |         
      7 | repo-debug                          | openSUSE-Leap-42.3-Debug                | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/debug/distribution/leap/42.3/repo/oss/                        |         
      8 | repo-debug-non-oss                  | openSUSE-Leap-42.3-Debug-Non-Oss        | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/debug/distribution/leap/42.3/repo/non-oss/                    |         
      9 | repo-debug-update                   | openSUSE-Leap-42.3-Update-Debug         | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/debug/update/leap/42.3/oss/                                   |         
     10 | repo-debug-update-non-oss           | openSUSE-Leap-42.3-Update-Debug-Non-Oss | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/debug/update/leap/42.3/non-oss/                               |         
     11 | repo-non-oss                        | openSUSE-Leap-42.3-Non-Oss              | Yes     | (r ) Yes  | Yes     |   99     | yast2  | http://download.opensuse.org/distribution/leap/42.3/repo/non-oss/                          |         
    
     12 | repo-oss                            | openSUSE-Leap-42.3-Oss                 | Yes     | (r ) Yes  | Yes     |   99     | yast2  | http://download.opensuse.org/distribution/leap/42.3/repo/oss/                              |         
    
     13 | repo-source                         | openSUSE-Leap-42.3-Source               | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/source/distribution/leap/42.3/repo/oss/                       |         
     14 | repo-source-non-oss                 | openSUSE-Leap-42.3-Source-Non-Oss       | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/source/distribution/leap/42.3/repo/non-oss/                   |         
     15 | repo-update                         | openSUSE-Leap-42.3-Update               | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/42.3/oss/                                         |         
     16 | repo-update-non-oss                 | openSUSE-Leap-42.3-Update-Non-Oss       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/42.3/non-oss/                                     |         
     by79@linux-3ztp:~>


    zypper se -si postgresql

    Code:
    by79@linux-3ztp:~> zypper se -si postgresql
    Download (curl) error for 'http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_Leap_42.3/media.1/media':
    Error code: Curl error 52
    Error message: Empty reply from server
    
    Abort, retry, ignore? [a/r/i/...? shows all options] (a): r
    Download (curl) error for 'http://download.opensuse.org/update/leap/42.3/non-oss/media.1/media':
    Error code: Curl error 52
    Error message: Empty reply from server
    
    Abort, retry, ignore? [a/r/i/...? shows all options] (a): a
    Repository 'openSUSE-Leap-42.3-Update-Non-Oss' is out-of-date. You can run 'zypper refresh' as root to update it.
    Loading repository data...
    Reading installed packages...
    
    S  | Name         | Type    | Version  | Arch   | Repository                
    ---+--------------+---------+----------+--------+---------------------------
    i+ | postgresql   | package | 11-2.3   | noarch | server:database:postgresql
    i+ | postgresql10 | package | 10.5-2.1 | x86_64 | openSUSE-Leap-42.3-Update 
    i  | postgresql11 | package | 11.0-1.3 | x86_64 | server:database:postgresql
    by79@linux-3ztp:~>


    update-alternatives --config postgresql
    Code:
     by79@linux-3ztp:~> update-alternatives --config postgresql
    
     Absolute path to 'update-alternatives' is '/usr/sbin/update-alternatives', so running it may require superuser privileges (eg. root).
     by79@linux-3ztp:~> sudo update-alternatives --config postgresql
    
     [sudo] password for root:  
    
     There are 2 choices for the alternative postgresql (providing /usr/lib/postgresql).
     
     
       Selection    Path                   Priority   Status
     ------------------------------------------------------------
     * 0            /usr/lib/postgresql11   110       auto mode
       1            /usr/lib/postgresql10   100       manual mode
       2            /usr/lib/postgresql11   110       manual mode
    
     
     
     Press <enter> to keep the current choice[*], or type selection number:

Page 1 of 3 123 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
  •