2015年10月1日 星期四

CentOS 6 udev 改 NIC 名稱

see http://www.ichiayi.com/wiki/tech/udev

/etc/udev/rules.d/70-presistent-net.rules
會記錄 MAC ADDRESS 與 eth* 的對應

在 VM Template 可以
移掉 
 /etc/sysconfig/network-scripts/ifcfg-eth0 內的 UUID 以及 HWADDR
刪除 /etc/udev/rules.d/70-persistent-net.rules 這個檔案


臨時使用

ifconfig eth0 192.168.1.x netmask 255.255.255.0
ifconfig eth0 up
route add default gw 192.168.1.254

2015年9月17日 星期四

tomcat 改 content.xml 之後壞掉


Cannot create JDBC driver of class '' for connect URL 'null'



As answered above, one solution is to move the entries to $CATALINA_BASE/conf/context.xml
In particular, "Copy the Context.xml file to tomcat/conf/Catalina/localhost folder and renaming it to <web_app_name>.xml"
The underlying cause could be due to a problem with file permissions: "The user under which tomcat was running did not have permission to write to these folders. So we changed the group ownership of tomcat and /etc/tomcat folder to the same group to which the tomcat user belonged and magically everything started working as before."
This solution seems 'cleaner' to me because you can then have your entire web app including database connection properties wrapped up in a .war file.











ref
http://stackoverflow.com/questions/7274722/cannot-create-jdbc-driver-of-class-for-connect-url-null

2015年8月14日 星期五

oracle 8i rman

rman target / nocatalog;
change Archivelog All Crosscheck;


In Oracle 10g you can run the following command to crosscheck and expire any expired archive logs:
RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;

However in Oracle 8 and 9 you need to do the following

Example for Oracle 8 use:
RMAN> Change Archivelog All Validate;

Example for Oracle 8i use:
RMAN> change Archivelog All Crosscheck;

Example for Oracle 9i:
RMAN> crosscheck archivelog all;

2015年8月4日 星期二

dns primary /secondary 更新方式


在 pimary

nsupdate
server 172.22.253.1
update add {$FQDN} 38400 in a {$IP}
send
update delete  {$FQDN}
send

rndc freeze {$dn  ***.***.tw }
rndc unfreeze {$dn  ***.***.tw }


rndc querylog
dnstop eth0

rndc status


在secondary

rndc reload {$dn  ***.***.tw }

2015年6月26日 星期五

dns and bind


SOA 中五個數字的定義
http://www.zytrax.com/books/dns/ch8/soa.html