今天想在Ubuntu 9.10安裝PostgreSQL 8.4學(xué)習(xí)下,執(zhí)行完下面命令后
linuxidc@pentest:~$ sudo apt-get install postgresql-8.4 postgresql-client-8.4 postgresql-contrib-8.4
返回如下:
update-alternatives: 使用 /usr/share/postgresql/8.4/man/man1/postmaster.1.gz 來(lái)提供 /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz),于 自動(dòng)模式 中。
-
* Starting PostgreSQL 8.4 database server * The PostgreSQL server failed to start. Please check the log output:
2010-01-25 00:03:24 CST FATAL: could not create shared memory segment: ?????
2010-01-25 00:03:24 CST DETAIL: Failed system call was shmget(key=5433001, size=36880384, 03600).
2010-01-25 00:03:24 CST HINT: This error usually means that PostgreSQL’s request for a shared memory segment exceeded your kernel’s SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 36880384 bytes), reduce PostgreSQL’s shared_buffers parameter (currently 4096) and/or its max_connections parameter (currently 103).
If the request size is already small, it’s possible that it is less than your kernel’s SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memory configuration.
[fail]
invoke-rc.d: initscript postgresql-8.4, action “start” failed.
dpkg:處理 postgresql-8.4 (–configure)時(shí)出錯(cuò):
子進(jìn)程 已安裝的 post-installation 腳本 返回了錯(cuò)誤號(hào) 1
dpkg:依賴關(guān)系問(wèn)題使得 postgresql-contrib-8.4 的配置工作不能繼續(xù):
postgresql-contrib-8.4 依賴于 postgresql-8.4;然而:
軟件包 postgresql-8.4 還沒(méi)有被配置。
dpkg:處理 postgresql-contrib-8.4 (–configure)時(shí)出錯(cuò):
依賴關(guān)系問(wèn)題 – 仍未被配置
沒(méi)有寫入 apport 報(bào)告,因?yàn)殄e(cuò)誤信息指示它是從上一個(gè)失敗導(dǎo)致的。
在處理時(shí)有錯(cuò)誤發(fā)生:
postgresql-8.4
postgresql-contrib-8.4
E: Sub-process /usr/bin/dpkg returned an error code (1)
解決方法很簡(jiǎn)單:
linuxidc@pentest:~$ sudo sysctl -w kernel.shmmax=2147483648
kernel.shmmax = 2147483648
linuxidc@pentest:~$ sysctl -a |grep shmmax
error: permission denied on key ‘kernel.cad_pid’
kernel.shmmax = 2147483648
error: permission denied on key ‘fs.binfmt_misc.register’
error: permission denied on key ‘net.ipv4.route.flush’
error: permission denied on key ‘net.ipv6.route.flush’
linuxidc@pentest:~$ sudo /etc/init.d/postgresql-8.4 start
* Starting PostgreSQL 8.4 database server [ OK ] 本文出自:億恩科技【1tcdy.com】
服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|