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.
     

  • 相关阅读:
    SQL SqlParameter
    C# 迭代器与yield关键字
    ADO.NET调用SQL存储过程
    C# XML
    C# MDI应用程序
    LINQ 基础
    C# 文件操作
    C# 操作注册表
    SQL从SQL SERVER中获取数据库结构信息
    Linux发展史
  • 原文地址:https://www.cnblogs.com/vsignsoft/p/753300.html
Copyright © 2011-2022 走看看