<VirtualHost *:80> ProxyPreserveHost On ProxyRequests Off ProxyVia Off ServerName www.mydomain.com ProxyPass / http://192.168.0.101:80/ ProxyPassReverse / http://192.168.0.101:80/ </VirtualHost>
centos 7 : mrtg setup Hint
# yum -y install net-snmp net-snmp-utils mrtg # vi /etc/snmp/snmpd.conf ----------------------- #com2sec notConfigUser default public com2sec local localhost owl com2sec mynetwork 192.168.0.10 owl group MyRWGroup v2c local group MyROGroup v2c mynetwork view all included .1 […]
centos 7 : php5.4 oci8 setup Hit
# rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm # rpm -ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm # pecl download oci8-1.4.9.tgz # tar xvzf oci8-1.4.9.tgz # cd oci8-1.4.9 # phpize if oracle server installed # ./configure if oracle client installed # ./configure --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib # ln -s /usr/include/oracle/11.2/client64/ /usr/lib/oracle/11.2/client64/lib/include # make all # make test # make install # cp modules/oci8.so /usr/lib64/httpd/modules/ […]
centos 7 : harddisk speed benchmark Hint : rsync, hdparm
sync; dd if=/dev/zero of=tmp4bench bs=1M count=1024; dd if=tmp4bench of=/dev/zero bs=1M count=1024; rm -f tmp4bench ; sync hdparm -Tt /dev/sda
oracle session Hint
select * from v$resource_limit where resource_name in ('processes','sessions');
centos 7 : cpu, mem info Hint
# free # cat /proc/meminfo | grep MemTotal # grep -c processor /proc/cpuinfo # grep ^processor /proc/cpuinfo | wc -l # grep 'cpu cores' /proc/cpuinfo | tail -1
apache : concurrent connection Hint
80 port concurrent connection count # netstat -nap | grep :80 | grep ESTABLISHED | wc -l 80 port connection count # netstat -n|grep -F :80|egrep '(ESTAB|SYN)'|awk '{print $5}'|sed 's/:[0-9]*//'|sort -u|wc -l all port connection count # netstat -nap | grep ESTABLISHED | wc -l
Excel vs Unix Timestemp : excel datevalue to java dateformat Hint!
Unix Timestamp from 1970 Excel Timestamp from 1900 Gap : (1970-1900) Days = 25569 Days String rtn = ""; try{ DateFormat format = new SimpleDateFormat("yyyyMMdd"); //format.setTimeZone(TimeZone.getTimeZone("UTC")); double excelDays = Double.parseDouble((String)valv.elementAt(0)); double unixDays = (excelDays-25569); java.util.Date unixTime = new java.util.Date((long) ( 86400000l * unixDays)); rtn = format.format(unixTime); out.println(rtn); } catch(Exception e) {}
centos 7 : install node.js
# yum repolist check epel .... # yum install npm nodejs # node -v # npm -v
mac os x : mov to mp4, ffmpeg -i
$ brew install ffmpeg $ ffmpeg -i /path/file.mov /path/file.mp4