你的位置:首页 > Java教程

[Java教程]metaq安装实例

下载metaq:
http://fnil.net/downloads/index.html安装metaq:
[[email protected] software]# pwd/export/software[[email protected] software]# tar -zxvf metaq-server-1.4.6.2.tar.gz[[email protected] software]# cd taobao[[email protected] taobao]# lsCOPYING.txt metamorphosis-server-wrapper README.md[[email protected] taobao]# mv metamorphosis-server-wrapper metaq1.4.6.2[[email protected] taobao]# cp metaq1.4.6.2 /usr/local -r[[email protected] taobao]# cd /usr/local/metaq1.4.6.2/

配置metaq:
[[email protected] metaq1.4.6.2]# zkServer.sh statusJMX enabled by defaultUsing config: /usr/local/zookeeper-3.4.6/bin/../conf/zoo.cfgMode: standalone[[email protected] metaq1.4.6.2]# netstat -ntlp | grep 2181tcp    0   0 :::2181           :::*            LISTEN   2542/java[[email protected] metaq1.4.6.2]# pwd/usr/local/metaq1.4.6.2[[email protected] metaq1.4.6.2]# vim conf/server.ini#配置metaq数据路径;数据文件路径,默认在user.home/meta下dataPath=/usr/local/metaq1.4.6.2/data;日志数据文件路径,默认跟dataPath一样dataLogPath=/usr/local/metaq1.4.6.2/data/logs# 确保metaq zookeeper服务相关,依赖的zookeeper的地址是有效的,默认配置如下.同笔者的一样.所以无需修改[zookeeper];zookeeper服务器列表zk.zkConnect=localhost:2181;zookeeper心跳超时,单位毫秒,默认30秒zk.zkSessionTimeoutMs=30000;zookeeper连接超时时间,单位毫秒,默认30秒zk.zkConnectionTimeoutMs=30000;zookeeper数据同步时间,单位毫秒,默认5秒zk.zkSyncTimeMs=5000

启动Metaq:
[[email protected] bin]# pwd/usr/local/metaq1.4.6.2/bin[[email protected] bin]# ./metaServer.sh start

访问web管理平台
Web管理平台HTTP端口号为8120. 访问该端口查看管理平台

用Nginx代理8120端口.
upstream tomcat_tools.metaq.local {    server 127.0.0.1:8120 weight=10 max_fails=2 fail_timeout=300s;}server {    listen          80;    server_name       tools.metaq.local.com;    root           /usr/local/metaq1.4.6.2/;    access_log        /usr/local/metaq1.4.6.2/logs/tools.metaq.local.com_access.log main;    error_log        /usr/local/metaq1.4.6.2/logs/tools.metaq.local.com_error.log warn;    error_page     403 404 /40x.html;    location / {      index index.html index.htm;      proxy_next_upstream   http_500 http_502 http_503 http_504 error timeout invalid_header;      proxy_set_header    Host $host;      proxy_set_header    X-Real-IP    $remote_addr;      proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;      proxy_pass       http://tomcat_tools.metaq.local;      expires         0d;    }}

重新启动nginx,配置host,访问tools.metaq.local.com.转载请注明出处:[http://www.cnblogs.com/dennisit/p/4549990.html]