QConf简要搭建过程
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简要搭建过程的更多相关文章
- 【转】Nginx windows下搭建过程
Nginx windows下搭建过程 内容列表: 简要介绍 下载安装 配置测试 一.简要介绍 Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器, ...
- Maven多模块,Dubbo分布式服务框架,SpringMVC,前后端分离项目,基础搭建,搭建过程出现的问题
现互联网公司后端架构常用到Spring+SpringMVC+MyBatis,通过Maven来构建.通过学习,我已经掌握了基本的搭建过程,写下基础文章为而后的深入学习奠定基础. 首先说一下这篇文章的主要 ...
- Access应用笔记<四>-一个完整的自动化报表搭建过程
距离之前的三篇日志已经很久啦,今天终于完成了一个比较完整的自动化报表搭建过程 基于公司数据保密原则,样板就不放到网上来了,简单说一下背景: 这次access实现的功能包括: 1)为部门整体搭建了一个员 ...
- iOS---XMPP环境搭建过程
什么是即时通信? 即时通信是目前Internet上最为流行的通讯方式, 各种各样的即时通讯软件也层出不穷, 服务提供商也提供了越来越枫木的通讯服务功能. 即时通讯有多重实现方式, XMPP就是其中一种 ...
- 最简单的SVN环境搭建过程
本文简单描述最简单的SVN环境搭建过程 搭建环境:windows (个人验证了windows2003,windows xp) 使用软件:Setup-Subversion-1.6.17 //Serve ...
- cocos2d-x3.9 NDK android 环境搭建过程中遇到的错误
编译环境:Mac OS, NDK r9d 错误:arm-linux-androideabi-gcc: error trying to exec '/media/Project/adt-bundle-l ...
- 懒人记录 Hadoop2.7.1 集群搭建过程
懒人记录 Hadoop2.7.1 集群搭建过程 2016-07-02 13:15:45 总结 除了配置hosts ,和免密码互连之外,先在一台机器上装好所有东西 配置好之后,拷贝虚拟机,配置hosts ...
- mercurial(Hg) Server 搭建 过程记录
mercurial(Hg) Server 搭建 过程记录 1. 环境说明 只是测试搭建,环境为本机开发环境:win 8.1 + IIS8.5 软件准备: 2. 软件安装 先安装Python2.7, ...
- PXE简要配置过程
目录 1.所需服务 2.简要配置过程 1.dhcp服务 2.tftp服务 3.提供pxelinux.0配置文件 4.提供系统所需文件 1.所需服务: dhcp服 ...
随机推荐
- java GUI简单记事本
代码: import java.awt.*; import java.awt.event.*; import java.io.*; class MyMenu { //定义该窗体所需的组件,方便其他函数 ...
- linux php安装memcached扩展
memcached的安装包括:1.服务端的安装:2.客户端的安装 一.服务器端安装 方法一: memcached 依赖于libevent 库,因此我们需要先安装libevent. 假设将源码放在/us ...
- option触发事件两种方法总结
代码如下: <!doctype html> <html> <head> <meta charset="UTF-8"> <tit ...
- C++/C语言程序代码
//-----------------------------------1 #include <stdio.h> #include<stdlib.h> void main() ...
- 初学jQuery之jQuery选择器
今天我们就谈论一下jquery选择器,它们大致分成了四种选择器!!!! 1.基本选择器(标签,ID,类,并集,交集,全局) 1.0(模板) <body> <div id=" ...
- 初学ant
项目管理第二步——ant 自动化完成项目的构建 Ant1.7.chm Ant权威指南 Ant入门 Ant使用指南 Ant安装文件压缩包 dir 查看所有目录mkdir 创建目录 创建一个文 ...
- 3D Touch开发
一.3d Touch 官方文档介绍 1.A user can now press your Home screen icon to immediately access functionality p ...
- MySQL逻辑备份利器-mydumper
关于mydumper的简介和下载请访问:https://launchpad.net/mydumper 简言之,mydumper是多线程逻辑备份,对于表和数据量很大的情况下,建议使用mydumper提高 ...
- 程序点滴001_Python模拟点阵数字
尝试过很多编程语言,写过不少程序(当然,基本上都是些自娱自乐或给自己用的工具类的小玩意儿),逐渐认识到编写程序是一个不断完善.不断优化的过程——编程首先要有一个想法(目标),围绕这个目标形成最基本的功 ...
- iOS 图片旋转方法
iOS 图片旋转方法 通过 CGImage 或 CIImage 旋转特定角度 UIImage可通过CGImage或CIImage初始化,初始化方法分别为init(cgImage: CGImage, s ...