在離線安裝CM時,有時會報以下的錯誤:sql
Resolving Dependencies --> Running transaction check ---> Package cloudera-manager-server-db-2.x86_64 0:5.0.2-1.cm502.p0.297.el6 will be installed --> Processing Dependency: postgresql-server >= 8.4 for package: cloudera-manager-server-db-2-5.0.2-1.cm502.p0.297.el6.x86_64 --> Finished Dependency Resolution Error: Package: cloudera-manager-server-db-2-5.0.2-1.cm502.p0.297.el6.x86_64 (cloudera-manager) Requires: postgresql-server >= 8.4 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
這是因爲CM依賴postgresql,須要在本機上安裝postgresql,若是是在線安裝,自動以Yum方式安裝,因爲是離線,沒法自動安裝postgresql。ide
檢查是否安裝了postgresql:post
[root@localhost postgresql84]# rpm -qa|grep postgres
若是已經安裝,但版本小於8.4,則使用rpm -e卸載。ui
下面以rpm方式安裝postgresql,先到 http://yum.postgresql.org/8.4/redhat/rhel-6-x86_64/repoview/ 上下載postgresql8.4的包,須要下載三個包:spa
[root@localhost postgresql84]# ll total 4532 -rw-r--r-- 1 root root 898392 Jun 15 01:10 postgresql84-8.4.21-1PGDG.rhel6.x86_64.rpm -rw-r--r-- 1 root root 180396 Jun 15 01:10 postgresql84-libs-8.4.21-1PGDG.rhel6.x86_64.rpm -rw-r--r-- 1 root root 3552400 Jun 15 01:10 postgresql84-server-8.4.21-1PGDG.rhel6.x86_64.rpm [root@localhost postgresql84]#
安裝PostgreSQL,注意安裝順序:postgresql
[root@localhost postgresql84]# rpm -ivh postgresql84-libs-8.4.21-1PGDG.rhel6.x86_64.rpm warning: postgresql84-libs-8.4.21-1PGDG.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY Preparing... ########################################### [100%] 1:postgresql84-libs ########################################### [100%] [root@localhost postgresql84]# rpm -ivh postgresql84-8.4.21-1PGDG.rhel6.x86_64.rpm warning: postgresql84-8.4.21-1PGDG.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY Preparing... ########################################### [100%] 1:postgresql84 ########################################### [100%] [root@localhost postgresql84]# rpm -ivh postgresql84-server-8.4.21-1PGDG.rhel6.x86_64.rpm warning: postgresql84-server-8.4.21-1PGDG.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY Preparing... ########################################### [100%] 1:postgresql84-server ########################################### [100%] [root@localhost postgresql84]#