标签:
登录到YUM节点,将安装包复制到指定目录。
cp HDPsearch.tar.gz /var/www/html/HDPsearch.tar.gz
登录到Ambari主机节点,安装Ambari插件。
解压插件unzip solr-stack.zip
mv solr-stack /var/lib/ambari-server/resources/stacks/HDP/2.2/services/SOLR
重启服务ambari-server restart
登录到Ambari管理界面,开始安装Solr Server。
备注:
可能运到的命令
cp HDPsearch.tar.gz /var/www/html/HDPsearch.tar.gz
unzip solr-stack.zip
mv solr-stack /var/lib/ambari-server/resources/stacks/HDP/2.2/services/SOLR
ambari-server restart
cd /var/lib/ambari-agent/cache/stacks/HDP/2.2/services/SOLR
GET STATUS
curl -u admin:admin -H "X-Requested-By: ambari" -X GET http://hadoop1.icccuat.com:8080/api/v1/clusters/hdp/services/SOLR
STOP SERVICE
curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d ‘{"RequestInfo":{"context":"Stop Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}‘ http://hadoop1.icccuat.com:8080/api/v1/clusters/hdp/services/SOLR
delete service
curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://hadoop1.icccuat.com:8080/api/v1/clusters/hdp/services/SOLR
/usr/lib/python2.6/site-packages/resource_management/libraries/script
rm -rf /usr/solr
rm -rf /var/run/solr
rm -rf /etc/solr
rm -rf /var/log/solr
ambari-server stop
ambari-server start
rm -rf /var/lib/ambari-agent/cache/stacks/HDP/2.2/services/SOLR
clean.sh
/var/run/solr/solr.pid
rm /var/run/solr/solr.pid
准生产
curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d ‘{"RequestInfo":{"context":"Start RegionServer","operation_level":{"level":"HOST_COMPONENT","cluster_name":"‘Quasi_Production‘","host_name":"‘zdbdsps024.iccc.com‘","service_name":"‘HBase‘"}},"Body":{"HostRoles":{"state":"STARTED"}}}" http://172.19.189.49:8080/api/v1/clusters/Quasi_Production/hosts/zdbdsps024.iccc.com/host_components/HBase_SERVER
curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d ‘{"RequestInfo":{"context":"Restart Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}‘ http://172.19.189.49:8080/api/v1/clusters/Quasi_Production/services/HBase
hdp-select set all 2.2.6.0-2800
ambari-server set-current --cluster-name=Quasi_Production --version-display-name=HDP-2.2.6.0
HDP-2.2.4.2
标签:
原文地址:http://www.cnblogs.com/riyueyuzhuzhu/p/5584768.html