自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(85)
  • 收藏
  • 关注

原创 编译ebpf

编译clang和llvm

2022-08-10 17:32:00 570 1

原创 centos升级最新内核

最新内核地址:https://cdn.kernel.org。

2022-08-10 11:38:15 205

原创 openssl生成p7b

#!/bin/sh#================================生成CA===============================#生成ca和私钥openssl genrsa -aes256 -passout pass:****** -out ca.key 2048#openssl rsa -in ca.key -pubout -out ca_pub.key#生成...

2019-11-28 19:56:46 1111

原创 openresty性能调优

python gensvg.py -f lua -d 60 -o lua -p 18060python gensvg.py -f oncpu -d 60 -o lua -p 18060

2019-11-28 19:53:15 1271

原创 nginx配置

在http的功能里添加log_format模块,内容如下:log_format main escape=json '{ "@timestamp": "$time_iso8601", ''"remote_addr": "$remote_addr",''"request_time": "$request_time",''"upstream_response_time": "$upstrea...

2019-11-27 19:21:05 502

原创 tshark分析流(wireshark导出大包时有BUG)

在wireshark中follow tcp stream之后,选择export speified packets导出该stream的全部包到文件。导出文件配置出下图:然后用下面的命令导出stream的字节流:tshark -r t1.pcap -Y usb -z follow,tcp,raw,0 > t1.bintshark位于wireshark的安装目录中。然后就...

2019-08-20 16:21:40 1227

原创 gdb调试

readelf -p .debug_str bin |grep xxx查看代码编译路径

2019-04-26 16:30:38 133

原创 centos安装postgresql 9.6

yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7.2-x86_64/pgdg-centos96-9.6-3.noarch.rpmyum install -y  postgresql96-server postgresql96-contrib 3、初始化数据库 1 ...

2019-02-22 10:58:02 1265

原创 安装kong的docker镜像

0、docker操作:#启动dockersystemctl start docker#进入容器docker exec -it container_name /bin/sh#启动容器docker start container_iddocker start -a container_name1、初始化docker环境:yum install -y epel-release...

2019-02-21 18:01:41 2187

原创 sublime text3安装plantuml插件

打开sublimeText3,1. 按Ctrl+Shift+P打开控制面板2. 输入add Repository,选中package Control:add Repository3. 在输入栏将下面一行拷贝进去:https://github.com/jvantuyl/sublime_diagram_plugin.git4. 按Ctrl+Shift+P打开控制面板,输入ins...

2018-12-20 21:10:10 1032

原创 升级centos内核

# 载入公钥rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org# 安装ELReporpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm# 载入elrepo-kernel元数据yum --disablerepo=\* --enabl...

2018-11-04 00:40:11 203

原创 ngx_lua模块

ngx_lua模块的原理:1、每个worker(工作进程)创建一个Lua VM,worker内所有协程共享VM;2、将Nginx I/O原语封装后注入 Lua VM,允许Lua代码直接访问;3、每个外部请求都由一个Lua协程处理,协程之间数据隔离;4、Lua代码调用I/O操作等异步接口时,会挂起当前协程(并保护上下文数据),而不阻塞worker;5、I/O等异步操作完成时还原相关协程上...

2018-11-01 15:31:17 3535

原创 tcpdump抓包

tcpdump [opt] [not] proto dir typeopt: -nn\-vvv\-XX\-i\-c\-eproto: tcp/udp/arp/ip/ether/icmpdir: src、dst、src and dst、src or dsttype: host/port/net/portrangeexp:tcpdump -i any -nn dst port ...

2018-10-12 18:10:21 193

原创 pref

1、top -H -p 进程号,查看线程占用CPU的情况。2、pstack thread_num 查看线程栈的调用情况。3、strace -o output.txt -T -tt -e trace=all -p thread_num 跟踪系统调用。

2018-10-10 11:00:14 702

原创 haproxy+keepalived配置

#==============================================haproxy.cfg============================================#此配置为haproxy透传前端IP地址到后端的配置#===================================================================...

2018-10-08 11:49:06 350

原创 servicemesh

没准备好监控,就不要搞微服务。非侵入式自治、调用、限流、熔断和监控等。服务注册与发现身份验证与授权服务的伸缩控制反向代理与负载均衡路由控制流量切换 日志管理性能度量、监控与调优分布式跟踪过载保护服务降级服务部署与版本升级策略支持错误处理故障注入断路器servicegraph插件是用来查看服务调用关系的Grafana 等可视化工具Prometheus\zik...

2018-10-08 11:12:09 486

原创 性能调优

linux内核优化:/etc/security/limits.conf* hard nofile 391316* soft nofile 391316* nproc soft nproc 391316* hard nproc 391316vi /etc/sysctl.confnet.ipv4.tcp_syncookies = 1net.ipv4.tcp_fin_timeou...

2018-10-08 11:09:56 261

原创 openstack安装

#!/bin/bash######vi  /etc/security/limits.conf*         hard    nofile      600000*         soft     nofile      600000root    hard    nofile      600000root    soft     nofile      600000####...

2018-10-08 10:21:54 166

原创 gperftools的使用

yum install libtool 下载gperftools:http://code.google.com/p/gperftools/downloads/list./autogen.sh./configure && make -j8 && make install下载libunwind:http://download.savannah.gnu...

2018-10-08 10:19:06 437

原创 selenium调用ie或chrome遇到的问题排查

1、把IE的所有区域的保护模式都设置为Disable,操作方法:控制面板-Internet选项-安全选项 下的“Internet”、“本地Internet”、“可信站点”、“受限站点”下的“启用保护模式”全部“不选”。2、把IE网络代理去掉。3、IE页面的显示比例要为100%。...

2018-10-08 10:17:32 858

原创 mongodb配置

dbpath=/data/db/mongo#数据库日志存放目录logpath=/var/log/mongodb.log#以追加的方式记录日志logappend=true#端口号 默认为27017port=27017#以后台方式运行进程fork=true#开启用户认证auth=false#绑定地址bind_ip=0.0.0.0#启用日志文件,默认启用journal=tr...

2018-10-08 09:39:34 262

原创 openresy火焰图

1、环境:yum -y install elfutils-devel gettext glibc-develwget https://sourceware.org/systemtap/ftp/releases/systemtap-3.3.tar.gztar zxvf systemtap-3.3.tar.gzcd systemtap-3.3./configure; make; m...

2018-10-07 11:37:55 189

原创 centos7 安装中文宋体及五笔输入法

yum -y install fontconfig mkfontscalemkdir -pv /usr/share/fonts/chinese/TrueTypecd /usr/share/fonts/chinese/TrueTyperz -bey C:\Windows\Fonts\simsun.ttcmkfontscalemkfontdirfc-cache -fv查看fc-list...

2018-07-20 11:14:14 837

原创 centos7 安装 codeblock(rpm)

1、yum -y install epel-release   2、yum clean all && yum makecache3、yum -y install gtk2-devel cscope binutils-devel wxGTK xterm squirrel-libs tinyxml cppcheck gamin4、下载codeblock-17.12-1.el...

2018-07-18 18:04:29 1969

原创 centos7 安装vnc-server1

yum -y install tigervnc-servervi /etc/systemd/system/vncserver@:1.service 写入以下内容:==================================================================[Unit]Description=Remote desktop service (VNC)...

2018-07-17 18:44:42 541

原创 安装mongodb

1、下载mongdb并解压到/usr/local2、 echo "export PATH=/usr/local/mongodb/bin:$PATH" >> /etc/profilesource /etc/profile 3、vi /etc/mongo.confdbpath=/data/db/mongo#数据库日志存放目录logpath=/var/log/mongodb.log #以追加...

2018-06-25 14:59:37 209

原创 编译安装codeblock17

1、yum install gtk2*2、下载wxWidgets-3.1.0.tar.bz23、编译./configure  --enable-xrc --enable-monolithic --enable-unicode4、yum -y install libtool5、cp ../wxWidgets-3.1.0/wxwin.m4 /usr/share/aclocal6、./configure...

2018-06-25 11:26:56 319

原创 centos使用epel源

yum install yum-prioritiesyum install epel-releaserpm -Uvh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.r...

2018-06-22 18:24:31 233

原创 安装mysql8.0

1.下载mysql8.0并安装2.初始化mysql环境groupadd mysqluseradd -g mysql mysqlmkdir -p /data/db/mysql /var/lib/mysql /var/run/mysqldchown -R mysql.mysql /usr/local/mysql /var/log /data/db/mysql /var/lib/mysql /var/r...

2018-06-11 15:36:18 339

原创 编译openssl

./config -Wl,-rpath,sharedmake -j4 && make install

2018-06-08 15:28:30 286

原创 sublime text3设置

preferences->setting{"color_scheme": "Packages/Color Scheme - Default/iPlastic.tmTheme","default_encoding": "UTF-8","expand_tabs_on_save": true,"font_face": "Courier New Bold","font_size": 19...

2018-05-20 20:01:04 339

原创 openresty支持ssl

使用ssl模块配置同时支持http和https并存一,生成证书# 1、首先,进入你想创建证书和私钥的目录,例如:cd /etc/nginx/# 2、创建服务器私钥,命令会让你输入一个口令:openssl genrsa -des3 -out server.key 1024# 3、创建签名请求的证书(CSR):openssl req -new -key server.key -out s...

2018-05-16 17:44:05 1813

原创 openresty安装第三方库

1、编译安装openresty2、下载luarockswget https://luarocks.org/releases/luarocks-2.4.4.tar.gz./configure --with-lua="/usr/local/openresty/luajit" --prefix="/usr/local/openresty/luarocks" --lua-suffix="jit" --wi...

2018-05-16 14:50:55 1686

原创 ngx状态码

ngx.status = ngx.HTTP_CONTINUE (100) (first added in the v0.9.20 release)ngx.status = ngx.HTTP_SWITCHING_PROTOCOLS (101) (first added in the v0.9.20 release)ngx.status = ngx.HTTP_OK (200)ngx.status...

2018-05-15 16:28:27 4648

原创 分库式知识库

1、使用supervisord做进程管理

2018-05-14 11:40:00 138

原创 linux下diff命令与patch命令使用

1、制作补丁diff的使用diff可以完成比较功能,生成补丁文件格式:diff [option] oldfile newfile常用的option选项有:-r 对目录进行递归处理-u 输出统一格式,diff有"传统"和"统一"两种格式,现在一般使用"统一"格式,比较而言,统一格式生成的文件大,但包含了更多的信息,有利于阅读与定位-N 补丁中包含整个新文件-a 补丁中包含二进制文件缺省时,diff向...

2018-04-12 16:38:30 254

原创 诊断命令

LINUX平台:#定位core信息所对象的代码行数addr2line -f -e proc 0x40b2d4#查看文件失大小du -sh ./folder#查看占用的 socketls /proc/`pidof proc`/fd -l|grep socket:|wc -l #查看连接状态以及进程的调用命令lsof -Pn -p `pidof proc`#查看进程的系统调用s...

2018-03-27 19:27:21 608

原创 UltraISO截断超长文件名的问题

解决办法勾选:必要时添加Joliet文件卷除去:使用回收站勾选:必要时调整ISO的介质类型

2018-02-22 14:56:15 992

原创 selenium调用ie或chrome遇到的问题排查

1、把IE的所有区域的保护模式都设置为Disable,操作方法:控制面板-Internet选项-安全选项 下的“Internet”、“本地Internet”、“可信站点”、“受限站点”下的“启用保护模式”全部“不选”。2、把IE网络代理去掉。3、IE页面的显示比例要为100%。如下图所示: 或调用API,将浏览器最大化。4、针对IE10和更高的版本,必须在IE选项设置中的高级页中,取消“启用增强保

2018-01-17 21:10:57 793

原创 编译guacd

autoreconf -fi./configure --with-init-dir=/etc/init.d CFLAGS=-Wno-deprecatedmake -j4make install

2017-12-28 16:06:12 761

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除