logstash nginx代理配置
http 协议 ; tcp 7层123456789101112131415161718192021222324252627282930313233343536373839404142434445464748http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_n ...
logstash tcp /http nginx配置
http 协议 ; tcp 7层12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile ...
linux
未读centos7 mutt安装配置安装配置sendmail12sudo yum install -y sendmailyum install -y sendmail-cf
vi /etc/mail/sendmail.mc
1DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')
1m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
vi /etc/mail.rc末尾加入
1234567set nss-config-dir=/etc/pki/nssdbset ssl-verify=ignoreset smtp=smtps://smtp.exmail.qq.com:465set smtp-auth=loginset smtp-auth-user=service-alert@gaojihealth.comset smtp-auth-password=Gaoji_001#set from=service-alert@gaojihealth.com
测试sendmail
1echo ...
docker
未读Dockerfile常用指令
DockerFile指令
build命令12345678Usage: docker image build [OPTIONS] PATH | URL | -Options:-t, --tag list # 镜像名称-f, --file string # 指定Dockerfile文件位置示例:docker build .docker build -t shykes/myapp .docker build -t shykes/myapp -f /path/Dockerfile /path
docker 网络Docker支持5种网络模式
bridge默认网络,Docker启动后默认创建一个docker0网桥,默认创建的容器也是添加到这个网桥中。
host容器不会获得一个独立的network namespace,而是与宿主机共用一个。
none获取独立的network namespace,但不为容器进行任何网络配置。
container与指定的容器使用同一个network namespace,网卡配置也都是相同的。-自定义自定义网桥,默认与bridge网络一样。
Linux IP信息包过滤原理:Docker主要通过netfilter/iptables实现网络通信。iptables由netfilter和iptables组成,netfilter组件是Linux内核集成的信息包过滤系统,它维护一个信息包过滤表,这个表用于控制信息包过滤处理的规则集。而iptables只是一个在用户空间的工具,用于增删改查这个过滤表的规则。
容器访问外部1234# iptables -t nat -nLChain POSTROUTING (policy ACCEPT)target p ...
docker
未读docker基础
运行busybox
1docker run -d busybox ping baidu.com
查看进程层级关系
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121[root@master docker]# docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES5ce05336bf64 bu ...
linux
未读centos7安装docker添加docker yum源12345678cat >>/etc/yum.repos.d/docker.repo<<EOF[docker-ce-edge]name=Docker CE Edge - \$basearchbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/\$basearch/edgeenabled=1gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgEOF
yum install12345678910yum -y install docker-ce### 查看docker版本docker --version### 启动dockersystemctl enable dockersystemctl start docker
linux
未读centos7安装pip3123sudo yum install epel-releasesudo yum install python34 python34-setuptools sudo easy_install-3.4 pip
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
sudo yum install gccerror: command ‘gcc’ failed with exit status 1
sudo /bin/yum install python34-devel
git update
安装依赖12yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel yum install gcc perl-ExtUtils-MakeMaker
编译安装git12345678cd /usr/srcwg ...
big-data
未读网卡一
网卡二
vi ifcfg-enp0s312345678910111213141516171819202122TYPE=EthernetBOOTPROTO=static#DEFROUTE=yes#PEERDNS=yes#PEERROUTES=yes#IPV4_FAILURE_FATAL=no#IPV6INIT=yes#IPV6_AUTOCONF=yes#IPV6_DEFROUTE=yes#IPV6_PEERDNS=yes#IPV6_PEERROUTES=yes#IPV6_FAILURE_FATAL=no#IPV6_ADDR_GEN_MODE=stable-privacyNAME=enp0s3UUID=6d91209c-4fdc-4ed9-8e42-0c304a32c9a7DEVICE=enp0s3ONBOOT=yesIPADDR=192.168.57.120NETMASK=255.255.255.0GATWAY=192.168.57.1DNS1=202.106.0.2
mac 虚拟机网络配置
参考链接: https://jingyan.baidu.com/article/94 ...
docker
未读docker swarm集群搭建
准备:
三台centos
查看当前机器ipip a
1234567891011121314151617181920212223[vagrant@swarm-manager ~]$ ip a1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 ...