Daily Archives: 2020年1月13日

为kubectl增加插件

先下载配置文件和相应的tar包,并对tar包解压,释放出可执行文件: wget https://storage.googleapis.com/krew/v0.2.1/krew.tar.gz wget https://storage.googleapis.com/krew/v0.2.1/krew.yaml tar -zxvf krew.tar.gz # wget https://storage.googleapis.com/krew/v0.2.1/krew.tar.gz –2020-01-13 08:34:35– https://storage.googleapis.com/krew/v0.2.1/krew.tar.gz Resolving storage.googleapis.com (storage.googleapis.com)… 172.217.164.112, 2607:f8b0:4005:807::2010 Connecting to storage.googleapis.com (storage.googleapis.com)|172.217.164.112|:443… connected. HTTP request sent, awaiting response… 200 OK Length: 14375157 (14M) [application/x-tar] Saving to: ‘krew.tar.gz’ 100%[=====================================================>] 14,375,157 … Continue reading

Posted in Kubernetes, Platform | Tagged , , , , | Leave a comment

pssh使用带有密码的私钥登陆在使用-A参数之后报错

pssh使用带有密码的私钥登陆在使用-A参数之后报“tderr: Enter passphrase for key ‘****” 解决方法: 修改 vim /lib/python2.7/site-packages/psshlib/askpass_client.py OS X为:  vim /usr/local/Cellar/pssh/2.3.1/lib/python2.7/site-packages/psshlib/askpass_client.py 将第67行的: if not prompt.strip().lower().endswith(‘password:’): 改为 if not ( prompt.strip().lower().endswith(‘password:’) or ‘enter passphrase for key’ in prompt.strip().lower()):

Posted in AutomaticOPS, Linux, SSH/PSSH | Tagged , | Leave a comment

Hyper-V虚拟机安装

Install Hyper-V in windows 2008 R2 Enterprise Server Manager-add roles Select Hyper-V PS.Installation need reboot Create virtual machineHyper-V manager Action-New-Virtual Machine Name of virtual machine Memory Network Hard Disk Install options Summary Tips: release mouse press”ctrl+alt+ ←” 补充以下 J, 下面Hyper-V成功安装 VM能正常运行是需要前提条件的 … Continue reading

Posted in OS, Windows | Tagged , | Leave a comment

Windows server 空间不足

WinSxS下为一些常用的动态链接库,不建议删除 使用 cleanmgr.exe进行磁盘空间清理。 使用如下方式将windows update相关的目录重定向到其他分区 net stop wuauserv net stop bits if exist C:\Windows\SoftwareDistribution rmdir /S /Q C:\Windows\SoftwareDistribution rmdir /S /Q D:\SoftwareDistribution if not exist D:\SoftwareDistribution mkdir D:\NewUpdateFolder CD /D C:\Windows mklink /J SoftwareDistribution D:\NewUpdateFolder net start wuauserv net start … Continue reading

Posted in OS, Windows | Tagged , | Leave a comment

AD域控——用户及组策略管理

获取密码策略: Get-ADDefaultDomainPasswordPolicy 具体内容的解释,参见:https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/account-lockout-duration 查询“密码永不过期”的用户: Get-ADUser -Filter ‘PasswordNeverExpires -eq $true’ -Server DCHostname | select name 通常情况下,我们使用这样的方式获取所有的名称: get-aduser -filter ‘passwordNeverExpires -eq $true’ | select name 可以通过OU=xxx DC=xxx 来限定OU,注意,要用逗号分隔的方式把整个DC都用.进行拆分 Get-ADUser -searchbase ‘ OU=Dongguan,DC=szmaxcent,DC=COM,DC=CN ‘ -Filter ‘PasswordNeverExpires -eq $true’ -Server DC001 | select name

Posted in OS, Windows | Tagged , , , | Leave a comment