【Data Platform】/Postgresql

[9.2] PostgreSQL 수동 설치시 에러 처리

디비랑 2013. 7. 2. 14:05

/********************************************************************************************
-- Title : [9.2] PostgreSQL 수동 설치시 에러 처리
-- Reference : 웹검색 
-- Key word : install installation error err can't cannot can not
********************************************************************************************/

-- FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": 허가 거부
    ㅇ 참고 : http://dbrang.tistory.com/737
    ㅇ ll -a 나 ls -a로 숨김 파일도 체크 필요.
        # rm -rf /tmp/.s.PGSQL.5432* 수행

Port Numbers


When trying to launch postmaster on a shared machine, you may have got an error like:

FATAL: could not open lock file ‘‘/tmp/.s.PGSQL.5432.lock’’: Permission denied


This error means that there is another instance of postmaster (probably someone else doing the

assignment) running on the same machine which is listening on the default port (5432).


The solution to this problem is to run postmaster on a different port (for instance, 6179), as in

the example below:

                  $postmaster -D <DATADIR> -p 6179

                  

In the case that the port number you have selected is already in use, you should choose another

port number. Correspondingly, the frontend program should connect on the new port as well, as

indicated below:

                  $psql <DBNAME> -p 6179

                  

Similarly, createdb should also be run with a -p flag to specify which port number to connect to.

For more information, check the manpages.


 

-- "yum kill another app is currently holding the yum lock; waiting for it to exit..."
    ㅇ참고 : http://dbrang.tistory.com/738
        # su - root
        # ps -aef | grep yum      /*진행되고 있는 yum 확인*/
        # kill -9 [pid]                 /*진행되는 yum 삭제*/
        # cd /var/run                /*yum 프로세서를 담고 있는 파일 날리기*/
        # rm yum.pid             

-- configure: error: readline(또는 zlib 등등) library not found If you have readline already 
    installed, see config.log for details on the failure. 
    It is possible the compiler isn't looking in the proper directory.
    Use --without-readline to disable readline support.
        # yum -y install readline-devel zlib-devel 설치

-- $ pg_ctl status
    pg_ctl: error while loading shared libraries: libpq.so.5: cannot open shared object file:
    No such file or directory
    ㅇ .bash_profile에 $PGLIB 확인
    ㅇ 여차하면 
            LD_LIBRARY_PATH=/home/postgres/pgsql/lib
            export LD_LIBRARY_PATH
        를 직접 기입.

-- 복구 후 실행시 
    # pg_ctl -D /home/postgres/pgsql/data start
     
 FATAL:  data directory "/home/postgres/pgsql/data" has group or world access
     
 DETAIL:  Permissions should be u=rwx (0700). 발생하면
    ㅇ
# chmod -R 700 /home/postgres/pgsql/data
        # 
chmod -R 700 /home/database/tbs_data0
       
또는
        
# chown -R postges.postgres /home/postgres/pgsql/data 
        # chown -R postges.postgres /home/database/tbs_data0
       수행. 

-- Can't Case 1


-- Can't Case 2


-- Can't Case 3


-- Can't Case 4


-- Can't Case 5