2009年9月12日星期六

安全方面常使用到的one-way algorithm

我的理解就是Hash functions:
SHA
MD2
MD4
MD5
DSA , Digital Signature Algorithm, is a approved standard for Digital Signatures that utilizes SHA-1 hashing function

Operational assurance requirements and life cycle assurance requiements

学习到这里了纪录一下:
The operational assurance requirements specified in the Orange Book are as follows":
操作保险要求:

System Architecture //系统架构
System integrity //系统完整
Covert channel analysis //转换隧道分析
Trusted facility management //可信设备管理
Trusted recovery //可信恢复

the life cycle assurance requirements specified in the orange Book are as follows:
生命周期保险要求:

Security testing //安全测试
Design specification and testing //设计要求和测试
Configuration management //配制管理
trusted Distribution //可信发布

2009年9月10日星期四

嘗鮮Oracle11gR2 (vmwareserver+OEL5.3+Oracle11gR2)

oracle11gR2出來一段時間了,一直手懶,今天終於提起精神安裝了一下,嘗鮮一下:)

1.在vmware上面安裝OEL5.3版本的linux

安裝方法參考:http://www.oracle.com/technology/obe/11gr1_db/install/oel5gainst/oel5gainst.htm 儘管是oracle 11gR1的

2.解壓oracle下載下來的zip包,開始安裝,這裡遇到一個問題,就是直接在vmware oracle上面運行 runInstall,屏幕狂閃,根本就沒有辦法操作,沒有辦法使用Xmanager,遠程安裝.

3 配置xmanager安裝:

a. /etc/inittab中設置:

id:5:initdefault:

b. Enable XDMCP因為我這裡就是用了gnome所以配置就配置一個:

/etc/gdm/custom.conf

[xdmcp]
Enable=1

c. 重啟linux

d. 工作機使用xmanager Broadcast mode

4 開始安裝:

 

ora11gr2install1

ora11gr2install2

ora11gr2install3

ora11gr2install4

ora11gr2install5

ora11gr2install6

ora11gr2install7

ora11gr2install8

ora11gr2install9

少裝幾個rpm的包

[root@ora11gR2 Server]# rpm -Uvh libaio*
warning: libaio-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
        package libaio-0.3.106-3.2.x86_64 is already installed
        package libaio-0.3.106-3.2.i386 is already installed
[root@ora11gR2 Server]# rpm -Uvh libaio-0.3.106-3.2.x86_64.rpm
warning: libaio-0.3.106-3.2.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
        package libaio-0.3.106-3.2.x86_64 is already installed
[root@ora11gR2 Server]# rpm -Uvh libaio-devel-0.3.106-3.2.*
warning: libaio-devel-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:libaio-devel           ########################################### [ 50%]
   2:libaio-devel           ########################################### [100%]
[root@ora11gR2 Server]# rpm -Uvh sysstat*
warning: sysstat-7.0.2-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:sysstat                ########################################### [100%]
[root@ora11gR2 Server]# rpm -Uvh unixODBC-*
warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
        libqt-mt.so.3 is needed by unixODBC-kde-2.2.11-7.1.i386
        qt >= 2.1 is needed by unixODBC-kde-2.2.11-7.1.i386
        libqt-mt.so.3()(64bit) is needed by unixODBC-kde-2.2.11-7.1.x86_64
        qt >= 2.1 is needed by unixODBC-kde-2.2.11-7.1.x86_64
[root@ora11gR2 Server]# rpm -Uvh unixODBC-2.2.11-7.1.*
warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:unixODBC               ########################################### [ 50%]
   2:unixODBC               ########################################### [100%]

[root@ora11gR2 Server]#
[root@ora11gR2 Server]# rpm -Uvh unixODBC-devel-2.2.11-7.1.*
warning: unixODBC-devel-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:unixODBC-devel         ########################################### [ 50%]
   2:unixODBC-devel         ########################################### [100%]
[root@ora11gR2 Server]#

 

 

ora11gr2install10

 

ora11gr2install11

ora11gr2install12

ora11gr2install13

ora11gr2install14

ora11gr2install15

[root@ora11gR2 Server]# cd /u01/app/oraInventory/
[root@ora11gR2 oraInventory]# ls
ContentsXML       logs                     oraInst.loc     oui
install.platform  oraInstaller.properties  orainstRoot.sh
[root@ora11gR2 oraInventory]# ./orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@ora11gR2 oraInventory]# pwd
/u01/app/oraInventory
[root@ora11gR2 oraInventory]# cd ../oracle/product/11.2.0/db_1/
[root@ora11gR2 db_1]# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
[root@ora11gR2 db_1]#

 

ora11gr2install16

完成!

2009年9月6日星期日

linux cmd方式 下製作iso,并burn iso

 

1. 製作 iso文件 dd if=/dev/dvd of=dvd.iso # for dvd

2.檢查那個刻錄設備

[root@CRRACTEST2 ~]# cdrecord -scanbus
Cdrecord-Clone 2.01 (cpu-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to http://bugzilla.redhat.com/bugzilla
Note: The author of cdrecord should not be bothered with problems in this version.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version (schily - Red Hat-scsi-linux-sg.c-1.83-RH '@(#)scsi-linux-sg.c        1.83 04/05/20 Copyright 1997 J. Schilling').
scsibus5:
       5,0,0   500) 'TSSTcorp' 'DVD+-RW TS-H653B' 'D300' Removable CD-ROM
        5,1,0   501) *
        5,2,0   502) *
        5,3,0   503) *
        5,4,0   504) *
        5,5,0   505) *
        5,6,0   506) *
        5,7,0   507) *
[root@CRRACTEST2 ~]#

3.刻錄

[root@CRRACTEST2 ~]# cdrecord -v -dao dev=5,0,0  dvd.iso
Cdrecord-Clone 2.01 (cpu-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to http://bugzilla.redhat.com/bugzilla
Note: The author of cdrecord should not be bothered with problems in this version.
TOC Type: 1 = CD-ROM
scsidev: '5,0,0'
scsibus: 5 target: 0 lun: 0
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version (schily - Red Hat-scsi-linux-sg.c-1.83-RH '@(#)scsi-linux-sg.c        1.83 04/05/20 Copyright 1997 J. Schilling').
SCSI buffer size: 64512
atapi: 1
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : 'TSSTcorp'
Identifikation : 'DVD+-RW TS-H653B'
Revision       : 'D300'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x0011
Profile: 0x0015
Profile: 0x002B
Profile: 0x001B
Profile: 0x001A
Profile: 0x0014
Profile: 0x0013
Profile: 0x0011 (current)
Profile: 0x0010
Profile: 0x000A
Profile: 0x0009
Profile: 0x0008
cdrecord: Found DVD media: using cdr_mdvd.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
Drive buf size : 1376256 = 1344 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data  2269 MB
Total size:     2606 MB (258:11.06) = 1161830 sectors
Lout start:     2606 MB (258:13/05) = 1161830 sectors
Current Secsize: 2048
  ATIP start of lead in:  -150 (00:00/00)
Disk type:    unknown dye (reserved id code)
Manuf. index: -1
Manufacturer: unknown (not in table)
Blocks total: 2298496 Blocks current: 2298496 Blocks remaining: 1136666
scsi_set_streaming
Starting to write CD/DVD at speed 17 in real SAO mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
trackno=0
BURN-Free is OFF.
BURN-Free is OFF.
Performing OPC...
Sending CUE sheet...
cdrecord: WARNING: Drive returns wrong startsec (0) using -150
Starting new track at sector: 0
Track 01:    0 of 2269 MB written.

Track 01:  237 of 2269 MB written (fifo  98%) [buf  99%]  68.4x.

Track 01: 2269 of 2269 MB written (fifo 100%) [buf  99%] 114.5x.
Track 01: Total bytes read/written: 2379427840/2379427840 (1161830 sectors).
Writing  time:  218.057s
Average write speed  76.8x.
Min drive buffer fill was 8%
Fixating...
Fixating time:   10.764s
cdrecord: fifo had 37479 puts and 37479 gets.
cdrecord: fifo was 4 times empty and 7479 times full, min fill was 0%.

 

ref: http://www.cyberciti.biz/faq/linux-burn-iso-images-to-cds-and-cd-rws-howto/

2009年9月2日星期三

如何kill一個 zombie process?

發現production環境上有一個zombie,如何殺掉呢?

top - 13:13:38 up 23 days, 19:49,  1 user,  load average: 2.58, 3.43, 3.75
Tasks: 1527 total,   3 running, 1523 sleeping,   0 stopped,  1 zombie

[oracle@oracle02 ~]$ ps aux |awk '{print $8 " " $2}' |grep -w Z
Z 10460

什麽東西呢?
[oracle@oracle02 ~]$ ps -ef |grep 10460
oracle   10460 10431  0 Aug10 ?        00:00:00 [Xsession] <defunct>
oracle   22374 26077  0 13:11 pts/1    00:00:00 grep 10460
[oracle@oracle02 ~]$ kill -9 10460

top發現並沒有去掉,查看一下他的父進程是個啥?

[oracle@oracle02 ~]$ ps -ef |grep 10431
oracle   10431  8971  0 Aug10 ?        00:00:00 /usr/bin/gnome-session
oracle   10460 10431  0 Aug10 ?        00:00:00 [Xsession] <defunct>
oracle   10493 10431  0 Aug10 ?        00:00:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients
oracle   30789 26077  0 13:15 pts/1    00:00:00 grep 10431
[oracle@oracle02 ~]$ kill -9 10431

乾淨了,這個gnome-session是幹嘛的呢?再查一下

參考:http://www.cyberciti.biz/tips/killing-zombie-process.html

2009年9月1日星期二

Guidelines for browsing design

聽一個講座關於wireless Mobile device 開發的,講到User Interface 設計時應該注意的技巧,覺得很有用,記錄一下:

- Use hyperlinks to replace other GUI components 

#尽量写hyperlink,不要用gui components ,我的理解是平臺獨立性


- Avoid horizontal Scrolling, use vertical  scrolling as possible 

#尽量避免横向的scroll bar


- Organize the content hierarchically 


- Arrange the hyperlink from top to bottom by importance

#根据重要性来组织内容


- Number the hyperlinks( for one-handed interaction) 

#控制hyperlink的密度


- Use link navigation for information searching.

Web technology Layers

學習一個講座,覺得梳理的不錯記錄一下,備查:

Client Layer:
Ajax, HTML/CSS , Flash/RIA
javaScript, Widgets, DOM


protocol Layer:
Soap, XML-RPC, REST
HTTP/HTTPS


Structure Layer
JSON  ,XML, RSS/ATOM
Text, JS-Object, Custom


Server Layer
SOA/WOA , SaaS, Traditional
Web Services, Open APIs ,Custom APIs