docker

作者: 老夫刘某 | 来源:发表于2017-12-03 15:40 被阅读0次

http://mubanjiu.com/2016/05/05/Docker-K8S/

export MAVEN_HOME=/usr/local/maven
export PATH=.:$MAVEN_HOME/bin:$PATH

export ANT_HOME=/usr/local/ant
export PATH=.:$ANT_HOME/bin:$PATH

export JAVA_HOME=/usr/local/java/jdk1.8.0_65
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
ulimit -SHn 65535

centos7 关闭防火墙

/bin/bash

yum install net-tools -y
yum install firewalld -y
systemctl stop firewalld.service
systemctl disable firewalld.service
firewallstate=firewall-cmd --state
echo '$firewallstate' >>./fire.log

systemctl stop firewalld
systemctl mask firewalld

下载iptables包

yum install iptables-services -y
systemctl enable iptables

systemctl [stop|start|restart] iptables

systemctl restart iptables
service iptables save
/usr/libexec/iptables/iptables.init save
systemctl enable iptables

logshtash
收集tomcat日志:

更多ELK资料请访问 http://devops.taobao.com

input {
file {
type => 'tomcat'
path => "/usr/local/tomcat/logs/*"
start_position => "end"
}
}

filter {
if [type] == "tomcat" {
multiline {
patterns_dir => "/app/config/patterns"
pattern => "(%{TOMCAT_DATESTAMP})|(%{CATALINA_DATESTAMP})"
negate => true
what => "previous"
}
if "_grokparsefailure" in [tags] {
drop { }
}
grok {
patterns_dir => "/app/config/patterns"
match => [ "message", "%{TOMCATLOG}", "message", "%{CATALINALOG}" ]
}
date {
match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS Z", "MMM dd, yyyy HH:mm:ss a" ]
}
}
}

output {
elasticsearch_http {
host => "localhost"
}
}


github地址:https://github.com/sdd330/tomcat-elk

过滤nginx日志:

更多ELK资料请访问 http://devops.taobao.com

input {
file {
path => "/var/log/nginx/access"
}
}

filter {
mutate { replace => { "type" => "nginx_access" } }
grok {
patterns_dir => "/etc/logstash/patterns/"
match => { "message" => "%{NGINXACCESS}" }
}
date {
match => [ "timestamp" , "dd/MMM/YYYY:HH:mm:ss Z" ]
}
geoip {
source => "clientip"
}
}

output {
elasticsearch {
host => "localhost"
protocol => "http"
}
stdout { codec => rubydebug }
}


github地址:https://github.com/nbigot/openresty_nginx_logstash_kibana_elasticsearch_centos6

https://www.elastic.co/guide/en/logstash/current/config-examples.html
https://www.elastic.co/guide/en/logstash/current/config-examples.html#using-conditionals
filter https://www.elastic.co/guide/en/logstash/current/filter-plugins.html
input模块 https://www.elastic.co/guide/en/logstash/current/input-plugins.html
output模块 https://www.elastic.co/guide/en/logstash/current/output-plugins.html
中文文档 https://es.xiaoleilu.com/010_Intro/30_Tutorial_Search.html

基础语言配置http://www.bubuko.com/infodetail-524080.html

logstash操作使用 http://www.cnblogs.com/valor-xh/p/6292701.html

http://blog.163.com/liyangbbs@126/blog/static/1880097020119134457678/

相关文章

  • docker学习

    docker镜像 docker容器 docker仓库 安装docker docker版本 docker分为社区版和...

  • Docker安装和运行

    获取Docker 安装Docker 验证安装 1、获取Docker Docker for Mac Docker f...

  • Docker知识手册

    Docker 容器 启动docker:docker start 查看docker运行状态:docker stats...

  • Docker简介

    章节介绍 # Docker是什么# Docker包括什么# Docker镜像# Docker编配# Docker还...

  • Docker 常用操作

    Docker docker: 18.09.4、nvidia-docker: 2.0.3 docker 19.03 ...

  • rancher+harbor离线安装

    安装docker,此docker为社区版docker。docker官方文档:https://docs.docker...

  • Linux之Docker

    Linux之Docker 目录 Docker简单介绍 在线Docker安装 离线Docker安装 Docker简单...

  • Docker常用命令

    Docker常用命令 Docker帮助命令 docker version:查看docker版本 docker in...

  • Docker基础操作

    Docker部署 Docker安装 镜像加速 Docker 基础命令 Docker镜像管理 搜索镜像docker ...

  • docker容器状态查看命令集

    docker inspect 用法 : docker inspect [docker名称/docker short...

网友评论

      本文标题:docker

      本文链接:https://www.haomeiwen.com/subject/vsgabxtx.html