09 2021 档案

thrift安装 & grpc
摘要:要用thrift必须先安装boost,thrift依赖boost库 安装boost ./bootstrap.sh sudo ./b2 sudo ./b2 install 1、下载thrift源代码 git clone https://git-wip-us.apache.org/repos/asf/t 阅读全文

posted @ 2021-09-30 14:11 lodger47 阅读(110) 评论(0) 推荐(0)

sprintf
摘要:sprintf不能检查目标字符串的长度,可能造成众多安全问题. 推荐使用snprintf 函数原型 int snprintf(char*str, size_t size,constchar*format, ...); // size是限定最终生成的dest的字符数,最多拷贝size-1个字符; 一般 阅读全文

posted @ 2021-09-19 09:04 lodger47 阅读(99) 评论(0) 推荐(0)

Centos 6.x和Centos 7.x的不同
摘要:【原文链接】https://blog.51cto.com/u_12674559/2095807 阅读全文

posted @ 2021-09-17 09:23 lodger47 阅读(26) 评论(0) 推荐(0)

服务器磁盘阵列卡RAID0,1,5,10
摘要:【原文链接】https://blog.51cto.com/u_12674559/2091760 阅读全文

posted @ 2021-09-17 09:21 lodger47 阅读(35) 评论(0) 推荐(0)

Linux常见服务器存储类型和iSCSI共享存储
摘要:[原文链接]https://blog.51cto.com/u_12674559/2105908 阅读全文

posted @ 2021-09-17 09:16 lodger47 阅读(38) 评论(0) 推荐(0)

网络基础知识
摘要:【原文链接】https://blog.51cto.com/u_12674559/2104540 阅读全文

posted @ 2021-09-17 08:58 lodger47 阅读(25) 评论(0) 推荐(0)

什么时候使用指针?什么时候使用引用?什么时候应该按值传递?
摘要:何时使用引用参数的主要原因有两个: 程序员能够修改调用函数中的数据对象。 通过传递引用而不是整个数据对象,可以提高程序的运行速度。 什么时候使用指针?什么时候使用引用?什么时候应该按值传递? 下面是一些指导原则: 对于那些函数,它们只使用传递过来的值,而不对值进行修改。 如果数据对象很小,如内置数据 阅读全文

posted @ 2021-09-13 09:49 lodger47 阅读(535) 评论(0) 推荐(0)

iptables
摘要:iptables 系统服务 脚本位置: /etc/init.d/iptables 规则文件位置: /etc/sysconfig/iptables 使用脚本配置防火墙的规则 编写防火墙脚本 → 开机时自动执行该脚本 脚本执行指令写入 /etc/rc.d/rc.local. 记得给rc.local加执行 阅读全文

posted @ 2021-09-09 23:03 lodger47 阅读(48) 评论(0) 推荐(0)

Centos6-7的开机流程
摘要:Centos6 Centos7 自启动脚本的一种方法 方法一 1、赋予脚本可执行权限(/opt/scripts/test.sh是你的脚本路径) chmod +x /opt/scripts/test.sh 2、打开/etc/rc.d/rc/local文件,在末尾增加如下内容 /opt/scripts/ 阅读全文

posted @ 2021-09-09 20:05 lodger47 阅读(51) 评论(0) 推荐(0)

mysql远程连接
摘要:use mysql; // 修改一条 root 数据,并刷新MySQL的系统权限相关表 update user set Host = '%' where Host = 'localhost' and User = 'root'; flush privileges; // grant 命令重新创建一个 阅读全文

posted @ 2021-09-09 12:47 lodger47 阅读(52) 评论(0) 推荐(0)

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
摘要:设置有关于密码的东西时密码很简单产生错误 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 产生的原因: 自定义密码太简单,出现了不符合密码策略的问题 查看 mysql 初始的密码策略 阅读全文

posted @ 2021-09-09 11:47 lodger47 阅读(85) 评论(0) 推荐(0)

日志分析和安全
摘要:![](https://img2020.cnblogs.com/blog/1843414/202109/1843414-20210909105306438-1131746258.png) 阅读全文

posted @ 2021-09-09 10:56 lodger47 阅读(18) 评论(0) 推荐(0)

top操作
摘要:![](https://img2020.cnblogs.com/blog/1843414/202109/1843414-20210909101602085-149165872.png) 阅读全文

posted @ 2021-09-09 10:16 lodger47 阅读(26) 评论(0) 推荐(0)

docker网络
摘要:docker network create ...... [原文链接]https://www.cnblogs.com/zuxing/articles/8780661.html 桥接网络类似于默认bridge网络[虚拟网桥的工作方式和物理交换机类似,这样主机上的所有容器就通过交换机连在了一个二层网络中 阅读全文

posted @ 2021-09-08 16:39 lodger47 阅读(106) 评论(0) 推荐(0)

ssh密钥
摘要:ssh连接服务器慢的解决方法 ssh服务端 配置文件/etc/ssh/sshd_config 把以下2项修改为,并重启ssh服务 UseDNS no GSSAPIAuthentication no ssh身份认证阶段中解释过,ssh认证的过程其实是客户端(ssh命令端)读取自己的私钥并推导出指纹发送 阅读全文

posted @ 2021-09-08 08:17 lodger47 阅读(324) 评论(0) 推荐(0)

并发线程池
摘要:![](https://img2020.cnblogs.com/blog/1843414/202109/1843414-20210906232508558-783854039.png) 阅读全文

posted @ 2021-09-06 23:26 lodger47 阅读(27) 评论(0) 推荐(0)

linux实现类似windows显示器不休眠
摘要:方式一:命令行方式 # setterm -blank 0 # setterm -blank n (n为等待时间) 方式二:编辑配置文件 ## 编辑xorg.conf,添加如下选项把xscreen saver直接关闭: Section “ServerFlags” Option “BlankTime” 阅读全文

posted @ 2021-09-05 09:40 lodger47 阅读(380) 评论(0) 推荐(0)

消息封装
摘要:![](https://img2020.cnblogs.com/blog/1843414/202109/1843414-20210904081233038-128478900.png) 阅读全文

posted @ 2021-09-04 08:18 lodger47 阅读(18) 评论(0) 推荐(0)

liunx 个性化ssh登陆界面
摘要:Ubuntu /etc/update-motd.d/文件夹下的几个脚本 00-header 10-help-text 90-updates-available 91-release-upgrade 98-fsck-at-reboot 98-reboot-required Centos /etc/is 阅读全文

posted @ 2021-09-03 08:47 lodger47 阅读(121) 评论(0) 推荐(0)

Linux下利用ioctl函数获取网卡信息
摘要:头文件 #include <sys/ioctl.h> 函数原型 int ioctl(int fd, unsigned long request, ...); 函数成功返回0,失败返回-1 在这里我们需要用到的结构体 #include<netinet/in.h> struct sockaddr_in 阅读全文

posted @ 2021-09-02 22:51 lodger47 阅读(754) 评论(0) 推荐(0)

计算机网络单位换算
摘要:MB/s和Mb/s是有区别的。其中大B代表Byte(字节),小b代表bit(比特 或位)。 1Byte=8bit 速率单位换算 进率是10^3 速率指的是数据的传送速率,也称数据率或比特率,它的单位是bit/s,bit/s可以写成b/s、bps. 当它的数据率较高时,我们通常在它前面加上k(千)、M 阅读全文

posted @ 2021-09-02 10:38 lodger47 阅读(2976) 评论(0) 推荐(0)

uint8_t / uint16_t / uint32_t /uint64_t解释
摘要:在C语言中有6种基本数据类型:short、int、long、float、double、char 整型:short、int、long 浮点型:float、double 字符类型:char typedef用来定义关键字或标识符的别名 uint8_t\uint_16_t\uint32_t\uint64_t 阅读全文

posted @ 2021-09-02 09:43 lodger47 阅读(799) 评论(0) 推荐(0)

pthread_once
摘要:函数原型 int pthread_once(pthread_once_t *once_control, void (*init_routine) (void)); 函数作用 本函数使用初值为PTHREAD_ONCE_INIT的once_control变量保证init_routine()函数在本进程执 阅读全文

posted @ 2021-09-02 09:14 lodger47 阅读(74) 评论(0) 推荐(0)

assert 断言
摘要:头文件 #include <cassert> 函数原型 void assert( int expression ); assert宏的原型定义在<assert.h> 如果其值为假(即为0),那么它先向stderr打印一条出错信息,然后通过调用 abort 来终止程序运行 使用assert的缺点是,频 阅读全文

posted @ 2021-09-02 08:21 lodger47 阅读(40) 评论(0) 推荐(0)

服务器开发尝尝忽略的信号
摘要:SIGCHLD,默认不处理,会产生僵尸进程,直到父进程退出,才被init 接受处理.服务器程序肯定不能随便退出,那么就会造成僵尸进程累积,僵尸进程会占用进程id,进程结束状态,进程运行时间等信信,会给系统造成负担,另外进程号是有限的,如果进程号耗尽那么,系统在也没办法产生新进程. SIGPIPE , 阅读全文

posted @ 2021-09-01 16:19 lodger47 阅读(30) 评论(0) 推荐(0)

Ubuntu18.04 新系统基础开发软件
摘要:图形模式切换到命令模式 关掉sudo密码 apt-get 源切换 基础软件安装 关闭自动更新 忘记密码 图形模式切换到命令模式 命令模式 :Ctrl+Alt+F5 | init 3 图形模式:Ctrl+Alt+F1 | inti 5 关掉sudo密码 %sudo ALL=(ALL:ALL) NOPA 阅读全文

posted @ 2021-09-01 11:03 lodger47 阅读(81) 评论(0) 推荐(0)

导航