国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

02-源碼編譯安裝測試postgresql 9.6.1(2017-02-07)

2019-11-09 13:28:38
字體:
來源:轉載
供稿:網友

1下載安裝包postgresql 9612軟件下載3解壓1 安裝依賴包2 增加用戶設置密碼4配置編譯選項5編譯6初始化數據庫7配置環境變量8啟動測試9配置系統服務參考筆記

1、下載安裝包postgresql 9.6.1

地址:http://ftp.stu.edu.tw/pub/postgresql/latest/

rpm下載地址:

https://yum.postgresql.org/9.6/redhat/rhel-6.4-x86_64/

2、軟件下載

在root 用戶下 cd /opt/soft/ wget https://ftp.postgresql.org/pub/source/v9.6.1/postgresql-9.6.1.tar.gz

3、解壓

[root@pg96 soft]# tar -zxvf postgresql-9.6.1.tar.gz

3.1 安裝依賴包

[root@pg96 soft]# yum intall -y perl-ExtUtils-Embed readline-devel zlib-devel pam-devel libxml2-devel libxslt-devel openldap-devel python-devel gcc-c++ openssl-devel cmake[root@pg96 soft]# yum install gcc* readline-devel

3.2 增加用戶設置密碼:

[root@pg96 ~]# adduser postgres

adduser:用戶“postgres”已存在 [root@pg96 ~]# passwd postgres 更改用戶 postgres 的密碼 。 新的 密碼: 無效的密碼: 它基于字典單詞 重新輸入新的 密碼: passwd: 所有的身份驗證令牌已經成功更新。

[root@pg96 ~]# id postgresuid=26(postgres) gid=26(postgres) 組=26(postgres)[root@pg96 ~]#

4、配置編譯選項

[root@pg96 postgresql-9.6.1]# ./configure --PRefix=/opt/pgsql/ --with-perl --with-libxml --with-libxslt

5、編譯

[root@pg96 postgresql-9.6.1]# gmake[root@pg96 postgresql-9.6.1]# gmake install

修改root用戶的環境變量:

[root@pg96 pgsql]# vim ~/.bash_profile

這里寫圖片描述

6、初始化數據庫

[root@pg96 opt]# chown postgres:postgres /opt/pgdata/[root@pg96 opt]# su - postgres[postgres@pg96 ~]$[postgres@pg96 ~]$/opt/pgsql/bin/initdb -D /opt/pgdata/

7、配置環境變量

[postgres@pg96 bin]$vim ~/.bash_profile

這里寫圖片描述

8、啟動測試:

[postgres@pg96 bin]$pg_ctl startserver starting[postgres@pg96 bin]$LOG: database system was shut down at 2017-02-07 09:04:50 GMTLOG: MultiXact member wraparound protections are now enabledLOG: database system is ready to accept connectionsLOG: autovacuum launcher started[postgres@pg96 bin]$[postgres@pg96 bin]$psqlpsql (9.6.1)Type "help" for help.postgres=# /l List of databases Name | Owner | Encoding | Collate | Ctype | access privileges -----------+----------+----------+-------------+-------------+----------------------- postgres | postgres | UTF8 | zh_CN.UTF-8 | zh_CN.UTF-8 | template0 | postgres | UTF8 | zh_CN.UTF-8 | zh_CN.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | zh_CN.UTF-8 | zh_CN.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres(3 rows)postgres=# /q[postgres@pg96 bin]$pg_ctl stopLOG: received fast shutdown requestLOG: aborting any active transactionsLOG: autovacuum launcher shutting downLOG: shutting downwaiting for server to shut down....LOG: database system is shut down doneserver stopped[postgres@pg96 bin]$

9、配置系統服務

[root@pg96 local]# cp /opt/soft/postgresql-9.6.1/contrib/start-scripts/linux /etc/init.d/postgresql-9.6[root@pg96 local]# vim /etc/init.d/postgresql-9.6![這里寫圖片描述](http://img.blog.csdn.net/20170207220635326?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcXFfMjk2MjI3NjE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)[root@pg96 init.d]# chmod +x /etc/init.d/postgresql-9.6[root@pg96 init.d]# service postgresql-9.6 startStarting PostgreSQL: ok[root@pg96 init.d]#

參考筆記

http://www.itwendao.com/article/detail/88726.html

升級python2.6到python2.7 http://ruter.sundaystart.net/2015/12/03/Update-python/

https://segmentfault.com/a/1190000000654227


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 邵阳市| 泗阳县| 布尔津县| 连江县| 黎平县| 永昌县| 施秉县| 宝丰县| 积石山| 东乌珠穆沁旗| 商河县| 高安市| 淳化县| 平塘县| 枣庄市| 大田县| 阜新| 麻栗坡县| 阿瓦提县| 隆化县| 宿松县| 嘉义县| 淮滨县| 临城县| 舞阳县| 福鼎市| 彭水| 定远县| 尼木县| 剑阁县| 忻州市| 永登县| 万山特区| 驻马店市| 观塘区| 松滋市| 开平市| 马公市| 七台河市| 互助| 巴东县|