12月10
修改/etc/yum.repo.d/CentOS-Base.repo,在该文件内追加以下内容:
即可。
[dag]
name=Dag RPM Repostory for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
gpgkey=http://apt.sw.be/packages/RPM-GPG-KEY.dag.txt
name=Dag RPM Repostory for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
gpgkey=http://apt.sw.be/packages/RPM-GPG-KEY.dag.txt
即可。
8月20
今天起,准备由以前主要使用的F-Secure SSH Client,改为SecureCRT。
但今天在传输文件,执行rz的时候提示:
-bash: rz: command not found
rz命令没找到?
执行sz,同样也没找到。
安装lrzsz:
现在就可以正常使用rz、sz命令上传、下载数据了。
使用方法:
上传文件
下载文件
但今天在传输文件,执行rz的时候提示:
-bash: rz: command not found
rz命令没找到?
执行sz,同样也没找到。
安装lrzsz:
# yum -y install lrzsz
现在就可以正常使用rz、sz命令上传、下载数据了。
使用方法:
上传文件
# rz filename
下载文件
# sz filename
8月17
It appears as though you do not have permission to view information for any of the hosts you requested...
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
修改/usr/local/nagios/etc/cgi.cfg
找到use_authentication=1,将1修改为0,保存退出。
重启nagios服务后页面恢复正常。
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
修改/usr/local/nagios/etc/cgi.cfg
# vi /usr/local/nagios/etc/cgi.cfg
找到use_authentication=1,将1修改为0,保存退出。
# service nagios restart
重启nagios服务后页面恢复正常。
8月10
sed去除注释行:
sed去除空行:
sed去空行和注释行:
# sed -i -c -e '/^#/d' filename
sed去除空行:
# sed -i -c -e '/^$/d' filename
sed去空行和注释行:
sed -i -c -e '/^$/d;/^#/' filename
8月10
脚本:
执行完以后,可在当前目录下找到mac_tables文件,里面就是本网段IP地址与MAC地址的对应关系。
#!/bin/sh
for ((i = 1; i < 254; i++))
do
arping -I eth0 192.168.80.$i -c 1
done
arp -a > mac_tables
for ((i = 1; i < 254; i++))
do
arping -I eth0 192.168.80.$i -c 1
done
arp -a > mac_tables
执行完以后,可在当前目录下找到mac_tables文件,里面就是本网段IP地址与MAC地址的对应关系。





