亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 3756 | 回復(fù): 8
打印 上一主題 下一主題

postgres為什么不能用超戶啟動,我看代碼都寫死了,誰知道具體原因呢? [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2011-12-23 14:46 |只看該作者 |倒序瀏覽
postgres為什么不能用超戶啟動,我看代碼都寫死了,誰知道具體原因呢?

論壇徽章:
0
2 [報告]
發(fā)表于 2011-12-23 21:03 |只看該作者
根本原因是安全問題吧

論壇徽章:
7
數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-08-08 06:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-08-29 06:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-08-29 06:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-09-18 06:20:00數(shù)據(jù)庫技術(shù)版塊每周發(fā)帖之星
日期:2015-11-06 19:56:51數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2016-01-22 06:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2016-02-05 06:20:00
3 [報告]
發(fā)表于 2011-12-24 00:35 |只看該作者
額,用源碼安裝,把檢查用戶的部分注掉

論壇徽章:
3
數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-06-18 22:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-06-21 22:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-08-27 06:20:00
4 [報告]
發(fā)表于 2011-12-29 21:14 |只看該作者
是安全原因的,在root下運行對系統(tǒng)不是很安全。不建議通過改源碼讓PostgreSQL運行在root下。

論壇徽章:
0
5 [報告]
發(fā)表于 2012-01-30 10:23 |只看該作者
很多軟件都用系統(tǒng)用戶,不用超級用戶。

論壇徽章:
0
6 [報告]
發(fā)表于 2012-04-02 18:17 |只看該作者
安全原因,pg不能用root啟動

論壇徽章:
0
7 [報告]
發(fā)表于 2012-04-08 12:19 |只看該作者
回復(fù) 1# qj_zhai

如果您是在Linux下的話可以通過su進行用戶調(diào)用進行啟動,通常我們會編寫啟動腳本如下,并放到/etc/init.d目錄下
  1. #!/bin/bash
  2. #
  3. # chkconfig: 2345 85 15
  4. # description: Starts and stops the Postgres Plus Advanced Server 9.1 database server

  5. # Postgres Plus Advanced Server Service script for Linux

  6. start()
  7. {
  8.         startserver=0
  9.         if [ -e "/opt/PostgresPlus/9.1AS/data/postmaster.pid" ]
  10.         then
  11.                 pidofpro=`head -n 1 /opt/PostgresPlus/9.1AS/data/postmaster.pid`
  12.                 alive=`ps -p $pidofpro | grep $pidofpro`

  13.                 if [ "x$alive" != "x" ]
  14.                 then
  15.                         exit
  16.                 else
  17.                         startserver=1
  18.                 fi
  19.         else
  20.                 startserver=1
  21.         fi
  22.         if [ $startserver != 0 ]
  23.         then
  24.                 echo $"Starting Postgres Plus Advanced Server 9.1: "
  25.                 su - enterprisedb -c "LD_LIBRARY_PATH=/opt/PostgresPlus/9.1AS/lib:$LD_LIBRARY_PATH /opt/PostgresPlus/9.1AS/bin/pg_ctl -w start -D \"/opt/PostgresPlus/9.1AS/data\" -l \"/opt/PostgresPlus/9.1AS/data/pg_log/startup.log\""
  26.        
  27.         if [ $? -eq 0 ];
  28.                 then
  29.                         echo "Postgres Plus Advanced Server 9.1 started successfully"
  30.             exit 0
  31.                 else
  32.                         echo "Postgres Plus Advanced Server 9.1 did not start in a timely fashion, please see /opt/PostgresPlus/9.1AS/data/pg_log/startup.log for details"
  33.             exit 1
  34.                 fi
  35.         fi
  36. }

  37. stop()
  38. {
  39.         if [ -e "/opt/PostgresPlus/9.1AS/data/postmaster.pid" ]
  40.         then
  41.                 pidofproc=`head -n 1 /opt/PostgresPlus/9.1AS/data/postmaster.pid`
  42.                 pidalive=`ps -p $pidofproc | grep $pidofproc`
  43.                
  44.                 if [ "x$pidalive" != "x" ]
  45.                 then
  46.                         echo $"Stopping Postgres Plus Advanced Server 9.1: "
  47.                         su - enterprisedb -c "LD_LIBRARY_PATH=/opt/PostgresPlus/9.1AS/lib:$LD_LIBRARY_PATH /opt/PostgresPlus/9.1AS/bin/pg_ctl stop -m fast -w -D \"/opt/PostgresPlus/9.1AS/data\""
  48.                 fi
  49.         fi
  50. }

  51. reload()
  52. {
  53.         echo $"Reloading Postgres Plus Advanced Server 9.1: "
  54.         su - enterprisedb -c "LD_LIBRARY_PATH=/opt/PostgresPlus/9.1AS/lib:$LD_LIBRARY_PATH /opt/PostgresPlus/9.1AS/bin/pg_ctl reload -D \"/opt/PostgresPlus/9.1AS/data\""
  55. }

  56. # See how we were called.
  57. case "$1" in
  58.   start)
  59.         start
  60.         ;;
  61.   stop)
  62.         stop
  63.         ;;
  64.   reload)
  65.         reload
  66.         ;;
  67.   condrestart|restart)
  68.             stop
  69.             sleep 3
  70.             start
  71.         ;;
  72.   status)
  73.         su - enterprisedb -s /bin/bash -m -c "LD_LIBRARY_PATH=/opt/PostgresPlus/9.1AS/lib:$LD_LIBRARY_PATH /opt/PostgresPlus/9.1AS/bin/pg_ctl status -D \"/opt/PostgresPlus/9.1AS/data\""
  74.         ;;
  75.   *)
  76.         echo $"Usage: $0 {start|stop|restart|condrestart|reload|status}"
  77.         exit 1
  78. esac
復(fù)制代碼

論壇徽章:
13
15-16賽季CBA聯(lián)賽之同曦
日期:2016-01-28 19:52:032015亞冠之北京國安
日期:2015-10-07 14:28:19NBA常規(guī)賽紀(jì)念章
日期:2015-05-04 22:32:03處女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午馬
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56獅子座
日期:2013-09-08 08:37:52
8 [報告]
發(fā)表于 2012-04-21 20:41 |只看該作者
學(xué)習(xí)了,都是高手!

論壇徽章:
29
技術(shù)圖書徽章
日期:2013-09-02 19:59:502015元宵節(jié)徽章
日期:2015-03-06 15:51:332015小元宵徽章
日期:2015-03-06 15:57:20操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-08-16 06:20:002015七夕節(jié)徽章
日期:2015-08-21 11:06:17操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-09-21 06:20:002015亞冠之水原三星
日期:2015-10-30 00:06:07數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-12-24 06:20:0015-16賽季CBA聯(lián)賽之上海
日期:2016-01-07 10:32:07操作系統(tǒng)版塊每日發(fā)帖之星
日期:2016-01-08 06:20:00操作系統(tǒng)版塊每日發(fā)帖之星
日期:2016-05-18 06:20:00IT運維版塊每日發(fā)帖之星
日期:2016-07-23 06:20:00
9 [報告]
發(fā)表于 2012-05-06 04:56 |只看該作者
提示: 作者被禁止或刪除 內(nèi)容自動屏蔽
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP