zoukankan      html  css  js  c++  java
  • Postgres使用小结安装

            近期研究了一下PostgreSQL,就安装作个小结。
    PostgreSQL及Berkeley DB都是University of California Berkeley 分校的研究成果,是Linux下的比较流行的数据库软件,而且都是Open Source(为此,深感Berkeley分校确是研究性的世界一流大学, 想继续深造的朋友不妨选择该校)。

     Downloading and install
       1 download websit: www.postgresql.org
       2 extract
          tar -zxvf postgresql-8.2.4.tar.gz
          this will create the directory postgresql-8.2.4, which contain all of the source code to compile.
      3  run configure command
         change to postgresql-8.2.4 directory to run the configure command:  
         ./configure
      4  run gmake command
          gmake
     5   run gmake install as the root user
         gmake install
     6  add new user named postgres
        adduser postgres
    7  create a new dircectory named data under the /usr/local/pgsql :
        mkdir /usr/local/pgsql/data
    8  give postgress user privilege to access the new directory data
        chown postgres /usr/local/pgsql/data
    9  change as postgres user
        su postgres
    10 initialize the default postgreSQL database called postgres in /usr/local/pgsql/data, we can start the PostgreSQL server using pg_ctl as postgres user:
         /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
    11 if we want to build programs, me must add the lib directory to /etc/ld.so.conf file, and then run ldconfig as root user
         add new line with /usr/local/pgsql/lib to the /etc/ld.so.conf file.
     

  • 相关阅读:
    LCA模板
    bzoj1660:[Usaco2006 Nov]badhair乱头发节
    不老的传说
    田忌赛马
    最短路径问题
    hdu2421-Deciphering Password-(欧拉筛+唯一分解定理+积性函数+立方求和公式)
    hdu1215-七夕节-(埃氏筛+唯一分解定理)
    迷宫-(bfs)
    区间或和-(位运算)
    海啸-(矩阵前缀和)
  • 原文地址:https://www.cnblogs.com/vsignsoft/p/753300.html
Copyright © 2011-2022 走看看