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. assign和weak的深层次解析

    我们知道在设置类的属性时,控件一般中weak,对象一般用strong,数据类型一般使用assign,其中weak和assign都不会使计数器增加,那为什对象不可以使用assign呢? weak与ass ...

  2. xml类型转换列表显示 SQL查询

    数据库中存在字段类型为xml 的数据, 现举例 xml 字段存储的数据为: <MortgageInfoShipList> <ITEMS> <ITEM> <Sh ...

  3. hadoop2.5.2安装部署

    0x00 说明 此处已经省略基本配置步骤参考Hadoop1.0.3环境搭建流程,省略主要步骤有: 建立一般用户 关闭防火墙和SELinux 网络配置 0x01 配置master免密钥登录slave 生 ...

  4. ZooKeeper配额

    ZooKeeper可以在znode上设置配额限制.如果超出了配置限制,ZooKeeper将会在log日志中打印WARN日志.如果超出配额限制,并不会停止行为操作. ZooKeeper的配额是存储在/z ...

  5. matlab分割背景与物体

    [name,path]=uigetfile('*.jpg;*.png;*.bmp','选择一张图片');f=imread([path name]);count = 0; T = mean2(f); d ...

  6. 如何用Visual Studio 2008 写汇编程序?

    如何用Visual Studio 2008写汇编程序? 最近在上夏季小学期,在学汇编语言,关于用什么编辑环境一直很纠结.很想找到一个比较好的IDE,但是试了几个像RadASM之类的,发现还不是很满意. ...

  7. R语言从小木虫网页批量提取考研调剂信息

    一.从URL读取并返回html树     1.1 Rcurl包         使用Rcurl包可以方便的向服务器发出请求,捕获URI,get 和 post 表单.比R socktet连接要提供更高水 ...

  8. iOS仿微博客户端一条微博的布局

    前言 做一个微博客户端的第三方是自学的第一个实践的项目,自从从事iOS工作之后,就把这个项目给搁置了.趁现在过年回来有些空闲时间,再次修改(总觉得项目就是不停地修改).并且记录一点东西,以后可再回头看 ...

  9. lua和c的亲密接触

    介绍 lua和c的亲密接触,靠的是一个虚拟栈.lua通过这个虚拟栈来实现和c之间值的互传.栈上的每一个元素是一个lua值(nil,number,string...). 当lua调用c函数的时候,这个函 ...

  10. Jquery的学习:基础核心!

    一.什么是 jQuery jQuery是一个JavaScript库,它通过封装原生的JavaScript函数得到一整套定义好的方法.它的作者是John Resig,于2006年创建的一个开源项目,随着 ...