[root@localhost software]# pwd
/export/software
[root@localhost software]# tar -zxvf metaq-server-1.4.6.2.tar.gz
[root@localhost software]# cd taobao
[root@localhost taobao]# ls
COPYING.txt metamorphosis-server-wrapper README.md
[root@localhost taobao]# mv metamorphosis-server-wrapper metaq1.4.6.2
[root@localhost taobao]# cp metaq1.4.6.2 /usr/local -r
[root@localhost taobao]# cd /usr/local/metaq1.4.6.2/
[root@localhost metaq1.4.6.2]# zkServer.sh status
JMX enabled by default
Using config: /usr/local/zookeeper-3.4.6/bin/../conf/zoo.cfg
Mode: standalone
[root@localhost metaq1.4.6.2]# netstat -ntlp | grep 2181
tcp 0 0 :::2181 :::* LISTEN 2542/java
[root@localhost metaq1.4.6.2]# pwd
/usr/local/metaq1.4.6.2
[root@localhost 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
[root@localhost bin]# pwd
/usr/local/metaq1.4.6.2/bin
[root@localhost bin]# ./metaServer.sh start
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;
}
}