執行掃描動作的時候,卻出現
503 Service temporarily down試了許多方法,直到這位鄉民提出的方法,才順利解決
Solution:
#重新製作憑證 openvas-mkcert -f openvas-mkcert-client -i -n #restart all daemons. /etc/init.d/openvas-scanner restart /etc/init.d/ gsad restart
Reference
503 Service temporarily down試了許多方法,直到這位鄉民提出的方法,才順利解決
Solution:
#重新製作憑證 openvas-mkcert -f openvas-mkcert-client -i -n #restart all daemons. /etc/init.d/openvas-scanner restart /etc/init.d/ gsad restart
xe vm-param-s處理好之後再改回來et HVM-boot-p olicy="BIOS order" uuid=[uuid of your vm]
xe vm-param-set HVM-boot-p olicy="" uuid=[uuid of your vm]
yum install e2fsprogs-devel e2fsprogs e2fsprogs-libs2.下載extundelete
wget http://downloads.sourceforge.net/project/extundelete/extundelete/0.2.4/extundelete-0.2.4.tar.bz2?r=&ts=1441332731&use_mirror=nchc3.解壓縮並且安裝
bzip2 -d extundelete-0.2.4.tar.bz24.開始救回檔案
tar xvf extundelete-0.2.4.tar
cd extundelete-0.2.4
./configure
make && make install
ls -id /root/有了inode之後,我們接著來查看一下該位置所在硬碟分割區
393220 /root/
Filesystem 1K-blocks Used Available Use% Mounted on接著來查看一下被刪除的檔案是否存在(建議先卸載該分割區在進行救援)
/dev/sda6 10321208 5251064 4545856 54% /
extundelete /dev/sda6 --inode 393220
File name |Inode number | Deletestatus
.
..
xxx.jpg 393639 Deleted
extundelete /dev/sda6 --resotre-file /root/xxx.jpg
extundelete /dev/sda6 --restore-all救出來的檔案一樣是存放在目前位置的RECOVERD_FILES 資料夾內。
#!/bin/bash
echo "INSERT INTO test (ID,NAME,DATE) VALUES ('1', 'PENNY', '2015/08/19');" |
mysql -uroot -pPASSWORD DBNAME;
#btrfs filesystem show那麼那些消失的空間哪去了呢?
#snapper list那麼要如何刪除這些snapper檔案呢? (#表示snapper list編號,請從最舊的開始)
snapper delete root #或是你可以一口氣刪除
# for i in `seq 1 3656`;do snapper delete $i;done接著檢查一下snapper 設定,/etc/snapper /configs/root
NUMBER_LIMIT="10"消失的空間回來了。
NUMBER_LIMIT_IMPORTANT="10"
cd ~接著回答幾個簡單的問題
wget http://prdownloads.sourceforge.net/awstats/awstats-7.4.tar.gz
tar zxvf awstats-7.4.tar.gz
mv awstats-7.4 /usr/local/awstats
ln -s /usr/local/awstats /usr/share/awstats
cd /usr/local/awstats/tools
perl awstats_configure.pl
#請輸入Apache Server的設定檔路徑接著依照提示按下ENTER完成整個設定
Config file path ('none' to skip web server setup):
> /etc/httpd/conf/httpd.conf
#是否需要產生新的設定檔Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ?
y
#輸入你的站台名稱,但僅只是設定檔名稱,妳可以取妳喜歡名稱Your web site, virtual server or profile name:
> www
#設定檔存放路徑Directory path to store config file(s) (Enter for default):
#按下ENTER 預設
chmod 755 /usr/local/awstats緊接著將中文化語系修改為UTF-8
mkdir /var/lib/awstats
cd /usr/local/awstats/wwwroot/cgi-bin/lang將PageCode=big5,修改為PageCode=utf-8
iconv -f big5 -t utf-8 awstats-tw.txt -o awstats-tw-utf8.txt
vi awstats-tw-utf8.txt
vi /usr/local/awstats/wwwroot/cgi-bin/awstats.pl找到將 'zh-tw'=>'tw' 修改成 'zh-tw'=>'tw-utf8'
vi /etc/awstats/awstats.www.conf
vi /etc/crontab#awstats
vi /etc/httpd/conf/httpd.conf
service httpd restart最後打開瀏覽器觀看成果
du -hs /*I found /opt is bigger than other system.
/opt/dell/srvadmin/var/log/openmanage/dsm_om_connsvcdIO.logBackup up and clean it up.
du -hs $PATH/*進階的用法
EX:du -hs /*
du -s $PATH/* | sort -rn | head - number
EX:列出HOME 目錄前15名
du -s /home/* | sort -rn | head -15
# find . -newerct 2015-07-01其他find 更多應用可以參考MAN,其他跟時間比較相關的有mtime(檔案內容修改時間)、ctime(檔案狀態改變時間)、atime(檔案最後被存取時間)
./
file1
file2
find SOURCE -newerct 2015-06-01 -exec rsync -av {} DST \;原本以為這樣就可以結束,順利的備份,但是不管怎麼跑,RSYNC都會全部備份,奇怪了,不是都已經使用FIND了嗎?
./最後在find 條件 加上要備份的檔案副檔名解決。
file1
file2
find SOURCE/* -newerct 2015-06-01 -exec rsync -av {} DST \;
find SOURCE/* -newerct 2015-06-01 -exec rsync -av {} DST \; -exec cmd {} \;參考來源
題外話,packman的Austria站台似乎又存取不是很正常,從分流列表中,修改回台灣分流。zypper in fuse-exfat
vi /etc/resolv.conf看起來DNS是正常的,用nslookup檢查一下也是正常,開啟瀏覽器輸入IP也是正常,但是輸入網址就是找不到網站。
nameserver 8.8.8.8
vi /etc/sysconfig/network/config開啟瀏覽器終於正常。
# 找到並修改NETCONFIG_DNS_STATIC_SERVERS=8.8.8.8
修改好之後,執行
netconfig update
The Server is still booting。
vi ~/.config/mpv/mpv.conf透過指令來播放影片測試
hwdec=vaapi
vo=vaapi,opengl-hq,opengl
mpv /path/your movie如果有看到VO: [vaapi] 1920x1080 vaapi,表示有成功使用vaapi。
netstat -na |grep ip爬了一下,似乎不少朋友推薦使用tcpkill套件,不過有看到一位網友分享的script也非常實用
lsof -i tcp:80 | grep ip | awk '{print $2}' | xargs kill當然刪除前也可以先透過echo來察看刪除哪些程序
lsof -i tcp:80 | grep ip | awk '{print $2}' | xargs echo kill
winecfg
新增程式,選擇SMG.EXE,Windows版本選擇XP。ln -s ~/.fonts/SourceHanSans-Light.otf ~/.wine/driver_c/windows/Fonts/DroidSansFallback.ttf
*注意:這邊是因為匯入註冊的機碼是參考手把手玩Linux網站的教學,所以懶得改機碼所以才把字型對應成相對應的名稱,當然您也可以繼續使用DroidSans 或是其他你喜好的字體。
vi ~/font.reg
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink]
"FontLinkControl"=dword:00004000
"FontLinkDefaultChar"=dword:00003000
/* 平滑化(anti-alias) */
/* 如果覺得開了之後字體難看,把三個Y改成N */
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"ClientSideAntiAliasWithCore"="Y"
"ClientSideAntiAliasWithRender"="Y"
"ClientSideWithRender"="Y"
/* 平滑字型 */
[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
/* 替換字型1 */
/* 安裝Wine不會提供字型,所以需要替換字型,我以Droid Sans Fallback替換 */
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Arial Baltic,186"="Droid Sans Fallback,186"
"Arial CE,238"="Droid Sans Fallback,238"
"Arial CYR,204"="Droid Sans Fallback,204"
"Arial Greek,161"="Droid Sans Fallback,161"
"Arial TUR,162"="Droid Sans Fallback,162"
"Courier New Baltic,186"="Droid Sans Fallback,186"
"Courier New CE,238"="Droid Sans Fallback,238"
"Courier New CYR,204"="Droid Sans Fallback,204"
"Courier New Greek,161"="Droid Sans Fallback,161"
"Courier New TUR,162"="Droid Sans Fallback,162"
"Helv"="Droid Sans Fallback"
"Helvetica"="Droid Sans Fallback"
"MS Shell Dlg"="Droid Sans Fallback"
"MS Shell Dlg 2"="Droid Sans Fallback"
"PMingLiU"="Droid Sans Fallback"
"新細明體"="Droid Sans Fallback"
"Tahoma"="Droid Sans Fallback"
"Times"="Droid Sans Fallback"
"Times New Roman Baltic,186"="Droid Sans Fallback,186"
"Times New Roman CE,238"="Droid Sans Fallback,238"
"Times New Roman CYR,204"="Droid Sans Fallback,204"
"Times New Roman Greek,161"="Droid Sans Fallback,161"
"Times New Roman TUR,162"="Droid Sans Fallback,162"
"Tms Rmn"="Droid Sans Fallback"
/* 替換字型2 */
[HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements]
@="Droid Sans Fallback"
"Arial"="Droid Sans Fallback"
"Fixedsys"="Droid Sans Fallback"
"Microsoft Sans Serif"="Droid Sans Fallback"
"MingLiU"="Droid Sans Fallback"
"MS UI Gothic"="Droid Sans Fallback"
"PMingLiU"="Droid Sans Fallback"
"Simsun"="Droid Sans Fallback"
"Songti"="Droid Sans Fallback"
"System"="Droid Sans Fallback"
"Tahoma"="Droid Sans Fallback"
"Terminal"="Droid Sans Fallback"
/* 取代字型 */
/* Wine 1.1.12 打補丁後也會有亂碼,所以要修改這裡 */
/* Wine 1.1.12 之前可以不用修改,改了應該也沒關係 */
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Microsoft Sans Serif"="DroidSansFallback.ttf,Droid Sans Fallback"
"SimSun"="DroidSansFallback.ttf,Droid Sans Fallback"
"Tahoma"="DroidSansFallback.ttf,Droid Sans Fallback"
"PMingLiU"="DroidSansFallback.ttf,Droid Sans Fallback"
"Lucida Sans Unicode"="DroidSansFallback.ttf,Droid Sans Fallback"
[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]
"BorderWidth"="1"
"CaptionFont"=hex:f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,88,00,00,00,22,44,00,72,00,6f,00,69,00,64,00,20,00,53,00,61,00,6e,00,73,00,20,00,46,00,61,00,6c,00,6c,00,62,00,61,00,63,00,6b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"CaptionHeight"="18"
"CaptionWidth"="18"
"MenuFont"=hex:f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,88,00,00,00,22,44,00,72,00,6f,00,69,00,64,00,20,00,53,00,61,00,6e,00,73,00,20,00,46,00,61,00,6c,00,6c,00,62,00,61,00,63,00,6b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"MenuHeight"="18"
"MenuWidth"="18"
"MessageFont"=hex:f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,88,00,00,00,22,44,00,72,00,6f,00,69,00,64,00,20,00,53,00,61,00,6e,00,73,00,20,00,46,00,61,00,6c,00,6c,00,62,00,61,00,63,00,6b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"ScrollHeight"="16"
"ScrollWidth"="16"
"Shell Icon Size"="32"
"SmCaptionFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,88,00,00,00,00,4d,00,53,00,20,00,53,00,68,00,65,00,6c,00,6c,00,20,00,44,00,6c,00,67,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"SmCaptionHeight"="18"
"SmCaptionWidth"="13"
"StatusFont"=hex:f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,88,00,00,00,22,44,00,72,00,6f,00,69,00,64,00,20,00,53,00,61,00,6e,00,73,00,20,00,46,00,61,00,6c,00,6c,00,62,00,61,00,63,00,6b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
cp /usr/bin/mount /bin安裝選來源分割區之後,再輸入iso名稱,(這就是剛剛為什麼要把名稱改簡單一點的原因)
exit
/suse.iso
http://www.videolan.org/vlc/download-suse.html
#1 表示保留1%
tune2fs -m 1 /dev/sdb1
#0 表示不保留
tune2fs -m 0 /dev/sdb1
/dev/sdb1 請更改為您的磁碟分割區
umount -f /mnt/xxx也參考過:http://joelinoff.com/blog/?p=356
umount -l /mnt/xxx
wget http://mirror.centos.org/centos/5/os/i386/CentOS/mailx-8.1.1-44.2.2.i386.rpm2.config ssmtpd.conf
rpm -ivh mailx-8.1.1-44.2.2.i386.rpm
ps.you might need glibc
http://mirror.centos.org/centos/5/updates/i386/RPMS/glibc-2.5-123.el5_11.1.i386.rpm
vi /etc/ssmtp/ssmtp.conf3.create shell script to send mail (from http://idolinux.blogspot.tw)
mailhub=mail.yourdomain.com:25
AuthUser=username
AuthPass=password
rewriteDomain=server1.yourdomain.com
hostname=server1.yourdomain.com
#!/bin/sh
HOST=`hostname`
EMAIL="my_admin@my_network.net"
echo "There has been an OpenManage ALERT detected on $HOST. Please login to the web interface to see details." | mail $EMAIL -s "OM ALERT $HOST : $1"
4. now you can add ation via web gui or cmd line below
chmod +x /usr/local/bin/om-alert.shor
omconfig system alertaction
omconfig system alertaction -?
omconfig system alertaction event=powersupply execappath=/usr/local/bin/om-alert.sh
omconfig system alertaction event=storagesyswarn alert=true broadcast=true execappath=/usr/local/bin/om-alert.sh
omreport system alertaction
for I in `omconfig system alertaction | sed 's/ *(.*)//; s/>.*//; s/.*[:<] *// ; s/|/ /g;'`; do
echo $I;
omconfig system alertaction event=$I alert=true broadcast=true execappath="/usr/local/bin/om-alert.sh $I"
done
wget -q -O - http://linux.dell.com/repo/hardware/Linux_Repository_14.12.00/bootstrap.cgi | bash2.Disable Citrix repository .
vi /etc/yum.repos.d/Citrix.repo3. start the installation
enable=0
yum --enablerepo=base install srvadmin-all4.Open port 1311 in iptables,
-A RH-Firewall-1-INPUT -m conntrack --ctstate NEW -m udp -p udp --dport 161 -j ACCEPT5.Restart iptables
-A RH-Firewall-1-INPUT -m conntrack --ctstate NEW -m tcp -p tcp --dport 1311 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
/etc/rc.d/init.d/iptables restart
/opt/dell/srvadmin/sbin/srvadmin-services.sh startOther
yum install firmware-toolsReference
yum install $(bootstrap_firmware)
update_firmware --yes
小提醒:開啟VLC,工具\偏好設定-->視訊:確認 accelerated video output(Overlay)是否打勾。輸入與編解碼器: Use GPU acceleration 打勾開啟硬解時:
#wge http://www.lsi.com/downloads/Public/RAID%20Controllers/RAID%20Controllers%20Common%20Files/8.07.10_MegaCLI_Linux.zipNow you can use command to get what you want
#unzip 8.07.10_MegaCLI_Linux.zip
# cd 8.07.10_MegaCLI_Linux
#rpm2cpio MegaCli-8.07.10-1.noarch.rpm | cpio -idmv
#./opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL
PS.you might need apt-install unzip , apt-install rpm2cpio
/root/opt/MegaRAID/MegaCli/MegaCli64 -AdpALLInfo -aALL|grep 'Device Present' -A7
BeforeI hope it works out well for you!
starting cylinders ending starting cylinders
177 19581
After
starting cylinders ending starting cylinders
237 19581
# yum groupremove "Virtualization"
# yum remove libvirt參考來源:
# reboot
# xe vdi-list uuid=VDIUUID params=allAnd you can see vhd-parent:(if you had ever did the snapshot or something like that.)
or
# xe vdi-list name-labe=$VDI_NAME params=all
# xe vdi-list
# xe vdi-list name-label="base copy"2.find the path.
output:
uuid ( RO) : $UUID
name-label ( RW): base copy
name-description ( RW):
sr-uuid ( RO): $STORAGE_UUID
virtual-size ( RO): 386547056640
sharable ( RO): false
read-only ( RO): true
# lvdisplay|grep "$UUID"output:3.remove it and rescan the storage.
LV Name $PATH
# lvremove -f $PATHMy space is back and i hope it works out well for you !
# xe sr-scan uuid=$STORAGE_UUID
# vi /etc/dovecot/dovecot.conf如果沒有啟用SSL加密,記得要關閉
protocols = pop3 imap
#vi /etc/dovecot/conf.d/10-ssl.conf非常關鍵的mail_location,一直卡在這邊
ssl = no
#vi /etc/dovecot/conf.d/10-mail.conf修改好後記得重新啟動服務
mail_location = maildir:/var/spool/mail/%u
#/etc/init.d/dovecot restart最後最最最重要的步驟在這
#chmod 600 /var/mail/foo參考來源:
foo 為使用者帳號