http://site.clairvoyantsoft.com/migrate-cloudera-scm-database-from-postgresql-to-mysql/
http://node0:7180/api/v14/cm/deployment--– the correct URL. 1. Discontinue service;
1. In the UI interface, stop the cluster;
2. In the UI interface, stop all services such as CM service,monitor;
3. In Linux, stop Agent service: Service cloudera-scm-agent stop
2. Backup cm configuration, via api--
$ curl-v-u admin:admin http://node0:7180/api/<version>/cm/deployment >/home/user/deployment native
:
$ Curl-v-u admin:admin http://node0:7180/api/v14/cm/deployment >/home/user/deployment
Note: This file is important to preserve and protect because it will require the Re-import feature to be configured into the new database. (V14)
Obtain version with:http://manager_host:7180/api/version 3. Make a backup of the Postgre DB and server directories.
#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.
The file is archived under/home/user/. 4. At the server end, stop the server, stop server-db, discard server-db off
$ sudo service cloudera-scm-server stop
$ sudo service cloudera-scm-server-db stop
$ sudo chkconfig cloudera-scm- Server-db off
5. Ensure MySQL server is properly installed. —————— –[1]
6. Install, configure MySQL software--[2]
7. Create "TEMP" db and assign permissions, record "Example 1: Run script when MySQL is installed on another host" [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. Perform/usr/share/cmf/schema/scm_prepare_database.sh (can be reset)
$/usr/share/cmf/schema/scm_prepare_database.sh mysql-h Mysql_hostname- u user-p--scm-host manager_host _db_name> <scm_user> <scm_password>
Note:run $/usr/share/cmf/schema/scm_prepare_database.sh
With the no arguments to get syntax assistance 9. Opens the Server service.
Service httpd start
$ sudo service cloudera-scm-server start
10.Cloudera Manager Web user interface login and upload enterprise license key.
11. Restart Scm-server
$ sudo service cloudera-scm-server restart
12. Repair cm configuration (STEP2), through 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 (command to restore the cluster):-H " Content-type:application/json ". If required
//verify that there are no errors, the command prints the API even on connection failure.
13. Log in cm to verify the current configuration options. All services should now be available but stop state.
Try, all hosts-rerun the Upgrade Wizard.
14.cleanup:
$ Yum Erase CLOUDERA-MANAGER-SERVER-SB
15. If the scm-agent fails to start, you must remove or a PID./var/lib/cloudera-scm-agent/and reboot the agent.
Reference Web site
[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/"translation"
http://cwiki.apachecn.org/pages/viewpage.action?pageId=2888090
Reference URL 1-– Configure MySQL server and JDBC driver:
1.
Reference URL 3: Configure MYSQL2 on another host to connect MYSQL1.
3, view the PostgreSQL SCM User's password
grep password/etc/cloudera-scm-server/db.properties
will get the following information:
[Root@hadoop1/]# grep password/etc/cloudera-scm-server/db.properties
Com.cloudera.cmf.db.password=pfxluudkjo
4, Landing PostgreSQL database
Psql-h localhost-p 7432-u SCM
Enter the password found in the third step
/usr/share/cmf/schema/scm_prepare_database.sh PostgreSQL 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 removal, rerun Upgrade Wizard
/var/lib/cloudera-scm-agent/cm_guid Delete guid– host bad (due to the uniqueness of the GUID of the original cluster, obsolete)
-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
- Run the Upgrade Wizard again
-parcel was not distributed, but was active.
Cancel Parcel Exception distribution status-Activate the card master
Use the Curl-x POST with Cloudera API.
The appropriate configuration is found in the http://node0:7180/api/v14/cm/deployment.
Format API Documentation: http://node0:7180/static/apidocs/
Curl-u admin:admin-x POST http://node0:7180/api/v14/clusters/cluster/parcels/products/KAFKA/versions/ 2.0.2-1.2.0.2.p0.5/commands/deactivate
curl-u admin:admin-x POST http://node0:7180/api/v14/clusters/cluster/ Parcels/products/cdh/versions/5.8.0-1.cdh5.8.0.p0.42/commands/deactivate
http://community.cloudera.com/t5/Cloudera-Manager-Installation/ Parcel-not-distributed-but-have-active-state-activating/m-p/32474/highlight/true
Ctrl + B
Deny Connection –/etc/hosts
Official Documents
Https://www.cloudera.com/documentation/enterprise/latest/topics/installation.html