Cloudera迁移scm数据库
http://site.clairvoyantsoft.com/migrate-cloudera-scm-database-from-postgresql-to-mysql/
http://node0:7180/api/v14/cm/deployment ——–正確網址。
1.停止服務;
1.在UI界面,停止集群; 2.在UI界面,停止cm的service,monitor等全部服務; 3.在Linux,停止agent服務:service cloudera-scm-agent stop2.備份CM配置,通過API ——
$ curl -v -u admin:admin http://node0:7180/api/<version>/cm/deployment > /home/user/deployment 本機: $ curl -v -u admin:admin http://node0:7180/api/v14/cm/deployment > /home/user/deployment注意:這個文件被保留和保護至關重要,因為它將需要重新導入功能配置到新數據庫中。(v14)
Obtain version with: http://manager_host:7180/api/version
3.對postgre的db和server目錄做備份。
#cd /var/lib/cloudera-scm-server-db/ #tar -cvf /home/user/cloudera-scm-server-db.tar . #cd /etc/cloudera-scm-server/ #tar -cvf /home/user/cloudera-scm-server.tar .文件歸檔在 /home/user/ 下。
4.在server端,停止server,停止server-db,拋棄server-db off
$ sudo service cloudera-scm-server stop $ sudo service cloudera-scm-server-db stop $ sudo chkconfig cloudera-scm-server-db off5.保證mysql server正確安裝。——————–[1]
6.安裝、配置mysql軟件——[2]
7.創建”temp” db 并且賦權限,記錄“示例1:運行腳本當MySQL安裝在另一個主機”[3]
#mysql -h mysql_hostname -u user -p mysql> create database temp; mysql> grant all on *.* to 'temp'@'%' identified by 'temp' with grant option;8.執行/usr/share/cmf/schema/scm_prepare_database.sh(可重置)
$/usr/share/cmf/schema/scm_prepare_database.sh mysql -h mysql_hostname -u user -p --scm-host manager_host <scm_db_name> <scm_user> <scm_password>Note: run $ /usr/share/cmf/schema/scm_prepare_database.sh
with no arguments to get syntax assistance
9.開啟server服務。
service httpd start $ sudo service cloudera-scm-server start10.Cloudera Manager web用戶界面登錄和上傳企業許可證密鑰。
11.重啟scm-server
$ sudo service cloudera-scm-server restart12.修復CM配置(step2),通過API—
$ curl --upload-file /home/user/deployment -u admin:admin http://node0:7180/api/v14/cm/deployment?deleteCurrentDeployment=true -H "Content-Type: application/json" //add http header option(恢復集群的命令): -H "Content-Type: application/json" ..if required //verify that there are no errors, the command prints the api even on connection failure.13.登錄CM,驗證當前的配置選項。所有服務現在應該可用但是停止狀態。
嘗試,所有主機-重新運行升級向導。14.cleanup:
$ yum erase cloudera-manager-server-sb15.如果scm-agent啟動失敗,你必須刪除或者一出pid ./var/lib/cloudera-scm-agent/ 并且重啟agent。
參考網址
[1] http://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_mysql.html#cmig_topic_5_5_2
[2] http://dev.mysql.com/downloads/mysql/
[3] http://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_installing_configuring_dbs.html#concept_i2r_m3m_hn__example_fsj_cyp_bm
[4] ref: https://gist.github.com/gwenshap/7044525
[5] http://site.clairvoyantsoft.com/migrate-cloudera-scm-database-from-postgresql-to-mysql/【譯】
http://cwiki.apachecn.org/pages/viewpage.action?pageId=2888090
參考網址1—–配置mysql server和jdbc driver:
1.
參考網址3:在另一臺主機配置mysql2,連接mysql1。
3、 查看postgresql 的scm用戶的密碼
grep password /etc/cloudera-scm-server/db.properties
會得到如下信息:
[root@hadoop1 /]# grep password /etc/cloudera-scm-server/db.properties
com.cloudera.cmf.db.password=pfxlUudKJo
4、 登陸postgresql 數據庫
psql -h localhost -p 7432 -U scm
輸入第三步查到的密碼
/usr/share/cmf/schema/scm_prepare_database.sh postgresql scm scm scm
/etc/init.d/cloudera-manager-server-db restart
http://blog.csdn.net/dracotianlong/article/details/7907633
http://blog.csdn.net/mirabelle521/article/details/71169631
guid刪除,重新運行升級向導
/var/lib/cloudera-scm-agent/cm_guid 刪除guid–主機狀況不良(由于原集群的guid存在唯一性,過時)
—http://blog.csdn.net/wonder4/article/details/58585180
—http://blog.csdn.net/u011031430/article/details/74057601
—https://www.cloudera.com/documentation/enterprise/release-notes/topics/cm_rn_known_issues.html#rn_OPSAPS-34847
—重新運行升級向導
—parcel沒有分發,但是是活動的
取消parcel異常分發狀態–激活卡主
use curl -X POST with Cloudera API.
http://node0:7180/api/v14/cm/deployment中找到相應的配置。
格式API文檔:http://node0:7180/static/apidocs/
http://community.cloudera.com/t5/Cloudera-Manager-Installation/Parcel-not-distributed-but-have-active-state-ACTIVATING/m-p/32474/highlight/true
ctrl + B
拒絕連接– /etc/hosts
官方文檔
https://www.cloudera.com/documentation/enterprise/latest/topics/installation.html總結
以上是生活随笔為你收集整理的Cloudera迁移scm数据库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 现代数字图像处理---lena图像处理
- 下一篇: 北京亚信科技java笔试题_亚信科技ja