Linux下Monstache 6.X安装配置(图文详细)
2021/5/24 7:27:46
本文主要是介绍Linux下Monstache 6.X安装配置(图文详细),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
Linux下Monstache 6.X安装配置(图文详细)
一、资源准备
- 资源下载地址: https://github.com/rwynn/monstache
二、版本关系
三、安装配置
- 上传资源
# 上传文件至soft目录 #切换目录并解压 cd /opt/soft unzip monstache-rel6.zip -d /opt/module/ #切换目录并查看 cd /opt/module/monstache-rel6/ && ll
- 执行安装
#安装命令 go install
- 查看安装文件
#查看命令 cd /opt/GP/bin/ && ll
- 创建配置目录
#切换并创建存储目录 cd /opt/module/monstache-rel6 && mkdir -p repo/logs repo/conf && ll
- 编辑配置文件
#编辑命令 cd /opt/module/monstache-rel6/repo/conf && vim config.toml #文件内容 # cmdb connection settings # connect to MongoDB using the following URL mongo-url = "mongodb://用户:密码@IP:PORT/数据库名称" # connect to the Elasticsearch REST API at the following node URLs elasticsearch-urls = ["http://IP:PORT"] # frequently required settings # if you need to seed an index from a collection and not just listen and sync changes events # you can copy entire collections or views from MongoDB to Elasticsearch direct-read-namespaces = ["roo.cc_ApplicationBase"] # if you want to use MongoDB change streams instead of legacy oplog tailing use change-stream-namespaces # change streams require at least MongoDB API 3.6+ # if you have MongoDB 4+ you can listen for changes to an entire database or entire deployment # in this case you usually don't need regexes in your config to filter collections unless you target the deployment. # to listen to an entire db use only the database name. For a deployment use an empty string. change-stream-namespaces = ["roo.cc_ApplicationBase"] # additional settings # compress requests to Elasticsearch gzip = true # use the following user name for Elasticsearch basic auth elasticsearch-user = "" # use the following password for Elasticsearch basic auth elasticsearch-password = "" # use 4 go routines concurrently pushing documents to Elasticsearch elasticsearch-max-conns = 4 # propagate dropped collections in MongoDB as index deletes in Elasticsearch dropped-collections = true # propagate dropped databases in MongoDB as index deletes in Elasticsearch dropped-databases = true # resume processing from a timestamp saved in a previous run resume = true # do not validate that progress timestamps have been saved resume-write-unsafe = false # override the name under which resume state is saved resume-name = "default" # use a custom resume strategy (tokens) instead of the default strategy (timestamps) # tokens work with MongoDB API 3.6+ while timestamps work only with MongoDB API 4.0+ resume-strategy = 0 # print detailed information including request traces verbose = true # mapping settings [[mapping]] namespace = "roo.cc_ApplicationBase" index = "roo.cc_applicationbase"
- 配置自启
#切换目录 cd /etc/init.d #编辑命令 vim monstache #脚本内容 #!/bin/bash # # chkconfig: 2345 10 90 # # description: MONSTACHE RUN #程序名 MONSTACHE_NAME="monstache-rel6" #资源位置 MONSTACHE_OPTS=/opt/GP/bin/monstache MONSTACHE_CONF=/opt/module/monstache-rel6/repo/conf/config.toml #日志位置 MONSTACHE_LOGS=/opt/module/monstache-rel6/repo/logs/monstache.log #开始方法 start() { nohup $MONSTACHE_OPTS -f $MONSTACHE_CONF > $MONSTACHE_LOGS 2>&1 & echo "$MONSTACHE_NAME started success." } #结束方法 stop() { echo "stopping $MONSTACHE_NAME ..." kill -9 `ps -ef|grep $MANSTACHE_OPTS|grep -v grep|grep -v stop|awk '{print $2}'` } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo "Userage: $0 {start|stop|restart}" exit 1 esac #授权 chmod +x monstache #添加系统服务 chkconfig --add monstache chkconfig monstache on chkconfig --list
- 启停相关
#启停命令 systemctl start|stop|restart monstache #查看进程 ps -ef|grep monstache
- 到此、配置完成。
这篇关于Linux下Monstache 6.X安装配置(图文详细)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-09-11Linux部署Scrapy学习:入门级指南
- 2024-09-11Linux部署Scrapy:入门级指南
- 2024-08-21【Linux】分区向左扩容的方法
- 2024-08-21【Linux】gnome桌面环境切换KDE Plasma
- 2024-08-19如何安装 VMware Tools (macOS, Linux, Windows)
- 2024-08-15Linux部署Scrapy教程:入门级指南
- 2024-07-29linux命令行下好用的性能监控工具atop
- 2024-07-04Linux系统上离线升级SSH服务的具体操作步骤-icode9专业技术文章分享
- 2024-06-0600-macOS和Linux安装和管理多个Python版本
- 2024-03-30[译]漫画SELinux概念