´ÙÀ½ ÀÌÀü Â÷·Ê

2. PostgreSQL ¼³Ä¡Çϱâ

2.1 postgres °èÁ¤ ¸¸µé±â

2.2 ¹é¾÷ Çϱâ

2.3 ÄÄÆÄÀÏ¹× ¼³Ä¡

  1. ÄÄÆÄÀÏ ÇϱâÀü postmaster µ¥¸óÀ» Á×ÀδÙ.
            # ps -aux | grep postmaster
            # kill PID (À§¿¡¼­ ãÀº pid ¹øÈ£)
    
  2. PostgreSQL ¼Ò½º¸¦ /usr/local ¹æ¿¡¼­ Ǭ´Ù.
  3. Ç®¸é postgresql-6.5.3À̶õ µð·ºÅ丮°¡ »ý±â´Âµ¥ À̸§À» pgsql·Î ¹Ù²ãÁØ´Ù. (±âÁ¸ÀÇ pgsql µð·ºÅ丮´Â ¹öÀüÀ» ¸í½ÃÇϸç À̸§À» ¹Ù²ãÁØ´Ù.)
            # mv postgresql-6.5.3 pgsql      (À̸§À» pgsql·Î ¹Ù²Û´Ù)
    
            # chown -R postgres.postgres pgsql (user¿Í groupÀ» ¹Ù²Û´Ù)
    
                                                                                    
            # cd /usr/local/pgsql/src
            # vi Makefile.custom              (Pentitum pro±Þ À̻󿡼­ ÃÖÀûÈ­¸¦
              CFLAG+= -m486                    À§ÇØ »ý¼ºÇÑ´Ù)
            
            # ./configure --with-mb=EUC_KR    (ÇÑ±Û »ç¿ëÀ» À§ÇØ)
    
            # cd /usr/local/pgsql/doc
            # make install                    (¸Ç ÆäÀÌÁö, HTML ¹®¼­ÆÄÀÏ ¼³Ä¡)                       
    
            # cd /usr/local/pgsql/src
            # make all                        (ÄÄÆÄÀÏ)
    
  4. 'All of PostgreSQL is successfully made. Ready to install' ¶õ ¸Þ¼¼Áö°¡ º¸ÀÌ¸é ¼º°ø.
            # su postgres                     (postgres °èÁ¤À¸·Î ÀÛ¾÷ÇϱâÀ§ÇØ)
            $ make install                    (¼³Ä¡)
    

2.4 ¼³Ä¡ÈÄ ÀÛ¾÷

  1. ¶óÀ̺귯¸® Ãß°¡
            # vi /etc/ld.so.conf             
              /usr/local/pgsql/lib
            # /sbin/ldconfig
    
  2. ȯ°æº¯¼ö Ãß°¡
    °¢ °³ÀÎÀÇ È¯°æº¯¼ö¸¦ ¼³Á¤ÇϱâÀ§ÇØ °³ÀÎÀÇ .bash_profile¿¡ ´ÙÀ½À» Ãß°¡ÇÑ´Ù.
    (DB¸¦ »ç¿ëÇÒ °èÁ¤ÀÇ È¯°æº¯¼ö¸¦ ¼³Á¤ - postgres °èÁ¤¿¡µµ Àû¿ë½ÃŲ´Ù.)
    
            PATH=$PATH:/usr/local/pgsql/bin
            MANPATH=$MANPATH:/usr/local/pgsql/man
            PGLIB=/usr/local/pgsql/lib
            PGDATA=/usr/local/pgsql/data
            export PATH MANPATH PGLIB PGDATA
    
  3. ȯ°æ º¯¼ö Àû¿ë
                                              
    °¢ °èÁ¤¿¡¼­ ½ÇÇàÇؼ­ ȯ°æº¯¼ö¸¦ Àû¿ë½ÃŲ´Ù.
            $ source .bash_profile            
    
  4. µ¥ÀÌÅͺ£À̽º ÃʱâÈ­ Çϱâ
    postgres°èÁ¤À¸·Î ÀÛ¾÷ÇؾßÇÑ´Ù.
            $ initdb -e EUC_KR
    

2.5 postmaster µ¥¸ó ¶Ù¿ì±â

        
        $ postmaster -i -S -D /usr/local/pgsql/data

2.6 ¹é¾÷ µ¥ÀÌÅÍ º¹±¸

        $ psql -e template1 < db.out


´ÙÀ½ ÀÌÀü Â÷·Ê