compile net-snmp on debian lenny
[
2009/09/23 16:16 | by askwan ]
2009/09/23 16:16 | by askwan ]
net-snmp
下载地址:http://ncu.dl.sourceforge.net/project/net-snmp/net-snmp/5.4.2.1/net-snmp-5.4.2.1.tar.gz
解压然后编译,编译参数
如编译报错:
这是缺少libperl-dev开发库,安装上
然后make ;make install
可以用snmpconf配置snmpd.conf,也可用例子文件
然后根据需要修改此文件
启动
测试
---------END------------
下载地址:http://ncu.dl.sourceforge.net/project/net-snmp/net-snmp/5.4.2.1/net-snmp-5.4.2.1.tar.gz
解压然后编译,编译参数
./configure --prefix=/usr/local/net-snmp/ --with-sys-contact="askwan@askwan.com" --with-sys-location="pudong shanghai China" --enable-shared --with-default-snmp-version=2 --enable-mfd-rewrites --with-mib-modules="misc/ipfwacc mibII host disman/event-mib ucd_snmp agent_mibs agentx notification target utilities ucd-snmp/diskio tunnel mibII/mta_sendmail" --with-sysconfdir="/usr/local/net-snmp/etc/"
如编译报错:
Quotation
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
这是缺少libperl-dev开发库,安装上
apt-get install libperl-dev
然后make ;make install
可以用snmpconf配置snmpd.conf,也可用例子文件
cp EXAMPLE.conf /usr/local/net-snmp/etc/snmpd.conf
然后根据需要修改此文件
com2sec local localhost askwan
com2sec mynetwork 192.168.0.0/24 askwan
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
view all included .1 80
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
syslocation shanghai pu dong
syscontact Me askwan@askwan.com
com2sec mynetwork 192.168.0.0/24 askwan
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
view all included .1 80
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
syslocation shanghai pu dong
syscontact Me askwan@askwan.com
启动
/usr/local/net-snmp/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a -c /usr/local/net-snmp/etc/snmpd.conf
测试
snmpwalk -c askwan -v2c 192.168.0.5 if
Quotation
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
....
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
....
---------END------------
oracle temporary tablespace boom unexpectedly
[
2009/09/07 08:38 | by askwan ]
2009/09/07 08:38 | by askwan ]
临时表空间用途:
INDEX CREATE ,INDEX REBUILD,ORDER BY ,GROUP BY, DISTINCT,Analyze,UNION, Sort-Merge etc..
上面这些操作均会用到临时表空间
临时表空间重建步骤:
比如临时表空间一直增大,导致系统磁盘空间吃紧,考虑重建
1 定位当前临时表空间位置
2 创建临时表空间TEMP02
review:
3 改变缺省临时表空间为TEMP02
4 .删除原缺省表空间temp
5.创建新表空间temp
6. 改变缺省表空间
7.删除中间过程表空间TEMP02
8.重新指定用户临时表空间
涉及临时文件相关操作
eg.
alter database tempfile '/u01/oracle/oradata/askwan/temp.dbf' autoextend off;
alter database tempfile '/u01/oracle/oradata/askwan/temp.dbf' resize 300M;
alter database tempfile ''/u01/oracle/oradata/askwan/temp.dbf' autoextend on;
INDEX CREATE ,INDEX REBUILD,ORDER BY ,GROUP BY, DISTINCT,Analyze,UNION, Sort-Merge etc..
上面这些操作均会用到临时表空间
临时表空间重建步骤:
比如临时表空间一直增大,导致系统磁盘空间吃紧,考虑重建
1 定位当前临时表空间位置
Quotation
SQL> SELECT FILE_NAME,TABLESPACE_NAME FROM DBA_TEMP_FILES;
FILE_NAME TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------------------
/u01/oracle/oradata/askwan/temp01.dbf TEMP
FILE_NAME TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------------------
/u01/oracle/oradata/askwan/temp01.dbf TEMP
2 创建临时表空间TEMP02
Quotation
SQL> CREATE TEMPORARY TABLESPACE TEMP02 TEMPFILE '/u01/oracle/oradata/askwan/temp02.dbf'
SIZE 100M REUSE AUTOEXTEND ON NEXT 512K MAXSIZE UNLIMITED;
Tablespace created
SIZE 100M REUSE AUTOEXTEND ON NEXT 512K MAXSIZE UNLIMITED;
Tablespace created
review:
Quotation
SQL> SELECT FILE_NAME,TABLESPACE_NAME FROM DBA_TEMP_FILES;
FILE_NAME TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------------------
/u01/oracle/oradata/askwan/temp01.dbf TEMP
/u01/oracle/oradata/askwan/temp02.dbf TEMP02
have created successfull.
FILE_NAME TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------------------
/u01/oracle/oradata/askwan/temp01.dbf TEMP
/u01/oracle/oradata/askwan/temp02.dbf TEMP02
have created successfull.
3 改变缺省临时表空间为TEMP02
Quotation
SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP02;
Database altered
Database altered
4 .删除原缺省表空间temp
Quotation
SQL> drop tablespace temp including contents and datafiles;
Tablespace dropped
Tablespace dropped
5.创建新表空间temp
Quotation
SQL> CREATE TEMPORARY TABLESPACE TEMP TEMPFILE '/u01/oracle/oradata/askwan/temp.dbf'
SIZE 100M REUSE AUTOEXTEND ON NEXT 512K MAXSIZE UNLIMITED;
Tablespace created
SIZE 100M REUSE AUTOEXTEND ON NEXT 512K MAXSIZE UNLIMITED;
Tablespace created
6. 改变缺省表空间
Quotation
SQL> alter database default temporary tablespace temp;
Database altered
Database altered
7.删除中间过程表空间TEMP02
Quotation
SQL> drop tablespace temp02 including contents and datafiles;
Tablespace dropped
Tablespace dropped
8.重新指定用户临时表空间
Quotation
SQL> alter user ASKWAN temporary tablespace temp;
User altered
User altered
涉及临时文件相关操作
eg.
alter database tempfile '/u01/oracle/oradata/askwan/temp.dbf' autoextend off;
alter database tempfile '/u01/oracle/oradata/askwan/temp.dbf' resize 300M;
alter database tempfile ''/u01/oracle/oradata/askwan/temp.dbf' autoextend on;
linux的内核漏洞
[
2009/08/22 07:39 | by askwan ]
2009/08/22 07:39 | by askwan ]
“Linux Kernel 'sock_sendpage()' NULL Pointer Dereference Vulnerability”
标准化代号 CVE-2009-2692
这漏洞恐怕是linux历史上非常值得“怀念”的了
如今exploit工具早已发布出来 还是有不少人没有引起重视啊
我安装的几台debian lenny 5.0.1和几台RHEL5.3也不幸名列其中 加上我自己的Ubuntu9.04
几乎可以说是全部“中招”了 呵呵
受影响linux系统列表
在各种solutions也都公布出来的今天
我想我们应该只关心两个问题
1.你管理的linux服务器在这个列表中吗 ?
2.你已经采取了补救措施了吗?
标准化代号 CVE-2009-2692
这漏洞恐怕是linux历史上非常值得“怀念”的了
如今exploit工具早已发布出来 还是有不少人没有引起重视啊
我安装的几台debian lenny 5.0.1和几台RHEL5.3也不幸名列其中 加上我自己的Ubuntu9.04
几乎可以说是全部“中招”了 呵呵
受影响linux系统列表
在各种solutions也都公布出来的今天
我想我们应该只关心两个问题
1.你管理的linux服务器在这个列表中吗 ?
2.你已经采取了补救措施了吗?



