How to run pg_ctlcluster with CentOS?












0















I'm using CentOS 7 with EPEL Repo and installed Postgresql 9.6 which is a need for a webshop application. Now some propel installation script wants to execute pg_ctlcluster. The Installation ends with an error:



Exception: sudo: pg_ctlcluster: command not found


I checked /usr/pgsql-9.6/bin, there is only pg_ctl, but no pg_ctlcluster. Some said pg_ctl and pg_ctlcluster are not exactly the same. It looks like pg_ctlcluster is a Ubuntu thing. It's used for Postgres Cluster (...).



Do you have any ideas what's the best way to replace pg_ctlcluster?



Just copy/symlink pg_ctlcluster -> pg_ctl sounds not like it should be. Maybe someone have a suiteable RPM.










share|improve this question





























    0















    I'm using CentOS 7 with EPEL Repo and installed Postgresql 9.6 which is a need for a webshop application. Now some propel installation script wants to execute pg_ctlcluster. The Installation ends with an error:



    Exception: sudo: pg_ctlcluster: command not found


    I checked /usr/pgsql-9.6/bin, there is only pg_ctl, but no pg_ctlcluster. Some said pg_ctl and pg_ctlcluster are not exactly the same. It looks like pg_ctlcluster is a Ubuntu thing. It's used for Postgres Cluster (...).



    Do you have any ideas what's the best way to replace pg_ctlcluster?



    Just copy/symlink pg_ctlcluster -> pg_ctl sounds not like it should be. Maybe someone have a suiteable RPM.










    share|improve this question



























      0












      0








      0








      I'm using CentOS 7 with EPEL Repo and installed Postgresql 9.6 which is a need for a webshop application. Now some propel installation script wants to execute pg_ctlcluster. The Installation ends with an error:



      Exception: sudo: pg_ctlcluster: command not found


      I checked /usr/pgsql-9.6/bin, there is only pg_ctl, but no pg_ctlcluster. Some said pg_ctl and pg_ctlcluster are not exactly the same. It looks like pg_ctlcluster is a Ubuntu thing. It's used for Postgres Cluster (...).



      Do you have any ideas what's the best way to replace pg_ctlcluster?



      Just copy/symlink pg_ctlcluster -> pg_ctl sounds not like it should be. Maybe someone have a suiteable RPM.










      share|improve this question
















      I'm using CentOS 7 with EPEL Repo and installed Postgresql 9.6 which is a need for a webshop application. Now some propel installation script wants to execute pg_ctlcluster. The Installation ends with an error:



      Exception: sudo: pg_ctlcluster: command not found


      I checked /usr/pgsql-9.6/bin, there is only pg_ctl, but no pg_ctlcluster. Some said pg_ctl and pg_ctlcluster are not exactly the same. It looks like pg_ctlcluster is a Ubuntu thing. It's used for Postgres Cluster (...).



      Do you have any ideas what's the best way to replace pg_ctlcluster?



      Just copy/symlink pg_ctlcluster -> pg_ctl sounds not like it should be. Maybe someone have a suiteable RPM.







      postgresql centos centos7 postgresql-9.6






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 14 '18 at 14:56









      Laurenz Albe

      46.9k102748




      46.9k102748










      asked Nov 14 '18 at 14:22









      vinevine

      105




      105
























          2 Answers
          2






          active

          oldest

          votes


















          0














          pg_ctlcluster is not part of core PostgreSQL, but the PGDG Debian install packages come with an additional utility command of that name.



          So that propel installation script is written for Debian or Ubuntu Linux.



          You'd best ask the provider of the script for a script that supports the Redhat-based Linux distrubutions.






          share|improve this answer
























          • I contacted the vendor. Some expert confirmed the bug and they want to fix it soon.

            – vine
            Nov 16 '18 at 7:49











          • Great. That's always better than a questionable workaround.

            – Laurenz Albe
            Nov 16 '18 at 9:33



















          0














          I didnt want to overwork the whole PHP installation script, so this fix worked for me:



          - $process = $this->getProcess(sprintf('sudo pg_ctlcluster %s main restart --force', $postgresVersion));
          + $process = $this->getProcess(sprintf('sudo -i -u postgres /usr/pgsql-9.6/bin/pg_ctl %s restart', NULL));
          + $process = $this->getProcess(sprintf('exit', NULL));


          Not for use in productional enviroments






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53302402%2fhow-to-run-pg-ctlcluster-with-centos%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            pg_ctlcluster is not part of core PostgreSQL, but the PGDG Debian install packages come with an additional utility command of that name.



            So that propel installation script is written for Debian or Ubuntu Linux.



            You'd best ask the provider of the script for a script that supports the Redhat-based Linux distrubutions.






            share|improve this answer
























            • I contacted the vendor. Some expert confirmed the bug and they want to fix it soon.

              – vine
              Nov 16 '18 at 7:49











            • Great. That's always better than a questionable workaround.

              – Laurenz Albe
              Nov 16 '18 at 9:33
















            0














            pg_ctlcluster is not part of core PostgreSQL, but the PGDG Debian install packages come with an additional utility command of that name.



            So that propel installation script is written for Debian or Ubuntu Linux.



            You'd best ask the provider of the script for a script that supports the Redhat-based Linux distrubutions.






            share|improve this answer
























            • I contacted the vendor. Some expert confirmed the bug and they want to fix it soon.

              – vine
              Nov 16 '18 at 7:49











            • Great. That's always better than a questionable workaround.

              – Laurenz Albe
              Nov 16 '18 at 9:33














            0












            0








            0







            pg_ctlcluster is not part of core PostgreSQL, but the PGDG Debian install packages come with an additional utility command of that name.



            So that propel installation script is written for Debian or Ubuntu Linux.



            You'd best ask the provider of the script for a script that supports the Redhat-based Linux distrubutions.






            share|improve this answer













            pg_ctlcluster is not part of core PostgreSQL, but the PGDG Debian install packages come with an additional utility command of that name.



            So that propel installation script is written for Debian or Ubuntu Linux.



            You'd best ask the provider of the script for a script that supports the Redhat-based Linux distrubutions.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 14 '18 at 14:54









            Laurenz AlbeLaurenz Albe

            46.9k102748




            46.9k102748













            • I contacted the vendor. Some expert confirmed the bug and they want to fix it soon.

              – vine
              Nov 16 '18 at 7:49











            • Great. That's always better than a questionable workaround.

              – Laurenz Albe
              Nov 16 '18 at 9:33



















            • I contacted the vendor. Some expert confirmed the bug and they want to fix it soon.

              – vine
              Nov 16 '18 at 7:49











            • Great. That's always better than a questionable workaround.

              – Laurenz Albe
              Nov 16 '18 at 9:33

















            I contacted the vendor. Some expert confirmed the bug and they want to fix it soon.

            – vine
            Nov 16 '18 at 7:49





            I contacted the vendor. Some expert confirmed the bug and they want to fix it soon.

            – vine
            Nov 16 '18 at 7:49













            Great. That's always better than a questionable workaround.

            – Laurenz Albe
            Nov 16 '18 at 9:33





            Great. That's always better than a questionable workaround.

            – Laurenz Albe
            Nov 16 '18 at 9:33













            0














            I didnt want to overwork the whole PHP installation script, so this fix worked for me:



            - $process = $this->getProcess(sprintf('sudo pg_ctlcluster %s main restart --force', $postgresVersion));
            + $process = $this->getProcess(sprintf('sudo -i -u postgres /usr/pgsql-9.6/bin/pg_ctl %s restart', NULL));
            + $process = $this->getProcess(sprintf('exit', NULL));


            Not for use in productional enviroments






            share|improve this answer




























              0














              I didnt want to overwork the whole PHP installation script, so this fix worked for me:



              - $process = $this->getProcess(sprintf('sudo pg_ctlcluster %s main restart --force', $postgresVersion));
              + $process = $this->getProcess(sprintf('sudo -i -u postgres /usr/pgsql-9.6/bin/pg_ctl %s restart', NULL));
              + $process = $this->getProcess(sprintf('exit', NULL));


              Not for use in productional enviroments






              share|improve this answer


























                0












                0








                0







                I didnt want to overwork the whole PHP installation script, so this fix worked for me:



                - $process = $this->getProcess(sprintf('sudo pg_ctlcluster %s main restart --force', $postgresVersion));
                + $process = $this->getProcess(sprintf('sudo -i -u postgres /usr/pgsql-9.6/bin/pg_ctl %s restart', NULL));
                + $process = $this->getProcess(sprintf('exit', NULL));


                Not for use in productional enviroments






                share|improve this answer













                I didnt want to overwork the whole PHP installation script, so this fix worked for me:



                - $process = $this->getProcess(sprintf('sudo pg_ctlcluster %s main restart --force', $postgresVersion));
                + $process = $this->getProcess(sprintf('sudo -i -u postgres /usr/pgsql-9.6/bin/pg_ctl %s restart', NULL));
                + $process = $this->getProcess(sprintf('exit', NULL));


                Not for use in productional enviroments







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 16 '18 at 7:56









                vinevine

                105




                105






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53302402%2fhow-to-run-pg-ctlcluster-with-centos%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Bressuire

                    Vorschmack

                    Quarantine