[root@centos ~]# quotacheck -aucmv
quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
quotacheck: Scanning /dev/sda4 [/iii] done
quotacheck: Cannot stat old user quota file: 沒有此一檔案或目錄
quotacheck: Old group file not found. Usage will not be substracted.
quotacheck: Checked 2 directories and 0 files
quotacheck: Cannot create new quotafile /iii/aquota.user.new: 拒絕不符權限的操作
quotacheck: Cannot initialize IO on new quotafile: 拒絕不符權限的操作

要關閉seLinux

[root@centos ~]# setenforce 0

[root@centos ~]# quotacheck -aucmv
quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
quotacheck: Scanning /dev/sda4 [/iii] done
quotacheck: Cannot stat old user quota file: 沒有此一檔案或目錄
quotacheck: Old group file not found. Usage will not be substracted.
quotacheck: Checked 2 directories and 0 files
quotacheck: Old file not found.

可以了

蒼穹 發表在 痞客邦 留言(1) 人氣()

1.[開始]->[群組原則管理]

2.點選[Default Domain Policy]->右邊[設定]分頁簽

3.點開[安全性設定]->[帳戶原則/密碼原則]->案右鍵編輯

蒼穹 發表在 痞客邦 留言(0) 人氣()

當我在Vmware安裝好CentOs後,網路無法開啟會顯示,如下訊息

RTNETLINK answers: cannot allocate memory

作法:

蒼穹 發表在 痞客邦 留言(0) 人氣()

在CentOS32安裝vmware-tools後會發生,如下的訊息

bash: ./vmware-install.pl: 權限不夠

所以我移除虛擬CentOS重新安裝後使用下方的指令安裝就可以成功

蒼穹 發表在 痞客邦 留言(0) 人氣()

1.下載clavam檔案

wget http://pkgs.repoforge.org/clamav/clamav-0.97.6-1.el6.rf.i686.rpm
wget http://pkgs.repoforge.org/clamav/clamav-db-0.97.6-1.el6.rf.i686.rpm
wget http://pkgs.repoforge.org/clamav/clamav-devel-0.97.6-1.el6.rf.i686.rpm
wget http://pkgs.repoforge.org/clamav/clamd-0.97.6-1.el6.rf.i686.rpm

2.安裝Clamav

#rpm -Uvh clam*

蒼穹 發表在 痞客邦 留言(0) 人氣()

當架好Ubuntu Linux後,可以進階使用Iptables功能,將Ubuntu變成一台Router並對應到內部的IP開放相關服務,如[ftp][www]...等等。
環境介紹:
Server端
兩張網卡:當然你也可以將一張網卡給兩個IP
eth0:192.168.10.10 ===>外部IP
eth1:192.168.20.10 ===>內部IP(所有內網LAN透過這IP當作Gateway出去)

PC端網路卡設定
IP Address:192.168.20.20
Gateway:192.168.20.10

蒼穹 發表在 痞客邦 留言(4) 人氣()

Ubuntu10 安裝DHCP Server設定,兩張網卡eth0 eth1
eth0:192.168.66.128
eth1:192.168.137.128
將eth1設定為dhcp網段

蒼穹 發表在 痞客邦 留言(0) 人氣()

當重新啟動DNS時會發生rndc: connect failed: 127.0.0.1#953: connection refused 錯誤訊息,解決方式
1.重新產生檔案
$rndc-confgen > /etc/rndc.conf
如下
# key "rndc-key" {
#       algorithm hmac-md5;
#       secret "ozs3jAYNxzKNPmy4GJFqKA==";
# };


2.把上面這段取代掉/etc/bind/rndc.key理面的key "rndc-key"的內容,以前的註解掉
$vim /etc/bind/rndc.key

#key "rndc-key" {
#       algorithm hmac-md5;
#       secret "Ed3VmzsCSMSGLJts09IxEw==";
#};
#=======把上面以前的註解掉===========
key "rndc-key" {
      algorithm hmac-md5;
      secret "ozs3jAYNxzKNPmy4GJFqKA==";
};
#==========用上面這段取代===========

3.重新啟動DNS
$/etc/init.d/bind9 restart

另一個方式
1.查看DNS配置問題,用下面的指令查看
$named -g
/etc/bind/rndc.key: permission denied

$chmod 644 /etc/bind/rcnd.key
$named -g
OK



蒼穹 發表在 痞客邦 留言(0) 人氣()

當你的Ubuntu運行一段時間,記得要去查看 /var/log/auth.log,包準你嚇一跳一堆攻擊sshd的訊息出現,如何阻擋呢??來看一下吧
請安裝denyhosts套件,它會自行分析,並將攻擊IP寫入hosts.deny內

1.安裝denyhosts
#apt-get install denyhosts

2.啟動
#/etc/init.d/denyhosts restart

可以查看設定檔
vim /etc/denyhosts.conf

蒼穹 發表在 痞客邦 留言(1) 人氣()

有時候我們會備份相關資料如/etc資料夾 or 網站資料 or 資料庫,這時可以使用 tar+ logrotate 加入排程讓系統備份7天的資料

1.排程備份/etc資料夾 and /var/www資料夾,壓縮後放到/backup 資料夾內
#crontab -e
0 1 * * * tar zcvf /backup/etc.tar.gz /etc/ > /dev/null 2>&1
0 1 * * * tar zcvf /backup/www.tar.gz /var/www/ > /dev/null 2>&1

2.建議規則檔案,備份七天檔案並循環
#vim /etc/backup.conf
/backup/*gz {
missingok
notifempty
sharedscripts
postrotate
endscript
rotate 7
}

3.加入排程自動做
#crontab -e
58 0 * * * logrotate -f /etc/backup.conf > /dev/null 2>&1

4.完成。記得去/backup/檢查看看

 

 

 

蒼穹 發表在 痞客邦 留言(0) 人氣()