Cloudera迁移scm数据库
http://site.clairvoyantsoft.com/migrate-cloudera-scm-database-from-postgresql-to-mysql/
http://node0:7180/api/v14/cm/deployment ——–正確網(wǎng)址。
1.停止服務(wù);
1.在UI界面,停止集群; 2.在UI界面,停止cm的service,monitor等全部服務(wù); 3.在Linux,停止agent服務(wù):service cloudera-scm-agent stop2.備份CM配置,通過(guò)API ——
$ curl -v -u admin:admin http://node0:7180/api/<version>/cm/deployment > /home/user/deployment 本機(jī): $ curl -v -u admin:admin http://node0:7180/api/v14/cm/deployment > /home/user/deployment注意:這個(gè)文件被保留和保護(hù)至關(guān)重要,因?yàn)樗鼘⑿枰匦聦?dǎo)入功能配置到新數(shù)據(jù)庫(kù)中。(v14)
Obtain version with: http://manager_host:7180/api/version
3.對(duì)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.創(chuàng)建”temp” db 并且賦權(quán)限,記錄“示例1:運(yùn)行腳本當(dāng)MySQL安裝在另一個(gè)主機(jī)”[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.執(zhí)行/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.開(kāi)啟server服務(wù)。
service httpd start $ sudo service cloudera-scm-server start10.Cloudera Manager web用戶(hù)界面登錄和上傳企業(yè)許可證密鑰。
11.重啟scm-server
$ sudo service cloudera-scm-server restart12.修復(fù)CM配置(step2),通過(guò)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(恢復(fù)集群的命令): -H "Content-Type: application/json" ..if required //verify that there are no errors, the command prints the api even on connection failure.13.登錄CM,驗(yàn)證當(dāng)前的配置選項(xiàng)。所有服務(wù)現(xiàn)在應(yīng)該可用但是停止?fàn)顟B(tài)。
嘗試,所有主機(jī)-重新運(yùn)行升級(jí)向?qū)А?14.cleanup:
$ yum erase cloudera-manager-server-sb15.如果scm-agent啟動(dòng)失敗,你必須刪除或者一出pid ./var/lib/cloudera-scm-agent/ 并且重啟agent。
參考網(wǎng)址
[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
參考網(wǎng)址1—–配置mysql server和jdbc driver:
1.
參考網(wǎng)址3:在另一臺(tái)主機(jī)配置mysql2,連接mysql1。
3、 查看postgresql 的scm用戶(hù)的密碼
grep password /etc/cloudera-scm-server/db.properties
會(huì)得到如下信息:
[root@hadoop1 /]# grep password /etc/cloudera-scm-server/db.properties
com.cloudera.cmf.db.password=pfxlUudKJo
4、 登陸postgresql 數(shù)據(jù)庫(kù)
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刪除,重新運(yùn)行升級(jí)向?qū)?/strong>
/var/lib/cloudera-scm-agent/cm_guid 刪除guid–主機(jī)狀況不良(由于原集群的guid存在唯一性,過(guò)時(shí))
—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
—重新運(yùn)行升級(jí)向?qū)?br />
—parcel沒(méi)有分發(fā),但是是活動(dòng)的
取消parcel異常分發(fā)狀態(tài)–激活卡主
use curl -X POST with Cloudera API.
http://node0:7180/api/v14/cm/deployment中找到相應(yīng)的配置。
格式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總結(jié)
以上是生活随笔為你收集整理的Cloudera迁移scm数据库的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 现代数字图像处理---lena图像处理
- 下一篇: 北京亚信科技java笔试题_亚信科技ja