Kloxo關(guān)閉日志和網(wǎng)站統(tǒng)計,減少空間占用,避免vps無法正常工作
客戶反映空間不夠了,他說我使用的 www 空間, 其實是很少的,但50G空間都快滿了:
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 50G 47G 3.1G 94% /
官方說法:宇塵網(wǎng)絡幫助中心域名知識|虛擬主機知識|VPS主機知識|服務器知識|網(wǎng)站建設(shè)知識|網(wǎng)絡推廣
Every day, if the log file's size is larger than 50MB, they are moved into the client's home directory. If you set the remove_processed_logs as true, then instead of moving, they will be deleted. Your main statistics calculation will not be affected at all.
在Kloxo/Lxadmin里添加了一個域名,默認的是打開了網(wǎng)站統(tǒng)計.建議在添加域名時就關(guān)閉這個功能。如果沒有關(guān)閉統(tǒng)計并且流量很大,用不了多久硬盤就會被統(tǒng)計文件撐爆。如果你的MySQL不能正常啟動,很有可能是這個原因?梢栽谙聢D所示位置關(guān)掉統(tǒng)計
為避免這樣的情況發(fā)生,請作以下設(shè)置:
ssh登錄vps,刪除已有的統(tǒng)計文件
輸入命令:
rm -f /home/admin/__processed_stats/*
如果硬盤已經(jīng)占滿并且數(shù)據(jù)庫不能啟動,lxadmin不能打開,可以用SSH登錄到系統(tǒng)執(zhí)行刪除操作,命令:
rm -f /home/admin/__processed_stats/*
刪除之后啟動MySQL,命令:
service mysqld start
避免以后還生成較多日志,建議每個域名都做以下設(shè)置:仿牌空間、香港月付空間、韓國月付空間、日本月付空間、荷蘭VPS、香港VPS
kloxo_del_logo.png
一個客戶的處理過程:
客戶反映kloxo無法進入后臺,而且網(wǎng)站全部打不開。以查詢,能ping,能ssh。重啟了kloxo也不行。奇怪。于是 df一看,空間滿了。如下處理方式:美國月付空間、月付美國空間、美國VPS、美國服務器租用
[root@www.ctohome.com __processed_stats]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 20G 20G 0 100% /
[root@www.ctohome.com __processed_stats]# pwd
/home/admin/__processed_stats
[root@www.ctohome.com __processed_stats]# du -m -s .
19426 . 日志占用了19G
[root@vps76 __processed_stats]# rm -f /home/admin/__processed_stats/*
重新啟動kloxo
service kloxo restart
更多技術(shù)知識,更多網(wǎng)絡服務,盡在宇塵網(wǎng)絡。我們的成長,離不開你們的支持,宇塵網(wǎng)絡,歡迎您的訪問。