The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Symbolic links problem

Discussion in 'General Discussion' started by zipicip, Feb 9, 2012.

  1. zipicip

    zipicip Member

    Joined:
    Nov 5, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hello.

    I am trying to update Postgresql

    Install PostgreSQL 9 on cPanel : David Ghedini


    I manage to follow the steps but there is a problem creating the symbolic links

    Code:
        root@s1 [~]# ln -s /var/lib/pgsql/9.0/data /var/lib/pgsql  
        root@s1 [~]# ln -s /var/lib/pgsql/9.0/backups /var/lib/pgsql  

    Code:
    #ln: creating symbolic link `/var/lib/pgsql/data' to `/var/lib/pgsql/9.0/data': File exists

    I check if there are any symbolic link:

    Code:
    # cd /var/lib/pgsql
    Code:
    #  find . -maxdepth 1 -type l -print
    And there is none.

    There are any restriction creating a symbolic link to that folder.

    PS: I don't want Postgresql to work with Cpanel I just want to update it.

    Thanks
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Your commands are creating symbolic links to /var/lib/pgsql not to /var/lib/pgsql/data and /var/lib/pgsql/backups locations. You've clearly cded to /var/lib/pgsql, indicating that folder does indeed exist. You cannot create a symlink to an already existing folder and the commands aren't correct that you are trying for the symlink creation.

    Code:
    ln -s /var/lib/pgsql/9.0/backups /var/lib/pgsql/backups
    ln -s /var/lib/pgsql/9.0/data /var/lib/pgsql/data
    Plese do an "ls -lah /var/lib/pgsql/data /var/lib/pgsql/backups" to ensure those do not exist rather than a find. Find is not intended for what you are using it, which is a basic check of folder existence for a known folder path. The proper command when you know the expected folder location is simply to list the folder to see if it exists, which ls does.
     
  3. zipicip

    zipicip Member

    Joined:
    Nov 5, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Strange thing happened

    If I execute

    Code:
    #ln -s ln -s /var/lib/pgsql/9.0/data /var/lib/pgsql/data
    Now in folder /var/lib/pgsql/data it creates a new folder data and that is made a symbolic link not /var/lib/pgsql/data

    Si I have symbolic link /var/lib/pgsql/data/data pointing to /var/lib/pgsql/9.0/data and that is not good
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You've entred "ln -s ln -s" twice, which also isn't the correct command. That's actually my fault as I entered it twice, so apologies there. Just realized it after reviewing my prior post. I've revised that post to the right commands. Not quite awake :)

    To fix the one folder created, just do:

    Code:
    rm /var/lib/pgsql/data/data
    You'd then also have to remove the other data folder for pgsql that you wanted created:

    Code:
    rm /var/lib/pgsql/data
    After those are gone, then create the symlink from the 9.0 folder.
     
  5. zipicip

    zipicip Member

    Joined:
    Nov 5, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thanks.

    That did the trick.
     
  6. zipicip

    zipicip Member

    Joined:
    Nov 5, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    When I try to init pgsql server I get

    creating conversions ... FATAL: could not load library "/usr/pgsql-9.0/lib/utf8_and_johab.so": /usr/pgsql-9.0/lib/utf8_and_johab.so: failed to map segment from shared object: Cannot allocate memory
    STATEMENT: CREATE OR REPLACE FUNCTION johab_to_utf8 (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) RETURNS VOID AS '$libdir/utf8_and_johab', 'johab_to_utf8' LANGUAGE C STRICT;
     
    #6 zipicip, Feb 9, 2012
    Last edited: Feb 9, 2012
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    In WHM > Shell Fork Bomb Protection, do you have that enabled? If so, can you please disable it and try again? It sets ulimits.
     
Loading...

Share This Page