当前位置:首页 > 2021年2月

linux 安全策略关闭

root3年前 (2021-02-23)linux616
#防火墙关闭systemctl stop firewalld.service#永久关闭防火墙systemctl disable firewalld.service#临时关闭selinuxsetenforce 0#永久关闭sed -i &qu...

python 的configparser 读取配置文件遇到%特殊符号

root3年前 (2021-02-23)python1157
test.ini 配置文件中有mysql的密码,且密码含有“%”这个特殊符号因为%在py是转义符的含义需要对该字符转义即修改  %  为 %%用%对%进行转义...

linux创建用户和用户组

root3年前 (2021-02-23)linux548
添加用户和组groupadd testuseradd -r -g test test删除用户和组userdel testgroupdel test给文件添加用户组和用户归属chown -R test:test test_file...

shell 替换文件配置

root3年前 (2021-02-23)linux570
sed -i "s/enforcing/disabled/g" /etc/selinux/config...

centos切勿执行yum -y update

root3年前 (2021-02-23)linux553
yum update 跟apt-get update 不一样centos的yum update相当于ubuntu的apt upgrade如果想用ubuntu的apt update,centos是yum makecache因为执行yum -y...

git 忽略文件不起作用 .gitignore

root3年前 (2021-02-04)linux565
git rm -r --cached . git add .   git commit -m "update .gitignore"  git status查看是否是"working di...

记一次docker问题定位(perf,iostat等性能分析) 记录分析方法

root3年前 (2021-02-04)docker564
记一次docker问题定位(perf,iostat等性能分析)    记录分析方法
原文链接 背景   最近参与的项目是基于 OpenStack 提供容器管理能力,丰富公司 IaaS 平台的能力。日常主要工作就是在开源的 novadocker 项目(开源社区已停止开发)基础上进行增强,与公司的...

python os 模块文件常用操作

root3年前 (2021-02-04)python552
123456import os #回去当前文件路径os.path.realpath(__file__)#获取文件是否存在os.path.exists(filepath)#获取文件大小os.path.getsize(fil...

python简单的加密解密

root3年前 (2021-02-04)python515
rsa 是非对称加密公钥加密,私钥解密pip install rsaimport rsa from binascii import b2a_hex, a2b_hex class&nb...

zabbix服务无法访问mysql或界面显示zabbix_server no data

root3年前 (2021-02-04)运维&自动化704
部署zabbix突然出现no data 的情况通过查看日志发现zabbix_server 无法访问数据库。导致数据无法获取到。进入zabbix的安装界面(/setup)重新配置数据库仍然发现没有办法连接到数据库通过日志查看到安全级别提示SE...