`
文章列表
AVAYA常用命令集 (2007-05-11 16:22:20)转载▼ 分类: 其他知识 常用操作动作:  add               添加 change            更改 remove            删除 list               列表 status             查看状态 monito ...

填写cfg文件

#!/bin/bash x=$(cat /usr/local/nagios/etc/hosts/avaya/log) i=0 for e in $x;do i=`expr $i + 1` cat  <<EOF >> ./avaya.cfg define host{ host_name AvayaServer-$i use zhuji alias $e address $e hostgroups AVAYA servers } EOF done
#!/bin/bash info="/home/script/rec_ser.info" res="/home/script/rec_ser.res" src="/home/script" if [ -d ${src} ];then mkdir -p $src fi if [ ! -f $info ];then touch $info read -p "input host ip:" ip read -p "input username:" user read -p "inpu ...

nmap详解

进行ping扫描,打印出对扫描做出响应的主机,不做进一步测试(如端口扫描或者操作系统探测):   nmap -sP 192.168.1.0/24   仅列出指定网络上的每台主机,不发送任何报文到目标主机:   nmap -sL 192.168.1.0/24   探测目标主机开 ...
查找对应的ip地址的mac地址 #show arp | include 172.16.33.31 Internet  172.16.33.31            0   000c.2980.aaaa  ARPA   Vlan2 查找mac地址所在网口 #show mac address-table | include 000c.2980.ad26 2    000c.2980.aaaa  DYNAMIC     Gi0/5 查找网口级联的交换机 #show cdp neighbors gi0/5 SW5          Gig 0/5           178            ...

shell kill

ps -ef | grep nagios.cfg | grep -v grep | awk '{print $2}' | xargs kill -s 9 netstat -tpln | grep 8009 | awk '{print $7}' | awk -F '[/]' '{print $1}' | xargs kill -9 && /usr/local/tomcat6/bin/startup.sh && tail -f /usr/local/tomcat6/logs/catalina.out \cp -frv 递归拷贝 ls|grep sample|aw ...
1. root登陆 sudo passwd root sudo vim  /etc/lightdm/lightdm.conf.d/10-ubuntu.conf 添加: greeter-show-manual-login=true #允许手工输入登陆系统的用户名和密码 allow-guest=true #允许guest登录,可以根据自己的需要修改 reboot 2. vnc远程
create proc [dbo].[PhoneRec] (@haoma varchar(32),@ser varchar(16) output) as if @haoma='' and @ser='' begin select a.serverid,c.serverip,a.filename,b.callernumber,b.callednumber,b.createtime,b.releasetime from dbo.AGENTRECFILE as a inner join dbo.COLOG as b on a.coid=b.coid inner join ...
备份MySQL数据库的命令 mysqldump -hhostname -uusername -ppassword databasename > backupfile.sql 备份MySQL数据库为带删除表的格式 备份MySQL数据库为带删除表的格式,能够让该备份覆盖已有数据库而不需要手动删除原有数据库。 mysqldump -–add-drop-table -uusername -ppassword databasename > backupfile.sql 直接将MySQL数据库压缩备份 mysqldump -hhostname -uusername -ppassword da ...
join: select a.serverid,c.serverip,a.filename,b.callernumber,b.callednumber,b.createtime,b.releasetime from dbo.AGENTRECFILE as a inner join dbo.COLOG as b on a.coid=b.coid inner join dbo.DEVICECFG as c on a.serverid=c.serverid where b.callernumber='xxx' or b.callednumber='xxx' order by b.create ...
CentOS6.4 x86 mini安装 yum -y remove selinux* yum -y remove postfix yum -y remove openssl* yum -y remove cyrus-sasl rpm -e cyrus-sasl-lib --nodeps rpm -e mysql-libs --nodeps yum groupinstall "Development Libraries" yum -y install gcc* gcc-c++ gcc ncurses* zlib* libpng* libjpeg* gd* libxml2-de ...

更新文件

#!/bin/bash sp="/home/script" spt=$sp/tmp sptt=$sp/tmp/ sps=$sp/src if [ -d ${sp} ];then         if [ -d ${sps} ]&&[ -d ${spt} ];then                 echo "${sps}&&${spt} is exist."         else                 mkdir -p ${sp}/tmp                 mkdir -p ${sp}/src ...
linux 破解mysql root密码 第一:首先要把mysqld停止,最好都kill掉 killall mysqld 第二:启动mysql,但是要跳过权限表 /usr/local/mysql/bin/mysqld_safe --skip-grant-tables & 第三:进去mysql,并修改密码 /usr/local/mysql/bin/mysql -u root mysql>use mysql; mysql>update user set password=password("new_pass") where user="ro ...

mysql添加删除用户

#!/bin/bash read -p "input your name: "  NAME read -p "input your passwd:" PASSWD mysql -uvpn -pvpn123 <<EOF use vpn; insert into vpnuser (name,password) values('$NAME' ,'$PASSWD'); EOF echo "vpn add  is  ok...." #!/bin/bash read -p "input your name: "  ...

linux基本配置

#!/bin/sh /etc/init.d/iptables stop yum -y install net-snmp telnet nc gcc* vsftpd ntpdate pcre pcre-devel yum -y update iptables -F iptables -X iptables -P INPUT DROP iptables -P FORWARD DROP #peng run ip iptables -A INPUT -s 1.202.235.226/32 -j ACCEPT iptables -A INPUT -s 1.202.235.227/3 ...
Global site tag (gtag.js) - Google Analytics