激情五月天婷婷,亚洲愉拍一区二区三区,日韩视频一区,a√天堂中文官网8

<ul id="buwfs"><strike id="buwfs"><strong id="buwfs"></strong></strike></ul>
    <output id="buwfs"></output>
  • <dfn id="buwfs"><source id="buwfs"></source></dfn>
      <dfn id="buwfs"><td id="buwfs"></td></dfn>
      <div id="buwfs"><small id="buwfs"></small></div>
      <dfn id="buwfs"><source id="buwfs"></source></dfn>
      1. <dfn id="buwfs"><td id="buwfs"></td></dfn>
        始創(chuàng)于2000年 股票代碼:831685
        咨詢熱線:0371-60135900 注冊有禮 登錄
        • 掛牌上市企業(yè)
        • 60秒人工響應(yīng)
        • 99.99%連通率
        • 7*24h人工
        • 故障100倍補償
        全部產(chǎn)品
        您的位置: 網(wǎng)站首頁 > 幫助中心>文章內(nèi)容

        CentOS 安裝PostgreSQL 9.1

        發(fā)布時間:  2012/8/31 17:22:03

        以下是在CentOS 5.5上安裝PostgreSQL 9.1的相關(guān)記錄

        (1) 從http://yum.pgrpms.org/repopackages.php 下載postgresql9.1 rpm安裝包
          [root@server1 ~]# wget http://yum.pgrpms.org/9.1/redhat/rhel-5-i386/pgdg-centos91-9.1-4.noarch.rpm
        -
         

        (2)安裝pgdg-centos91-9.1-4.noarch.rpm
          [root@server1 ~]# rpm -i pgdg-centos91-9.1-4.noarch.rpm 
        (3)更改CentOS-Base.repo
          為方便通過yum安裝postgresql9.1的相關(guān)軟件,所以需要更改CentOS-Base.repo,以便于yum list postgresql* 能找到postgresql9.1的相關(guān)軟件包
          只需要在 CentOS-Base.repo的[base] and [updates]中增加'exclude=postgresql*'即可
          具體操作如下:
            [root@server1 ~]# cd /etc/yum.repos.d 
            [root@server1 yum.repos.d]# vi CentOS-Base.repo  
              [base]
              name=CentOS-$releasever - Base
              mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
              #baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/os/$basearch/
              gpgcheck=1
              gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
              exclude=postgresql*
              #released updates
              [updates]
              name=CentOS-$releasever - Updates
              mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
              #baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/updates/$basearch/
              gpgcheck=1
              gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
              exclude=postgfesql*
              #packages used/produced in the build but not released
        (4)通過yum list postgres*來檢測相關(guān)的安裝包
          [root@server1 yum.repos.d]# yum list postgres*
            Available Packages 
            postgresql91.x86_64                         9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-contrib.x86_64                 9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-debuginfo.x86_64               9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-devel.i686                     9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-devel.x86_64                   9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-docs.x86_64                    9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-jdbc.x86_64                    9.1.901-1PGDG.rhel6           pgdg91 
            postgresql91-jdbc-debuginfo.x86_64          9.1.901-1PGDG.rhel6           pgdg91 
            postgresql91-libs.i686                      9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-libs.x86_64                    9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-odbc.x86_64                    09.00.0200-1PGDG.rhel6        pgdg91 
            postgresql91-odbc-debuginfo.x86_64          09.00.0200-1PGDG.rhel6        pgdg91 
            postgresql91-plperl.x86_64                  9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-plpython.x86_64                9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-pltcl.x86_64                   9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-python.x86_64                  4.0-2PGDG.rhel6               pgdg91 
            postgresql91-python-debuginfo.x86_64        4.0-2PGDG.rhel6               pgdg91 
            postgresql91-server.x86_64                  9.1.1-1PGDG.rhel6             pgdg91 
            postgresql91-tcl.x86_64                     1.9.0-1.rhel6                 pgdg91 
            postgresql91-tcl-debuginfo.x86_64           1.9.0-1.rhel6                 pgdg91 
            postgresql91-test.x86_64                    9.1.1-1PGDG.rhel6             pgdg91 
            postgresql_autodoc.noarch                   1.40-1.rhel6                  pgdg91 
            [root@server1 yum.repos.d]# 
        (6)使用yum安裝postgresql9.1以及相關(guān)軟件包
          [root@server1 yum.repos.d]# yum install postgresql91 postgresql91-devel postgresql91-server postgresql91-libs postgresql91-contrib 
        (7)初始化并啟動postgresql
          [root@server1 yum.repos.d]# service postgresql-9.1 initdb 
          Initializing database:                                     [  OK  ] 
          [root@server1 yum.repos.d]# 
          [root@server1 yum.repos.d]# service postgresql-9.1 initdb 
          Initializing database:                                     [  OK  ] 
          [root@server1 yum.repos.d]# 

        安裝postgresql注意事項:

        (1)如果在initdb時失敗,則很有可能是因為系統(tǒng)默認(rèn)字符編碼和postgresql所認(rèn)可的不一致所導(dǎo)致的,這時可以通過/var/lib/pgsql/9.1/pgstartup.log的相關(guān)出錯信息來確認(rèn)
          如果確定是編碼的問題導(dǎo)致initdb失敗,則可以通過在initdb時指定--no-locale來解決,具體方法如下
          1.1 [root@GJZ bin]# su - postgres
          1.2 -bash-3.2$ /usr/local/pgsql/bin/initdb --no-locale
            The files belonging to this database system will be owned by user "postgres".
            This user must also own the server process.
            The database cluster will be initialized with locale C.
            The default database encoding has accordingly been set to SQL_ASCII.
            The default text search configuration will be set to "english".
            fixing permissions on existing directory /var/lib/pgsql/9.1/data ... ok
        (2) 注意修改/var/lib/pgsql/9.1/data中的postgresql.conf和pg_hba.conf文件,根據(jù)需要配置相關(guān)的訪問策略 。


        本文出自:億恩科技【mszdt.com】

        服務(wù)器租用/服務(wù)器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]

      2. 您可能在找
      3. 億恩北京公司:
      4. 經(jīng)營性ICP/ISP證:京B2-20150015
      5. 億恩鄭州公司:
      6. 經(jīng)營性ICP/ISP/IDC證:豫B1.B2-20060070
      7. 億恩南昌公司:
      8. 經(jīng)營性ICP/ISP證:贛B2-20080012
      9. 服務(wù)器/云主機 24小時售后服務(wù)電話:0371-60135900
      10. 虛擬主機/智能建站 24小時售后服務(wù)電話:0371-60135900
      11. 專注服務(wù)器托管17年
        掃掃關(guān)注-微信公眾號
        0371-60135900
        Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權(quán)所有  地址:鄭州市高新區(qū)翠竹街1號總部企業(yè)基地億恩大廈  法律顧問:河南亞太人律師事務(wù)所郝建鋒、杜慧月律師   京公網(wǎng)安備41019702002023號
          0
         
         
         
         

        0371-60135900
        7*24小時客服服務(wù)熱線