上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: powershell提权 # 默认执行命令后会直接关闭 runas /user:administrator "powershell pwd" #直接已管理员权限打开新的管理员窗格 runas /user:administrator "powershell" #前一个命令的结果复制给变量 $res=p 阅读全文
posted @ 2022-02-21 00:43 mk-备忘 阅读(357) 评论(0) 推荐(0)
摘要: #软件安装目录 $dir="C:\Program Files\" #安装文件夹 $soft_mulu="ln" #软件绝对目录 $soft=$dir+$soft_mulu $softpack="bacon" $conf="C:\Program Files\ln\bacon\conf.ini" cd 阅读全文
posted @ 2022-02-20 13:14 mk-备忘 阅读(240) 评论(0) 推荐(0)
摘要: [root@localhost ~]# tree ansible ansible ├── ansible.cfg ├── ce.yml ├── cisco.yml └── inventory ansible.cfg文件 [root@localhost ansible]# cat ansible.cf 阅读全文
posted @ 2022-01-19 22:36 mk-备忘 阅读(657) 评论(0) 推荐(0)
摘要: ##问题:docker 容器打包后 更新应用代码不正确 ###一、 docker 容器打包过程解析(全程使用ansible) git 拉代码 拷贝git拉下来的代码,到中间文件夹(编译这个文件的代码) 编译中间文件夹的代码 容器打包,把代码封装到容器内,并提交 二、出现的问题 使用ansible打包 阅读全文
posted @ 2022-01-18 11:00 mk-备忘 阅读(308) 评论(0) 推荐(0)
摘要: 1. Python的默认优化 执行a.py chmod +x a.py ./a.py 在默认情况下,其实Python就为我们做了优化:只要源文件不改变,生成默认的pyc文件后以后会执行编译好的pyc文件中的内容,这样大大提高了程序执行的效率! 2. 手动生成 .pyc 文件 参考资料:(https: 阅读全文
posted @ 2022-01-16 22:46 mk-备忘 阅读(117) 评论(0) 推荐(0)
摘要: 对象版 文件结构 notify 里定义的是各种通知的方法 main 程序执行的入口 settings 配置文件 email.py class Email(object): def __init__(self): pass def send(self,content): print('email消息: 阅读全文
posted @ 2022-01-15 14:46 mk-备忘 阅读(42) 评论(0) 推荐(0)
摘要: class Myclass(object): # def __new__(self): # pass # 在实例化是会触发,它比 __init__早( __new__ 造出裸替的人,__init__ 穿衣服) def __init__(self): # print("__init__方法执行") s 阅读全文
posted @ 2022-01-14 00:08 mk-备忘 阅读(34) 评论(0) 推荐(0)
摘要: docker-compose 编排支持引入主机变量 docker-compose 编排 ports可写可不写,都不影响,容器的端口暴露,只是让人更好的理解而已 Dockerfile 新建容器的 EXPOSE 是否写,也不影响端口暴露,只是用docker inspect的时候有提示而已 使用docke 阅读全文
posted @ 2022-01-07 23:39 mk-备忘 阅读(386) 评论(0) 推荐(0)
摘要: 当前操作只使用于windows server2012 以上版本(power shell 4.0一样版本), get-host #查看版本 运行远程执行命令,包括执行 .ps1 脚本 Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force 2. 阅读全文
posted @ 2021-12-24 23:34 mk-备忘 阅读(102) 评论(0) 推荐(0)
摘要: 问题描述 linux主机自动分区后导致大部分硬盘容量被 /home 占用,导致 /dev/mapper/centos-home 目录下 磁盘容量太少,想要删除掉/dev/mapper/centos-home 1. 删除开机默认挂载 /dev/mapper/centos-home vim /etc/f 阅读全文
posted @ 2021-12-22 21:55 mk-备忘 阅读(3083) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页