logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

Linux关闭某个被占用的端口

1、强制杀死该端口进程sudo fuser -k -n tcp 802、根据PID关闭某个被占用的端口netstat -tunlp| grep 80lsof -i:80sudo kill -9 PID...

#linux
GoLang封装redigo

安装redigo扩展go get -v github.com/gomodule/redigo/redispackage redisimport ("context""fmt""github.com/opentracing/opentracing-go""strconv""strings""time""why/config""why/log""...

#golang#redis
GoLang封装rabbtimq

go get github.com/streadway/amqp封装生产者和消费者:package rabbitmqimport ("context""fmt""github.com/opentracing/opentracing-go""github.com/streadway/amqp"srcLog "log""time""why/config"...

#golang#rabbitmq
Vim打造成GoLang开发环境

源码安装GoLang进入:https://golang.google.cn/dl/下载:wgethttps://golang.google.cn/dl/go1.14.6.darwin-amd64.tar.gz安装:tar -C /usr/local -xzf go1.14.6.linux-amd64.tar.gz配置环境变量:vim ~/.bash_profileexport GOROOT=/us

文章图片
#vim
GoLang实现基于Jaeger的分布式链路追踪

package traceimport ("net/http""net/url""time""why/log""github.com/gin-gonic/gin"opentracing "github.com/opentracing/opentracing-go""github.com/opentracing/opentracing-go/ext")con...

#golang
redis-cluster-proxy代理集群并支持mget命令

参考文档搭建集群:http://www.redis.cn/topics/cluster-tutorial.htmlredis-cluster-proxy:https://github.com/RedisLabs/redis-cluster-proxy搭建集群集群最少为3个节点,所以需要复制3份redis配置文件,每个文件更改下面几个地方:port:端口号pidfile:/var/run/redis

#redis#集群
nginx—限制IP访问

指定:allow:允许IP地址或IP地址段访问(http、server、location、limit_except)deny:禁止IP地址或IP地址段访问(http、server、location、limit_except)举例:locations / {deny 192.168.1.1;#禁止访问allow 192.168.1.2;#允许访问...

nginx—内置变量表

变量名说明$arg_name指URL请求中的参数,name是参数的名字$args代表URL中所有请求的参数$binary_remote_addr客户端地址以二进制数据的形式出现,通常会和限速模块一起使用$body_bytes_sent发送给客户端的字节数,不包含响应头$bytes_set发送给客户端的字节总数$do...

#nginx
nginx—TCP和UDP代理

TCP代理worker_processes 8;error_log /usr/local/nginx/logs/error.log notice;access_log /usr/local/nginx/logs/access.log notice;events{worker_connections 10240;use epoll;}stream{...

nginx—访问限制模块limit_conn_zone 和limit_req_zone配置使用详解

limit_conn_zone限定IP最大连接数:http {limit_conn_zone $binary_remote_addr zone=why_conn:10m; #共享内存区大小10M}location ~ .*\.(php|php5)?${limit_conn why_conn 6; #设置给定键值的共享内存区域和允许的最大连接数limit_...

#nginx
    共 19 条
  • 1
  • 2
  • 请选择