QConf的组件:

ZooKeeper as the server, restore all configurations, so the limit data size of single configuration item is 1MB, since the size limit of Znode.

qconf_agent is a daemon run on client machine, maintain data in share memory.

share memory, QConf use share memory as the local cache of all configuration items needed by current client.

interface in different programming languages, chose your language for accessing of QConf.

1、准备环境

#yum install -y cmake
#yum install -y gdbm gdbm-devel
#yum install -y automake-devel autoconf m4 perl perl-devel gcc-c++

2、拉取代码,编译安装

# git clone https://github.com/Qihoo360/QConf.git
# cd QConf
# mkdir build && cd build
# cmake .. -DCMAKE_INSTALL_PREFIX=/opt/qconf
# make
# make install

3、在QConf 配置文件中配置Zookeeper集群地址

#vim /opt/qconf/conf/idc.conf
# all the zookeeper host configuration.
#[zookeeper]
zookeeper.stg=172.40.0.215:2181,172.40.0.216:2181,172.40.0.217:2181

4、在QConf配置文件中指定本地机房

#vim /opt/qconf/conf/localidc.conf
stg

5、启动QConf

# cd /opt/qconf/bin && bash agent-cmd.sh start
# ps -ef | grep qconf
root 17703 1 0 13:30 ? 00:00:00 /opt/qconf/bin/qconf_agent
root 17704 17703 0 13:30 ? 00:00:08 /opt/qconf/bin/qconf_agent

6、尝试用shell取值

qconf usage: qconf command key [idc]
command: can be one of below commands:
get_conf: get configure value
get_host: get one service
get_allhost: get all services available
get_batch_keys: get all children keys
key: the path of your configure items
idc: query from current idc if be omitted # ln -sv /opt/qconf/bin/qconf /usr/bin/
# qconf get_batch_keys configs
activity-backend
activity-front
backend-3.0
backend-card
backend-core
backend-credit
backend-franchisee
backend-member
backend-mobile
dfb-front
foo
front-agent
front-franchisee
msgcenter-backend
msgcenter-front
# qconf get_conf /configs/backend-3.0/dfb3Service

QConf简要搭建过程的更多相关文章

  1. 【转】Nginx windows下搭建过程

    Nginx windows下搭建过程 内容列表: 简要介绍 下载安装 配置测试 一.简要介绍 Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器, ...

  2. Maven多模块,Dubbo分布式服务框架,SpringMVC,前后端分离项目,基础搭建,搭建过程出现的问题

    现互联网公司后端架构常用到Spring+SpringMVC+MyBatis,通过Maven来构建.通过学习,我已经掌握了基本的搭建过程,写下基础文章为而后的深入学习奠定基础. 首先说一下这篇文章的主要 ...

  3. Access应用笔记<四>-一个完整的自动化报表搭建过程

    距离之前的三篇日志已经很久啦,今天终于完成了一个比较完整的自动化报表搭建过程 基于公司数据保密原则,样板就不放到网上来了,简单说一下背景: 这次access实现的功能包括: 1)为部门整体搭建了一个员 ...

  4. iOS---XMPP环境搭建过程

    什么是即时通信? 即时通信是目前Internet上最为流行的通讯方式, 各种各样的即时通讯软件也层出不穷, 服务提供商也提供了越来越枫木的通讯服务功能. 即时通讯有多重实现方式, XMPP就是其中一种 ...

  5. 最简单的SVN环境搭建过程

    本文简单描述最简单的SVN环境搭建过程 搭建环境:windows (个人验证了windows2003,windows xp) 使用软件:Setup-Subversion-1.6.17  //Serve ...

  6. cocos2d-x3.9 NDK android 环境搭建过程中遇到的错误

    编译环境:Mac OS, NDK r9d 错误:arm-linux-androideabi-gcc: error trying to exec '/media/Project/adt-bundle-l ...

  7. 懒人记录 Hadoop2.7.1 集群搭建过程

    懒人记录 Hadoop2.7.1 集群搭建过程 2016-07-02 13:15:45 总结 除了配置hosts ,和免密码互连之外,先在一台机器上装好所有东西 配置好之后,拷贝虚拟机,配置hosts ...

  8. mercurial(Hg) Server 搭建 过程记录

    mercurial(Hg) Server 搭建 过程记录 1.  环境说明 只是测试搭建,环境为本机开发环境:win 8.1 + IIS8.5 软件准备: 2.  软件安装 先安装Python2.7, ...

  9. PXE简要配置过程

    目录 1.所需服务 2.简要配置过程     1.dhcp服务     2.tftp服务     3.提供pxelinux.0配置文件     4.提供系统所需文件 1.所需服务:     dhcp服 ...

随机推荐

  1. Android jni 编程1(对基本类型字符串的操作)

    最近一直在学安卓的jni,主要参考的是黑马程序员的视频教程,讲的确实不错. 那就自己总结一下吧,算是对学习的复习. 这篇博客也主要参考了这位博主:http://www.cnblogs.com/acti ...

  2. 使用 flow.ci 快速发布你的项目文档

    软件研发的协作过程中,文档是必不可少的一环,有需求文档.接口文档.使用文档等等.当开始写文档时,首先会遇到两个问题: team members 之间如何协作? 文档 OK 后如何分发,去哪里看?如何更 ...

  3. c#访问存储过程

    // 2015/07/04 // 访问存储过程 using System; using System.Collections.Generic; using System.Linq; using Sys ...

  4. kbhit()的三个测试

    #include <stdio.h> #include<conio.h> #include<stdlib.h> int main() { ; system(&quo ...

  5. android学习11——Handler,Looper,MessageQueue工作原理

    Message是Handler接收和处理的消息对象. 每个线程只能拥有一个Looper.它的loop方法读取MessageQueue中的消息,读到消息之后就把消息交给发送该消息的Handler进行处理 ...

  6. 深入探讨 CSS 特性检测 @supports 与 Modernizr

    什么是 CSS 特性检测?我们知道,前端技术日新月异的今天,各种新技术新属性层出不穷.在 CSS 层面亦不例外. 一些新属性能极大提升用户体验以及减少工程师的工作量,并且在当下的前端氛围下: 很多实验 ...

  7. webpack从0开始---(一)

    换了新环境,同时也有了新目标,从webpack开始. webpack:具体是什么,大家还是自行去看吧,这里就不多做介绍了! 传送门---webpack.github.io 网上的安装方法很多,这里我就 ...

  8. Java8中 Parallel Streams 的陷阱 [译]

    译注:文本有所精简和意译 原文链接 : Java Parallel Streams Are Bad for Your Health!原作者:OLEG SHELAJEV 翻译:Hason 转载请保留相关 ...

  9. Collector for ArcGIS的使用体验

    基于Esri的Portal for ArcGIS(下面简称Portal),用户可以搭建一个本地的地理信息云平台.围绕着这个云平台,Esri为不同的终端提供了响应的解决方案,其中Collector fo ...

  10. 实战Tomcat配置SSL,使用openssl制作证书

    制作证书以及Tomcat配置 搭建openssl环境,下载openssl并设置环境变量方便命令行的使用: 修改openssl配置文件,设置dir目录,如设置dir=e:/temp/openssl_ca ...