- 博客(93)
- 资源 (1)
- 收藏
- 关注
原创 Kafka验证接口SASL_PLAINTEXT
zk_server_jaas.confServer { org.apache.kafka.common.security.plain.PlainLoginModule required username="cluster" password="clusterpasswd" user_kafka="kafka";};kafka_server_jaas.confKafkaServer { org.apache.kafka.common.security.
2022-03-14 17:25:22
3424
1
原创 CentOS 7 设置日期和时间
一、基本概念1.1 GMT、UTC、CST、DST 时间(1) UTC整个地球分为二十四时区,每个时区都有自己的本地时间。在国际无线电通信场合,为了统一起见,使用一个统一的时间,称为通用协调时(UTC, Universal Time Coordinated)。(2) GMT格林威治标准时间 (Greenwich Mean Time)指位于英国伦敦郊区的×××格林尼治天文台的标准时间,因为本初子午线被定义在通过那里的经线。(UTC与GMT时间基本相同,本文中不做区分)(3) CST
2022-01-14 14:59:58
666
原创 DPDK编程指南
https://dpdk-docs.readthedocs.io/en/latest/prog_guide/env_abstraction_layer.html#linuxeal
2021-10-26 17:14:34
297
转载 VMWare磁盘扩容
1、VM上修改磁盘信息 将虚拟机关机,然后点击VM顶部菜单栏中的显示或隐藏控制台视图按钮来显示已建立的虚拟机的配置信息 然后左边菜单栏点击硬盘,在弹出的对话框选中硬盘,并点击扩展按钮,然后在弹出框中的最大磁盘大小修改未所需要的磁盘大小,比如我现在需要扩容30G,原本的磁盘大小是20G,所以我这里将原本的20G修改成50G,然后点击扩展 之后会收到提示: 然后开启虚拟机,对磁盘进行进一步的配置 2、在系统中挂载磁盘 开启虚拟机并登录后,使用命令...
2021-08-27 11:24:13
1597
1
原创 升级CMake3
wget https://cmake.org/files/v3.6/cmake-3.20.5.tar.gztar xvf cmake-3.20.5.tar.gz && cd cmake-3.20.5/./bootstrapgmakegmake install
2021-08-13 11:28:13
277
原创 VSCode配置公钥登录Centos7
Centos7配置:vi /etc/ssh/sshd_configwindows生成密钥对后,配置公钥至Centos7vi ~/.ssh/authorized_keys #添加公钥systemctl restart sshd
2021-08-09 15:20:29
246
原创 Centos7安装F-Stack踩坑
首先升级Centos7内核版本并安装对应开发包,参考https://blog.youkuaiyun.com/weixin_42024824/article/details/116700672必须升级GCC版本yum install -y centos-release-sclyum install -y devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutilsscl enable devtoolset-9 bashgcc -v安装f-.
2021-08-05 14:30:39
819
原创 Centos7安装Python3-openssl
pip3 install -U pip setuptoolspip3 install pyOpenSSL
2021-07-27 16:11:55
469
原创 Systemd管理的/etc/systemd/system.conf修改后生效方法
No, daemon-reload will reload all unit files, not the configuration for systemd itself. However,# systemctl daemon-reexecwill re-execute systemd and cause it to digest its new configuration in the process.From the systemctl man page:daemon-reexec ..
2021-07-09 15:07:05
1961
原创 rpm升级git版本
yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpmyum install git
2021-06-30 09:13:56
277
原创 ODB框架注意事项
transaction que(db->begin());result r (db->query<server>(query::ip.is_not_null()));que.commit();//r.size()=18*********
2021-06-17 14:31:20
304
原创 C++框架ODB安装注意事项
yum install libcutl libcutl-devel -yyum -y install gcc-plugin-devel
2021-06-02 22:59:37
456
原创 libev,libhv
git clone https://gitee.com/mirrors/libev.gitgit clone https://gitee.com/libhv/libhv.git
2021-05-26 11:10:39
331
原创 安装muduo
yum -y install cmake boost-develgit clone https://gitee.com/lianyi_work/muduo.gitcd muduo./build.sh
2021-05-25 17:23:08
306
翻译 basic01-xdp-pass
Tutorial: Basic01 - loading your first BPF programWelcome to the first step in this XDP tutorial.The programming language for XDP is eBPF (Extended Berkeley Packet Filter) which we will just refer to as BPF. Thus, this tutorial will also be relevant
2021-05-13 11:31:01
538
原创 BCC工具开发资源
https://github.com/iovisor/bcc/blob/master/docs/tutorial_bcc_python_developer.mdhttps://blog.youkuaiyun.com/tiantao2012/category_7393397.htmlhttps://github.com/iovisor/bcc/blob/master/docs/reference_guide.md
2021-05-12 15:04:08
345
原创 rpm方式升级Centos内核版本
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org#导入该源的秘钥rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm#启用该源仓库yum --disablerepo="*" --enablerepo="elrepo-kernel" list available#查看有哪些内核版本可供安装for i in `rpm -qa | gre.
2021-05-12 14:04:43
764
1
原创 Centos7安装bcc环境
sudo yum install -y epel-releasesudo yum update -ysudo yum groupinstall -y "Development tools"sudo yum install -y elfutils-libelf-devel cmake3 git bison flex ncurses-develsudo yum install -y luajit luajit-devel # for Lua supportyum install -y centos.
2021-05-11 14:21:15
1005
原创 使用Boost将stl map放入共享内存
最近需要用到进程间共享内存,同时将容器放入共享内存中方便操作,摸索如下#include <boost/interprocess/managed_shared_memory.hpp>#include <boost/interprocess/allocators/allocator.hpp>#include <boost/interprocess/containers/map.hpp>#include <boost/interprocess/contain.
2021-03-11 15:48:47
1102
转载 C++框架与库资源
Jason frozen : C/C++的Jason解析生成器Jansson :进行编解码和处理Jason数据的C语言库jbson :C++14中构建和迭代BSON data,和Json 文档的库JeayeSON:非常健全的C++ JSON库,只包含头文件JSON++ : C++ JSON 解析器json-parser:用可移植的ANSI C编写的JSON...
2021-02-25 17:19:50
359
转载 CentOS 7下升级gcc版本
https://blog.youkuaiyun.com/ncdx111/article/details/106047228
2021-02-24 17:16:52
261
1
转载 centos 7 忘记root用户登录的密码,重置密码的方法
https://blog.youkuaiyun.com/liujingqiu/article/details/89171555
2021-02-20 17:05:29
259
原创 F-Stack编译配置使用
F-Stack Quick Start GuideF-Stack is an open source high performance network framework based on DPDK.System RequirementsSee Intel DPDKlinux_gsgclone F-Stackmkdir /data/f-stackgit clone https://github.com/F-Stack/f-stack.git /data/f-stackComp.
2021-02-04 15:34:23
1927
1
原创 CMake测试demo
CMakeLists.txtcmake_minimum_required(VERSION 3.10.3)# set the project nameproject(main)#get all srcaux_source_directory(. SOURCE)#add subdir#add_subdirectory(func)#add link_dirlink_directories(./lib)# add the executableadd_executable(mai.
2021-02-04 15:30:05
384
原创 f-stack发包测试
#include <stdio.h>#include <sys/ioctl.h>#include <stdlib.h>#include <stdint.h>#include <string.h>#include <strings.h>#include <sys/types.h>#include <sys/socket.h>#include <arpa/inet.h>#include.
2021-02-03 17:07:57
802
原创 Python logging配置方法
方式一,代码中加载配置if __name__ == '__main__': logger = logging.getLogger(__name__) print(__name__) logger.setLevel(level=logging.INFO) # 定义一个RotatingFileHandler,最多备份3个日志文件,每个日志文件最大1K rHandler = RotatingFileHandler("log.log", maxBytes=1 * 64.
2021-01-26 10:40:57
805
1
原创 Python Cryptodome接口测试
记录Cryptodome测试代码from Cryptodome.PublicKey import RSAfrom Cryptodome.Cipher import PKCS1_OAEPfrom Cryptodome.Signature import PKCS1_v1_5from Cryptodome.Hash import SHA256prikey = """-----BEGIN RSA PRIVATE KEY-----MIIEowIBAAKCAQEA+lrMu/VAO8b+LSBt7s
2021-01-15 15:43:06
1134
原创 DNS协议包使用TCP传输
考虑到UDP传输512字节大小的限制与安全性,测试使用TCP传输DNS协议包,Wireshark抓包分析与dig均不正常,猜测是封包问题,转而开始Google查看RFC文档所以,TCP与UDP两种传输方式唯一的区别是,TCP应用层DNS数据包需要前缀两字节数据长度也感谢大佬的总结如下:参考:https://stackoverflow.com/questions/41512591/dns-query-over-tcp/41514146#41514146...
2021-01-08 11:42:20
1315
原创 c++ fromhex tohex简单实现
inline int fromHex(uint c){ return ((c >= '0') && (c <= '9')) ? int(c - '0') : ((c >= 'A') && (c <= 'F')) ? int(c - 'A' + 10) : ((c >= 'a') && (c <= 'f')) ? int(c - 'a' + 10) : /* otherwise */ .
2020-12-29 17:14:08
1313
原创 String FromHex()实现
inline int fromHex(uint c){ return ((c >= '0') && (c <= '9')) ? int(c - '0') : ((c >= 'A') && (c <= 'F')) ? int(c - 'A' + 10) : ((c >= 'a') && (c <= 'f')) ? int(c - 'a' + 10) : /* othe.
2020-12-25 16:15:16
1210
原创 Python OpenSSL基本操作接口
记录一下OpenSSL密码的一些操作# !/usr/bin/python3# -*- coding: utf-8 -*-import OpenSSLfrom OpenSSL.crypto import sign,verify,PKeyimport timefrom dateutil import parserkey = PKey()key.generate_key(OpenSSL.crypto.TYPE_RSA, 2048)crt=OpenSSL.crypto.dump_publick
2020-12-23 15:34:17
2240
原创 Python设计模式之strategy-mode
from abc import ABCMeta,abstractmethodclass Duck(metaclass=ABCMeta): @abstractmethod def FlyBehavior(self): pass# class QuackBehavior(metaclass=ABCMeta):# @abstractmethod# def BehaveQuack(self):# passclass FlyBehavior.
2020-12-03 08:42:28
294
原创 Python设计模式之decorator-mode
from abc import ABCMeta,abstractmethod#食物抽象类class Food(metaclass=ABCMeta): @abstractmethod def get_description(self): pass """描述""" @abstractmethod def get_price(self): pass """价格"""#实例化食物抽象类,黄焖鸡class.
2020-12-02 16:04:46
274
1
原创 记录Python三大问题
一、如何运用设计模式,规划代码结构,使代码易于修改与维护二、提高代码执行速度(Cython、并发)三、使用各种程序库、包模块,快速开发;
2020-12-01 16:49:38
216
转载 Python时间模块
https://blog.youkuaiyun.com/wuwei_201/article/details/105164151 目录 一、datetime模块1、date 类2、time 类3、datetime 类4、strftime 方法5、strptime 方法6、replace 方法7、timedelta 类8、tzinfo 和 timezone 二、dateutil 模块1、relativedelta 类2、paser 类 三、pytz 模块1、查看时区,给时间添加时区属性2、localize
2020-11-30 17:11:00
1217
原创 Git+Pandoc配置Word文档版本控制
首先下载并安装pandoc,以Windows为例https://cowtransfer.com/s/95c61f7c4e4548修改本地Git安装目录下etc/gitconfig文件,增加如下配置:[diff "pandoc"] textconv=pandoc --to=markdown prompt = false[alias] wdiff = diff --word-diff=color --unified=1修改安装目录下etc/gitattributes*.do
2020-11-27 22:16:40
2393
转载 Centos7 系统服务配置参数记录
有时我们将自定义程序注册为systemd service 进程管理交由系统管理,可以方便启动停止,亦可以实现服务异常退出重启,开机自启动。 减少自定义程序服务管理的时间消耗。本次配置的是让postgresql数据库开机自启动首先需要准备配置服务的配置文件(以 .service 结尾的文件),centos7中自定义的配置服务配置文件路径为 /etc/systemd/system/***.serviceservice文件中包含三个.
2020-11-24 15:52:52
1824
转载 Centos7配置阿里源
https://blog.youkuaiyun.com/pengpengpeng85/article/details/94461152
2020-11-23 20:20:47
1703
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人