1.[命令提示字元],按滑鼠右鍵,選擇 [以系統管理員身分執行]
2.輸入 powercfg /requests
3.此時可以發現造成問題的程式,TimeRadio_5.5.exe,請將該軟體關閉或移除。
4. 再次執行 powercfg /requests 指令,測試看看是否還有其他程式影響。
linux啟動過程故障解決
故障一 MBR被破壞
1. linux rescue
chroot /mnt/sysimage #進行掛載
grub-install /dev/sda #重建bootload
exit
exit
故障二 grub損壞 停在grub>出現故障
1.先想辦法進去系統
grub> root (hd0,0) #選擇root啟動時要加載分區
grub> kernel / #顯示內核
grub> kernel /vmlinuz-version ro root=/dev/sda2 quit #選擇內核文件,設置ro屬性,改root目錄為/dev/sda2,quit 靜默模式
grub> initrd /initrd-version.img
2.修改 vim/boot/grub/grub.conf
default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz //grub選項圖案 hiddenmenu//隱藏菜單 title redhat5.1
root(hd0,0) //啟動碟 kernel/vmlinuz-version ro root=/dev/sda2 quiet initrd/initrd-version.img
故障三 掛載文件fstab配置錯誤 出現故障
根據提示,我們可以通過輸入root密碼來進入系統
1.mount -o rw.remount /
就可以針對/etc/fstab 修改
Mac 系統的設定檔: /etc/sshd_config
Linux 系統的設定檔: /etc/ssh/sshd_config
你只要在 sshd_config 加上這個設定,在重啟 SSHD server 即可。
UseDNS no
Mac 重啟 SSHD 方式
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist && sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
停用 GSSAPIAuthentication
GSSAPIAuthentication 全名是 Generic Security Services API,這個功能平常也是用不到,所以可以直接停用。
/etc/ssh/sshd_config
UseDNS no
GSSAPIAuthentication no
GSSAPIAuthentication 也可以在 Client 端設定不要使用,你可以修改 ~/.ssh/config
~/.ssh/config
GSSAPIAuthentication no
GSSAPIDelegateCredentials yes
5/4 ————– /etc/sh/bak.sh 增加 rsybc –delete-excluded 排除 "rsync cannot delete non-empty directory"
資料夾內有~$.* (導致不能刪除空目錄)
用記事本新增pdf
@echo off
pushd "%~dp0″
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
for /f %%i in (‘findstr /i . List.txt 2^>nul’) do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
pause
2017-06-11 02:07:44 By 瘦河馬
這近要用yum更新套件時,發現不能更新。
OS
# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.8 (Final)
Release: 5.8 <==太舊了
Codename: Final
# yum install package
Loaded plugins: fastestmirror
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
我以為是我的yum 壞掉了,到repository去看才知道是停止支援。該版本的目錄還在,只是沒檔案,留了一個字條:
This directory (and version of CentOS) is depreciated. CentOS-5 is now past EOL You can get the last released version of centos 5.11 here: http://vault.centos.org/5.11/ Please NOTE: this is not being maintained for security since moving to Vault. It will have security issues, you should upgrade to a new version instead.
好的,至少還有「遺跡」可以用。
修改
# vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever – Base
baseurl=http://vault.centos.org/5.11/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever – Updates
baseurl=http://vault.centos.org/5.11/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
baseurl=http://vault.centos.org/5.11/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
把原本的註解或刪掉,加上上面黃色的。
勉強能用
開系統的「登錄編輯程式」,展開「HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat」資料夾,並新增一項 DWORD(32位元)值,名為「cadca5fe-87d3-4b96-b7fb-a231484277cc」,數值為0。完成後,就能確保系統可如常接收 Windows Update 的安全性更新。
http://pc3mag.com/windows-7-need-antivirus-for-windows-update/
/sbin/iptables -A INPUT -s 110.89.34.54 -j DROP
iptables: Resource temporarily unavailable.
/sbin/iptables -A INPUT -s 27.153.160.40 -j DROP
iptables: Resource temporarily unavailable.
/sbin/iptables -A INPUT -s 27.153.233.238 -j DROP
iptables: Resource temporarily unavailable.
/sbin/iptables -A INPUT -s 110.85.68.209 -j DROP
iptables: Resource temporarily unavailable.
/sbin/iptables -A INPUT -s 27.150.241.82 -j DROP
iptables: Resource temporarily unavailable.
解決方式:
由于线程数目超出了最大值。
root用户下查看oracle用户可用的线程数目
vi /etc/security/limits.conf
显示内容类似如下:
iptables soft nproc 2046
iptables hard nproc 16384
nproc就是"max user processes", 修改soft的数目即可。
lsof | grep iptables | wc -l
PHP的php-fpm进程打开文件居然有这么多,太恐怖了,重启一下先:
lsof | grep iptables | wc -l
21
lsof | grep php | wc -l
12970
lsof | grep nginx | wc -l
776
lsof | grep mysql | wc -l
134
查看打开文件的具体信息:
lsof | grep iptables > iptables.txt
参看:http://blog.itpub.net/12457158/viewspace-753400/
————————————————————————————————————————
ulimit -n 65535 解决,但重启无效的解决办法:
linux下,Iptable加过滤IP时提示:iptables: Resource temporarily unavailable.的解决办法
使用ulimit -a 可以查看当前系统的所有限制值,使用ulimit -n 可以查看当前的最大打开文件数。
新装的linux默认只有1024,当作负载较大的服务器时,很容易遇到error: too many open files。因此,需要将其改大。
使用 ulimit -n 65535 可即时修改,但重启后就无效了。(注ulimit -SHn 65535 等效 ulimit -n 65535,-S指soft,-H指hard)
有如下三种修改方式:
1.在/etc/rc.local 中增加一行 ulimit -n 65535
2.在/etc/profile 中增加一行 ulimit -n 65535
3.在/etc/security/limits.conf最后增加如下两行记录
* soft nofile 65535
* hard nofile 65535
具体使用哪种,试试哪种有效吧,我在 CentOS中使用第1种方式无效果,使用第3种方式有效果,而在Debian中使用第2种有效果
程式不停出現 錯誤 1324
處理方法:
Step 1.選擇左下角的「開始」 > 「執行」
Step 2.輸入「regedit」
Step 3.找到HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\
CurrentVersion\AppCompatFlags\Custom.
將Custom資料夾展開後找到MSIEXEC.EXE,
把那個 MSIEXEC.EXE 移除掉並重開機後就可以正常安裝了。
https://github.com/stascorp/rdpwrap/releases
下載後執行 Single session per user部分拿掉及可