摘要: 升级openssl: wget https://www.openssl.org/source/openssl-1.1.1a.tar.gz tar xvzf openssl-1.1.1a.tar.gz --directory /usr/local/src ./config --prefix=/usr/ 阅读全文
posted @ 2020-06-12 16:32 ascertain 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 编译c的时候出现这个错误,应该是不小心切换到中文全角输入,导致错误 cat --show-all main.c进行查看 图中蓝色是一些奇怪的全角符号 阅读全文
posted @ 2020-06-11 17:32 ascertain 阅读(439) 评论(0) 推荐(0) 编辑
摘要: isolinux.bin:光盘引导程序 isolinux.cfg:isolinux.cfg是isolinux.bin的配置文件 vmlinuz:linux系统的内核映像,isolinux.cfg中配置读取 initrd.img:ramfs内存系统镜像,isolinux.bin根据选项找到对应配置,装 阅读全文
posted @ 2020-06-11 16:13 ascertain 阅读(216) 评论(0) 推荐(0) 编辑
摘要: X-server处理输入输出,鼠标,键盘,显卡,显示器 X-client处理程序逻辑 WM:窗口管理器,移动,变型,装饰 DE:桌面环境 WM+panel+资源管理器+配套软件 X-server(鼠标,键盘) ==>X-client程序逻辑==>X-server(输出) X-server接收用户指令 阅读全文
posted @ 2020-06-11 15:19 ascertain 阅读(405) 评论(0) 推荐(0) 编辑
摘要: useradd 时使用 --no-create-home时指定不创建用户的家目录 虽没有创建,但其家目录仍为/home/bnm只是没有创建 接下来手动创建其家目录 非常恶心的selinux需要关闭,不识别手动创建的家目录,进行公钥认证时有问题 阅读全文
posted @ 2020-06-11 11:51 ascertain 阅读(1766) 评论(0) 推荐(0) 编辑
摘要: 查找uid或gid为0的用户awk -F: '{if($3==0 || $4==0) {print $1}' /etc/passwd /etc/passwd中所有内容以空格分隔,而不以\n分隔awk -v ORS='' '{print $0}' /etc/passwd | awk -v RS=' ' 阅读全文
posted @ 2020-06-11 10:32 ascertain 阅读(229) 评论(0) 推荐(0) 编辑
摘要: SSL证书,用于加密HTTP协议,也就是HTTPS。随着淘宝、百度等网站纷纷实现全站Https加密访问,搜索引擎对于Https更加友好,加上互联网上越来越多的人重视隐私安全,站长们给网站添加SSL证书似乎成为了一种趋势。 给自己的网站添加SSL证书其实并不复杂,但是关键一点就是首先要拥有一个SSL证 阅读全文
posted @ 2020-06-11 09:25 ascertain 阅读(668) 评论(0) 推荐(0) 编辑
摘要: 在httpd.conf中加入下面两项directive ServerSignature Off ServerTokens Prod 下面是ServerTokens的可能取值 ServerTokens Prod echo "Server:Apache" ServerTokens Major echo 阅读全文
posted @ 2020-06-11 09:20 ascertain 阅读(383) 评论(0) 推荐(0) 编辑
摘要: 执行脚本时,如果在脚本当前目录,很容易获取脚本所在绝对路径,但是如果在其他目录可能以绝对路径或相对路径的方式执行脚本,此时pwd获取到的是当前路径,而不是脚本所在的绝对路径,获取脚本所在的绝对路径要通过以下方式: path=$(cd `dirname $0`;pwd) $0 为执行时 引用脚本的路径 阅读全文
posted @ 2020-06-10 18:56 ascertain 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 编译安装: ./configure --prefix=/usr/local/ovs make -j 4 make install modprobe openvswitch echo 'export PATH=$PATH:/usr/local/ovs/share/openvswitch/scripts 阅读全文
posted @ 2020-06-10 17:25 ascertain 阅读(359) 评论(0) 推荐(0) 编辑
摘要: ./configure 是源码包自带的脚本 安装前需要检测系统环境是否符合安装要求 定义选项,./configure --help查看 把系统环境的检测结果和定义好的功能选项写入Makefile文件,后续make和make install依据此文件进行 make make调用gcc编译器,读取Mak 阅读全文
posted @ 2020-06-09 19:26 ascertain 阅读(248) 评论(0) 推荐(0) 编辑
摘要: /etc/profile /etc/profile.d/* /etc/bashrc ~/.bash_profile ~/.bashrc 这些文件定义shell的运行环境,其运行有先后,不同情况执行不同的文件 先说shell的分类: 登陆或非登陆 我们可以直接使用shell(直接运行bash,或者其他 阅读全文
posted @ 2020-06-09 15:20 ascertain 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 无论在当前shell还是子shell,脚本执行路径都为当前路径,创建文件时,如果使用相对路径,则都在当前路径下创建 阅读全文
posted @ 2020-06-09 13:41 ascertain 阅读(929) 评论(0) 推荐(0) 编辑
摘要: ICC 是intel 针对intel 体系架构开发的编百译器,显然,你的代码,如果运行在intel机器上,intel的人开发的编译器,编译出来的可执行代码效率更高。毕竟度人家对intel体系结构这么熟悉,里面的优化说明的,肯定做得不错。问但是只能运行在intel体系结构上。比如你的PPC的板子就不能 阅读全文
posted @ 2020-06-08 22:33 ascertain 阅读(567) 评论(0) 推荐(0) 编辑
摘要: module random random.random() [0,1) 内的float pseudo randomizer random.sample() sample(population,k) method of random.Random instance,choose k unique ra 阅读全文
posted @ 2020-06-08 22:30 ascertain 阅读(452) 评论(0) 推荐(0) 编辑
摘要: intermittent import timedef bid(f): def bow(*args,**kwargs): with open('p.txt',encoding='utf-8',mode='a') as dam: dam.write('\n'+time.strftime('%Y-%m- 阅读全文
posted @ 2020-06-08 22:28 ascertain 阅读(358) 评论(0) 推荐(0) 编辑
摘要: chrony prerequisite: firewalld firewall-cmd --state firewall-cmd --list-all firewall-cmd --zone=public --query-port=123/tcp firewall-cmd --zone=public 阅读全文
posted @ 2020-06-08 22:26 ascertain 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 杨辉三角 解法: triangle=[]p=int(input('>>>'))for i in range(0,p): if i == 0: triangle.append([1]) else: current=[1] for j in range(0,i-1): current.append(tr 阅读全文
posted @ 2020-06-08 22:14 ascertain 阅读(568) 评论(0) 推荐(0) 编辑
摘要: /proc目录 内核把状态信息,统计信息,可配置参数通过proc伪文件系统输出 参数: 只读:输出信息 可写:配置内核 可写参数位于/proc/sys目录 1:sysctl查看设定/proc/sys目录中的参数 sysctl -w path.to.parameter=VALUE sysctl -w 阅读全文
posted @ 2020-06-08 22:05 ascertain 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 命令的执行状态结果 $? 0成功 1-255失败程序执行有两类结果: 程序返回值:执行结果 程序状态结果:0,1-255文本文件查看命令: cat tac more less tail head more: more [option] file... -d:显示提示 +#:定位 less: less 阅读全文
posted @ 2020-06-08 22:04 ascertain 阅读(352) 评论(0) 推荐(0) 编辑