2008年7月5日星期六

[原]联众去大部广告版

最新版的联众广告实在犯人,并且在Advert文件夹下全是广告,并且一会儿就自动下载十几M,太可怕了!!!
绿色版还没出现,只好自己动手了,胡乱改了下,没太多时间搞.

效果:
把开头,结尾的广告去了;
禁止下载广告到Advert;
至于窗体上的广告只要把Advert文件夹清空,还有几个目录下的广告htm文件删掉就可以了

地址:
http://www.mediafire.com/?m3wmpegt4i4

2007年10月21日星期日

[捷报]

kao,第一轮竟然侥幸刚刚过了

2007年10月20日星期六

[随记]自由了

今天好像blog解封了,纪念一下,毕竟是千年一遇的事情,虽然也许是昙花一现
不用代理就是舒服啊,速度快... ...画面好像也变得清晰了

[随记]dididi...dododo

牙终于拆了,一年的痛苦终于彻底的画上了逗号...

"保持器要带2年"
"什么!!2年??!!!"

唉~~~苦命的人儿今天面试了,连蒙带骗终于弄到了华为的面试机会(本来是会计学专业注册资料的时候说的计算机;没有学位证骗他说有),不过第一轮技术面试好像还不错,那个面试官年龄看起来也就是二十八九岁,对我面试的时间挺长,技术好像挺满意,还多问了我一些别的东西,可能是后面几轮的问题,感动死我了;笔试题很简单,主要是技术之外的比如对一些事情的认识,看法,以及问题的处理方法,人与人之间,唉,总之是对一个人全面的了解,现在要等通知了
问题是还没弄到学位证,面试官说这个月弄不到也不太好办,如果弄不到要给他通知一声,让他也别出岔子;唉~~`人人都说要爱国,可是我一个会计系的学生好不容易有一个机会去大公司做软件开发却因为没有会计系的学位证而失之交臂,人生最大的遗憾莫过于此,,,,为什么社会要这么不懈的折磨一个大好青年???
所以我想大声的喊:I HATE THIS COUNTRY!
唉~~听天由命吧~~

2007年10月5日星期五

[转]jvm opcode instruction

A.3 Instructions by Category

This section contains a listing of the instructions and what they do, grouped by category. Here is a key to the descriptions:

aThe top slot of the stack. May be an int, float, or reference.
bThe second stack slot. May be an int, float, or reference.
cThe third stack slot. May be an int, float, or reference.
dThe fourth stack slot. May be an int, float, or reference.
abThe long or double on top of the stack, made up of slots a and b.
cdThe long or double second on the stack, made up of slots c and d.

A.3.1 Arithmetic

MnemonicArgumentsDescription
daddAdd double (ab+cd)
dcmpgCompare double
dcmplCompare double
ddivDivide double (ab/cd)
dmulMultiply double (ab*cd)
dnegNegate double (-ab)
dremRemainder double (ab%cd)
dsubSubtract double (ab-cd)
faddAdd float (a+b)
fcmpgCompare float
fcmplCompare float
fdivDivide float (a/b)
fmulMultiply float (a*b)
fnegNegate float (-a)
fremRemainder float (a%b)
fsubSubtract float (a-b)
i2bConvert int to byte
i2cConvert int to char
i2sConvert int to short
iaddAdd int (a+b)
iandBitwise and ints (a & b)
idivDivide ints (a/b)
imulMultiply ints (a*b)
inegNegate int (-a)
iorBitwise or ints (a b)
iremRemainder int (a%b)
ishlShift int left (a << b)
ishrShift int right (a >> c)
isubSubtract int (a-b)
iushrUnsigned shift int right (a >>> c)
ixorBitwise xor ints (a ^ b)
laddAdd long (ab+cd)
landBitwise and longs (ab & cd)
lcmpCompare longs
ldivDivide long (ab/cd)
lmulMultiply long (ab*cd)
lnegNegate long (-ab)
lorBitwise or longs (ab cd)
lremRemainder longs (ab%cd)
lshlShift long left (bc << 9)
lshrShift long right (bc >> 9)
lsubSubtract long (ab-cd)
lushrUnsigned shift long right (bc >>> 9)
lxorBitwise x or longs (ab ^ cd)

A.3.2 Array

MnemonicArgumentsDescription
aaloadPush array element a from array b
aastoreStore a in array element b of array c
anewarrayclassCreate array of class, length a
arraylengthLength of array a
athrowThrow exception a
baloadPush array element a from array b
bastoreStore a in array element b of array c
caloadPush array element a from array b
castoreStore a in array element
daloadPush array element a from array b
dastoreStore ab in array element
faloadPush array element a from array b
fastoreStore a in array element b of array c
ialoadPush array element a from array b
iastoreStore a in array element
laloadPush array element a from array b
lastoreStore ab in array element c of array d
multianewarrayclass nCreate multidimensional array with first n dimensions initialized to lengths a, b, c. . .
newarraytypeCreate array of type, length a
saloadPush array element a from array b
sastoreStore a in array element b of array c

A.3.3 Constant

MnemonicArgumentsDescription
aconst_nullPush null reference
bipushnPush int between ?28 and 127
dconst_0Push 0 (double)
dconst_1Push 1 (double)
fconst_0Push 0 (float)
fconst_1Push 1 (float)
fconst_2Push 2 (float)
iconst_0Push 0 (int)
iconst_1Push 1 (int)
iconst_2Push 2 (int)
iconst_3Push 3 (int)
iconst_4Push 4 (int)
iconst_5Push 5 (int)
iconst_m1Push ?(int)
lconst_0Push 0 (long)
lconst_1Push 1 (long)
ldcxPush x (a constant int, float, or String)
ldc_wxPush x (a constant int, float, or String)
ldc2_wxPush x (a constant long or double)
sipushnPush int between ?2,768 and 32767

A.3.4 Control

MnemonicArgumentsDescription
areturnReturn reference from method
dreturnReturn double from method
freturnReturn float from method
gotolabelBranch always
goto_wlabelBranch always to label
if_acmpeqlabelBranch if a == b
if_acmpnelabelBranch if a != b
if_icmpeqlabelBranch if a > b
if_icmpgelabelBranch if a >= b
if_icmpgtlabelBranch if a > b
if_icmplelabelBranch if a <= b
if_icmpltlabelBranch if a < b
if_icmpnelabelBranch if a != b
ifeqlabelBranch if a == 0
ifgelabelBranch if a >= 0
ifgtlabelBranch if a > 0
iflelabelBranch if a <= 0
ifltlabelBranch if a < 0
ifnelabelBranch if a != 0
ifnonnulllabelBranch if a is not null
ifnulllabelBranch if a is null
ireturnReturn int from method
jsrlabelBranch to label; push return location
jsr_wlabelJump to label
lookupswitch

tag1: label1

tag2: label2...

default: labeln

Branch to label1 on tag1, label2 on tag2, . . . , labeln otherwise
lreturnReturn long from method
nopDo nothing
retnBranch to location in variable n
returnReturn from method
tableswitch

n

label1

label2

. . .

default: labeln

Branch to label1 on n, label2 on n+1, . . . , labeln otherwise

A.3.5 Data Type Conversion

MnemonicArgumentsDescription
d2fConvert double ab to float
d2iConvert double ab to int
d2lConvert double ab to long
f2dConvert float a to double
f2iConvert float a to int
f2lConvert float a to long
i2dConvert int a to double
i2fConvert int a to float
i2lConvert int a to long
l2dConvert long ab to double
l2fConvert long ab to float
l2iConvert long ab to int

A.3.6 Object

MnemonicArgumentsDescription
checkcastclassThrow exception if a is not an instance of class
getfieldclass/field descPush object field from object a
getstaticclass/field descPush static field
instanceofclassPush 1 if a is class, 0 otherwise
invokeinterfaceclass/method desc nInvoke method through interface with n argument words
invokespecialclass/method descInvoke method directly
invokestaticclass/method descInvoke static method
invokevirtualclass/method descInvoke method virtually
newclassCreate new object of class
putfieldclass/field descStore a in object field
putstaticclass/field descStore a in static field

A.3.7 Stack Manipulation

MnemonicArgumentsDescription
dupDuplicate a
dup_x1Duplicate a, insert under b
dup_x2Duplicate a, insert under c
dup2Duplicate ab
dup2_x1Duplicate ab, insert under c
dup2_x2Duplicate ab, insert under d
popRemove a
pop2Remove ab
swapSwap a and b

A.3.8 Synchronization

MnemonicArgumentsDescription
monitorenterGain control of monitor of a
monitorexitRelease monitor of a

A.3.9 Variable

MnemonicArgumentsDescription
aloadnPush local variable n
aload_0Push local variable 0
aload_1Push local variable 1
aload_2Push local variable 2
aload_3Push local variable 3
astorenStore a in local variable n
astore_0Store a in local variable 0
astore_1Store a in local variable 1
astore_2Store a in local variable 2
astore_3Store a in local variable 3
dloadnPush local variable n
dload_0Push local variable 0
dload_1Push local variable 1
dload_2Push local variable 2
dload_3Push local variable 3
dstorenStore ab in local variable n
dstore_0Store ab in local variable 0
dstore_1Store ab in local variable 1
dstore_2Store ab in local variable 2
dstore_3Store ab in local variable 3
floadnPush local variable n
fload_0Push local variable 0
fload_1Push local variable 1
fload_2Push local variable 2
fload_3Push local variable 3
fstorenStore a in local variable n
fstore_0Store a in local variable 0
fstore_1Store a in local variable 1
fstore_2Store a in local variable 2
fstore_3Store a in local variable 3
iincn incrementIncrement local variable
iloadnPush local variable n
iload_0Push local variable 0
iload_1Push local variable 1
iload_2Push local variable 2
iload_3Push local variable 3
istorenStore a in local variable n
istore_0Store a in local variable 0
istore_1Store a in local variable 1
istore_2Store a in local variable 2
istore_3Store a in local variable 3
lloadnPush local variable n
lload_0Push local variable 0
lload_1Push local variable 1
lload_2Push local variable 2
lload_3Push local variable 3
lstorenStore ab in local variable n
lstore_0Store ab in local variable 0
lstore_1Store ab in local variable 1
lstore_2Store ab in local variable 2
lstore_3Store ab in local variable 3
wideinstruction argumentsLike instruction, except using wider range of values

2007年10月3日星期三

[原]oxygen.xml.editor.8.2.keygen&patch

今天下了一个好插件,处理xml的,注册机混淆了,研究了下jvm的opcode,把oxygen的xml editor(eclipse plugin)注册机发上来,
只要把plugin下的oxygenEclipse.jar中的ro.sync.D.A.class反编译一下,替换里边的数组为注册机中的数组,这个注册机就能用了.代码:

package cn.com;
import java.io.*;
import java.security.*;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.text.SimpleDateFormat;
import java.util.Date;
import sun.misc.BASE64Encoder;

public class OxygenKeygen {

public static void main(String args[]) {
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in));
try {
System.out.println(z[5]);
System.out.println(z[7]);
System.out.println(z[5]);
System.out.println();
String s = a(bufferedreader, z[3]);
String s1 = a(bufferedreader, z[6]);
System.out.println();
System.out.println(z[5]);
System.out.println(z[4]);
System.out.println(z[5]);
System.out.println();
System.out.println((new OxygenKeygen(s, s1)).d());
System.out.println();
System.out.println(z[5]);
} catch (Exception exception) {
exception.printStackTrace();
}
try {
bufferedreader.close();
} catch (IOException _ex) {
}
}

private static PrivateKey a() throws InvalidKeySpecException, NoSuchAlgorithmException {
PKCS8EncodedKeySpec pkcs8encodedkeyspec = new PKCS8EncodedKeySpec(d);
return KeyFactory.getInstance(z[23]).generatePrivate(pkcs8encodedkeyspec);
}

private static String a(String s) {
StringBuffer stringbuffer;
int i;
int j;
boolean flag;
flag = f;
stringbuffer = new StringBuffer(s);
i = stringbuffer.length();

for (j = 0; j < i; j++) {
char ch = Character.toUpperCase(stringbuffer.charAt(j));
if (z[2].indexOf(ch) == -1)
stringbuffer.setCharAt(j, '_');
}
return stringbuffer.toString();
// if(!flag) goto _L2; else goto _L1
// _L1:
// z[2]; //z[2]
// _L7:
// Character.toUpperCase(stringbuffer.charAt(j)); //z[2],CH
// indexOf();
// -1;
// JVM INSTR icmpne 53; // 判断ch是否在z[2]中,在goto L4,continue;不在则break到line:102
// goto _L3 _L4
// _L3:
// break MISSING_BLOCK_LABEL_46;
// _L4:
// continue; /* Loop/switch isn't completed */
// stringbuffer.setCharAt(j, '_'); //maybe here is MISSING_BLOCK_LABEL_46;
// j++;
// _L2:
// if(j < i) goto _L1; else goto _L5
// _L5:
// stringbuffer.toString();
// if(flag) goto _L7; else goto _L6
// _L6:
// return;
}

private static String a(BufferedReader bufferedreader, String s) throws IOException {
boolean flag;
flag = f;
Object obj = null;
// _L2:

String s1;
do {
System.out.print(s);
System.out.flush();

s1 = bufferedreader.readLine();
} while (s1 == null || s1.trim().length() == 0);
// _L4:
// // JVM INSTR ifnull 6;
// // goto _L1 _L2
// _L1:
// s1.trim();
// if(flag) goto _L4; else goto _L3
// _L3:
// if(flag) goto _L6; else goto _L5
// _L5:
// length();
// JVM INSTR ifeq 6;
// goto _L7 _L2
// _L7:
// s1;
// _L6:
return s1;
}

public OxygenKeygen(String s, String s1) {
b = null;
c = null;
b = s;
c = s1;
}

private String b() throws Exception {
StringBuffer stringbuffer = new StringBuffer();
stringbuffer.append(a(b));
stringbuffer.append(a(c));
stringbuffer.append(a);
stringbuffer.append("0");
stringbuffer.append(z[16]);
stringbuffer.append(a(z[20]));
stringbuffer.append(a(z[22]));
stringbuffer.append(a(z[21]));
return stringbuffer.toString();
}

private String c() throws Exception {
Signature signature = Signature.getInstance(z[0]);
signature.initSign(a());
signature.update(b().getBytes(z[1]));
return (new BASE64Encoder()).encode(signature.sign());
}

private String d() throws Exception {
StringBuffer stringbuffer = new StringBuffer();
stringbuffer.append((new StringBuilder(z[8])).append(b).toString()).append('\n');
stringbuffer.append((new StringBuilder(z[13])).append(c).toString()).append('\n');
stringbuffer.append(z[11]).append(a).append('\n');
stringbuffer.append(z[15]).append('\n');
stringbuffer.append(z[9]).append(z[16]).append('\n');
stringbuffer.append(z[18]).append(z[20]).append('\n');
stringbuffer.append(z[12]).append(z[10]).append('\n');
stringbuffer.append(z[19]).append(z[14]).append('\n');
stringbuffer.append((new StringBuilder(z[17])).append(c()).toString());
return stringbuffer.toString();
}

private static final String a;
private String b;
private String c;
private static final byte d[];
public static boolean e;
public static boolean f;
private static String z[];

static {
String as[];
as = new String[25];
as[0] = "1G\b\026\020\013{!c4#";
as[1] = "7[\017\037";
as[2] = " N\rd\"$H\001n-)C\007j(2^\033t37Y\036\177=;?x\025TV:\177\020_[/\026\nI\"";
as[3] = "0j.N\024\026}(S\016\raiI\006\017ji\035G";
as[4] = ".f*B\t\021js\007";
as[5] = "_2t\032Z_2t\032Z_2t\032Z_2t\032Z_2t\032Z_2t\032Z_2t\032Z_2t\032Z_2t\032Z_2t\032Z";
as[6] = "!`$W\006\fvi\007GB/i\007GB/i\035G";
as[7] = "_2t\007[\rW0@\002\f w\177*./\fC\016\026`;\007\021Z!{\007\013\013l,I\024\007/.B\t\007}(S\b\020/t\032Z";
as[8] = "0j.N\024\026}(S\016\ra\026i\006\017jt";
as[9] = ",z$E\002\020P&A8.f*B\t\021j:\032";
as[10] = ":B\005\n\"\006f=H\025NW\032k3OK,E\022\005h,U";
as[11] = "&n=BZ";
as[12] = "!`$W\b\fj'SZ";
as[13] = "!`$W\006\fvt";
as[14] = "Z#{";
as[15] = "&z;F\023\013`'\032J";
as[16] = "S?y\027";
as[17] = "1H\007\032";
as[18] = "!n=B\000\r}0\032";
as[19] = "4j;T\016\rat";
as[20] = "'a=B\025\022} T\002";
as[21] = "97e\007U?";
as[22] = "9W\004kJ'k S\b\020#i\1774.[dc\002\000z.@\002\020R";
as[23] = "&\\\b";
as[24] = "/BdC\003Ov0^\036";
z = as;

byte[] con=new byte[] {0x62,15,73,39,103};
for (int k = 0; k < z.length; k++) {
char[] ch = z[k].toCharArray();
// if (ch.length < 1) {
// if (k < 0) {
// }
//
// }
for (int i = 0; i < ch.length; i++) {
ch[i] ^= con[i%5];
}
z[k] = new String(ch);
}

// for (int l = 0; l < z.length; l++) {
// System.out.println("" + l + ": " + z[l]);
// }

// break MISSING_BLOCK_LABEL_343;
// local;
// toCharArray();
// JVM INSTR dup ;
// JVM INSTR arraylength .length;
// JVM INSTR swap ;
// int i = 0;
// JVM INSTR swap ;//ca,length
// JVM INSTR dup_x1 ;//len,ca,len
// 1; //len,ca,len,1
// JVM INSTR icmpgt 322;//len,ca
// goto _L1 _L2
// _L1:
// JVM INSTR dup ;//len,ca,ca
// i; //len,ca,ca,i
// _L4:
// JVM INSTR dup2 ; //len,ca,ca,i,ca,i
// JVM INSTR caload ;//len,ca,ca,i,ca[i]
// byte byte0;
// switch(i % 5)
// {
// case 0: // '\0'
// byte0 = 0x62;
// break;
//
// case 1: // '\001'
// byte0 = 15;
// break;
//
// case 2: // '\002'
// byte0 = 73;
// break;
//
// case 3: // '\003'
// byte0 = 39;
// break;
//
// default:
// byte0 = 103;
// break;
// }
// byte0; //len,ca,ca,i,ca[i],byte0
// JVM INSTR ixor ;//len,ca,ca,i,ca[i]^byte0
// (char); //len,ca,ca,i,char
// JVM INSTR castore ;//len,ca {ca[i]=char} *****
// i++;
// JVM INSTR swap ; //ca,len
// JVM INSTR dup_x1 ; //len,ca,len
// JVM INSTR ifne 322;//if (len!=0) len,ca
// goto _L3 _L2
// _L3:
// JVM INSTR dup2 ;
// JVM INSTR swap ;
// goto _L4
// _L2:
// JVM INSTR swap ; //ca,len
// JVM INSTR dup_x1 ;//len,ca,len
// i; //len,ca,len,i
// JVM INSTR icmpgt 245; //len,ca
// goto _L5 _L1
// _L5:
// JVM INSTR new #153 ; //len,ca
// JVM INSTR dup_x1 ; //ca,len,ca
// JVM INSTR swap ; //ca,ca,len
// String();
// intern();
// JVM INSTR swap ;
// JVM INSTR pop ;
// JVM INSTR ret 0;
a = (new SimpleDateFormat(z[24])).format(new Date());
d = (new byte[] { 48, -126, 1, 76, 2, 1, 0, 48, -126, 1, 44, 6, 7, 42, -122, 72, -50, 56, 4, 1, 48, -126, 1, 31, 2, -127, -127, 0, -3, 127, 83, -127,
29, 117, 18, 41, 82, -33, 74, -100, 46, -20, -28, -25, -10, 17, -73, 82, 60, -17, 68, 0, -61, 30, 63, -128, -74, 81, 38, 105, 69, 93, 64, 34,
81, -5, 89, 61, -115, 88, -6, -65, -59, -11, -70, 48, -10, -53, -101, 85, 108, -41, -127, 59, -128, 29, 52, 111, -14, 102, 96, -73, 107, -103,
80, -91, -92, -97, -97, -24, 4, 123, 16, 34, -62, 79, -69, -87, -41, -2, -73, -58, 27, -8, 59, 87, -25, -58, -88, -90, 21, 15, 4, -5, -125,
-10, -45, -59, 30, -61, 2, 53, 84, 19, 90, 22, -111, 50, -10, 117, -13, -82, 43, 97, -41, 42, -17, -14, 34, 3, 25, -99, -47, 72, 1, -57, 2, 21,
0, -105, 96, 80, -113, 21, 35, 11, -52, -78, -110, -71, -126, -94, -21, -124, 11, -16, 88, 28, -11, 2, -127, -127, 0, -9, -31, -96, -123, -42,
-101, 61, -34, -53, -68, -85, 92, 54, -72, 87, -71, 121, -108, -81, -69, -6, 58, -22, -126, -7, 87, 76, 11, 61, 7, -126, 103, 81, 89, 87, -114,
-70, -44, 89, 79, -26, 113, 7, 16, -127, -128, -76, 73, 22, 113, 35, -24, 76, 40, 22, 19, -73, -49, 9, 50, -116, -56, -90, -31, 60, 22, 122,
-117, 84, 124, -115, 40, -32, -93, -82, 30, 43, -77, -90, 117, -111, 110, -93, 127, 11, -6, 33, 53, 98, -15, -5, 98, 122, 1, 36, 59, -52, -92,
-15, -66, -88, 81, -112, -119, -88, -125, -33, -31, 90, -27, -97, 6, -110, -117, 102, 94, -128, 123, 85, 37, 100, 1, 76, 59, -2, -49, 73, 42,
4, 23, 2, 21, 0, -106, -49, 66, -124, -79, -94, -48, -108, 26, -46, -57, -110, -117, 14, -38, 1, -77, -127, 0, 14 });
}
}

ps:今天上午又看了下注册原理,其实就是A.class里边是公钥,注册时程序将注册码base64decode为密文,然后再用公钥解开,明文内容应该和注册名一致;
而注册码是作者用用户的注册名+作者的私钥生成的.
因此只需要用程序生成一对密钥,私钥放入keygen里边,公钥放入A.class里边覆盖原来的公钥byte[],就ok了.这次终于明白签名注册的原理了 :-)

2007年10月2日星期二

[原]MB开发环境安装手册(Linux)

MB开发环境安装手册(Linux)

(最终版已经丢失,现将以前放在网上的初稿贴过来)

一. 安装环境
操作系统:

fedora5
数据库:

DB2 8.2

开发环境:

Websphere Message Broker Runtime 6.0 ,MQ Series 6.0



二. 软件安装及参数配置

OS…………(fedora5) 安装mq后会有错误:
AMQ8101: WebSphere MQ error (893) has occurred.


以下内容OS为redhat9.0

首先解包,将software中的mb,mq,db2分别解包到mb,mq,db2文件夹中
1. Db2在linux上的安装:
./install
选择第一个和第三个包
Useradd db2ins1
Passwd db2ins1
修改文件opt/IBM/db2/V8.1/instance/db2iutil中的tail为tail –n (版本不一样,限于fedora5,rh9.0无此问题)

opt/IBM/db2/V8.1/instance/db2icrt -u db2ins1 db2ins1
su – db2ins1
db2start(此时如果说权限不够,是因为db2icrt执行失败)
db2 create database jjjj

验证安装是否正确可用connect to database,然后选择表查看


2.安装mq

mqlicense.sh –text_only …??
rpm -ivh MQSeriesRuntime-5.3.0-1.i386.rpm
rpm -ivh MQSeriesSDK-5.3.0-1.i386.rpm
rpm -ivh MQSeriesServer-5.3.0-1.i386.rpm
/opt/mqm/bin/amqiclen -x

//也可以安装man 用于了解命令

配置脚本:

crtmqm -lc -lf 8192 -lp 2 -ls 1 -q MB00

strmqm MB00

runmqsc MB00



define channel(SYSTEM.ADMIN.SVRCONN) chltype(SVRCONN) trptype(TCP)

define channel(CHANNEL1) chltype(SVRCONN) TRPTYPE(TCP)



def ql(deadq) defpsist(yes) maxdepth(20000) replace

def ql(ERRMSG) defpsist(yes) maxdepth(20000) replace

alter qmgr deadq(deadq)



def ql(in) maxdepth(10000) defpsist(yes) maxmsgl(1048576) replace

def ql(out) maxdepth(10000) defpsist(yes) maxmsgl(1048576) replace

def qr(99_IN) rname(IN) rqmname(MB99) xmitq(MB00_99) defpsist(yes) replace

def ql(MB00_99) usage(xmitq) defpsist(yes) maxdepth(10000) maxmsgl(1048576) trigger trigtype(first) trigdata(00_99) initq(system.channel.initq) replace

def chl(00_99) chltype(sdr) discint(1800) conname('192.168.1.199(6666)') xmitq(MB00_99) trptype(tcp) shortrty(10000) shorttmr(30) longtmr(300) longrty(999999999) batchsz(50) replace

def chl(99_00) chltype(rcvr) trptype(tcp) replace

def listener(MB00) trptype(tcp)

alter listener(MB00) trptype(tcp) port(6666) control(qmgr)

alter qmgr ccsid(819)

end
如果不通可以复位接收方的通道


3.安装MB runtime
Setup 即可


准备mb runtime参数:

1. 创建实例: /opt/IBM/db2/V8.1/instance/db2icrt –u kongpeng kongpeng

2. 创建数据库: su – kongpeng

db2start

db2 create database MBDB

db2 connect to MBDB

db2 bind ~/sqllib/bnd/@db2cli.lst grant public CLIPKG 5db2

db2 update database configuration for MBDB using dbheap 900

edit .odbc.ini

export ODBCINI

(odbc环境变量参数已经在profile中设定,因此无需再次设定.)

set lib path add ~/instance dir/sqllib/lib32

export LANG=EN (放入profile中)

将mqbrk里边的profile拷贝到root下,合并原先的默认profile.

将root用户加入组mqm,mqbrkrs就ok了

DB2 authorization ???

mqsicreatebroker MB -i kongpeng -a kongpeng -q MB00 -n MBDB -u kongpeng -p kongpeng

mqsicreateconfigmgr MB_MANAGER -i kongpeng -a kongpeng -q MB00

mqsistart MB

mqsistart MB_MANAGER



db2set db2codepage=1386

db2 terminate

db2 connect to sample



mqsilist

mqsilist brokername (此命令验证执行组是否能部署到此broker中)

(如果显示BIP8029E错误,说明broker没有建好,toolkit发布的信息不能部署到执行组中)

为什么mqsistop/mqsideletebroker会无响应呢? 可能是一开始建立broker的时候有错误………….



验证:

用本机上的toolkit建立一个简单的项目,消息流为从IN放入消息,OUT队列会收到消息,归档部署,linux机器上amqsput放入,amqsget查看!

注意:

因为用命令方式建立的队列名称默认是大写,所以toolkit中控件的属性名称以及linux中进行队列操作时要注意队列名称要大写,否则会找不到相应的队列.



4.安装cvs

rpm –ivh cvs-1.11.2-17.i386.rpm

groupadd cvs

useradd –g cvs –G cvs –d /cvsroot cvsroot

passwd cvsroot

chmod –R 770 /cvsroot

su - cvsroot

cd /cvsroot

mkdir project1

cvs –d /cvsroot/project1 init

cd /etc/xinetd.d

vi cvspserver (root)

将server_args去掉,server改为server = /cvsroot/cvs.run

su – cvsroot

建立cvs.run文件:

#!/bin/bash

/usr/bin/cvs –f --allow-root=/cvsroot/project1 pserver

chmod +x cvs.run

加入cvs服务:

vi /etc/services

cvspserver 2666/tcp #pserver cvs service

cvspserver 2666/udp #pserver cvs service

/etc/init.d/xinetd restart

/cvsroot/passwdgen.pl 生成密码的脚本

#!/usr/bin/perl

srand (time());

my $randletter = "(int (rand(26)) + (int (rand(1) + .5) % 2 ? 65 : 97))";

my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);

my $plaintext = shift;

my $crypttext = crypt ($plaintext, $salt);

print "${crypttext}\n";

/cvsroot/project/passwd username:passwd:cvsroot



验证: cvs -d :pserver:username@192.168.1.31:/cvsroot/project1 login

三. 系统配置



(Aix分区/安装,用户的建立,权限的分配,密码… …安装mq,db2,mb runtime,agent controller可能还要涉及到cvs的安装,使用

安装mq的时候要先装eclipse,java1.4.2,环境变量的设置,安装db2的时候要将计算机用户加入到db2admin组中)

















=====原始数据=====

本机配置:

========MQ===========

crtmqm -lc -lf 8192 -lp 2 -ls 1 -q MB99

strmqm MB99

runmqsc MB99



define channel(SYSTEM.ADMIN.SVRCONN) chltype(SVRCONN) trptype(TCP) mcauser('mqm')

define channel(CHANNEL1) chltype(SVRCONN) TRPTYPE(TCP) mcauser('mqm')



def ql(deadq) defpsist(yes) maxdepth(20000) replace

def ql(ERRMSG) defpsist(yes) maxdepth(20000) replace

alter qmgr deadq(deadq)



def ql(in) maxdepth(10000) defpsist(yes) maxmsgl(1048576) replace





def qr(29_IN) rname(IN) rqmname(MB) xmitq(MB) defpsist(yes) replace //29的远程队列

def qr(00_IN) rname(IN) rqmname(MB00) xmitq(MB00) defpsist(yes) replace //00的远程队列



def ql(MB) usage(xmitq) defpsist(yes) maxdepth(10000) maxmsgl(1048576) trigger trigtype(first) trigdata(99_29) initq(system.channel.initq) replace //29传输队列

def ql(MB00) usage(xmitq) defpsist(yes) maxdepth(10000) maxmsgl(1048576) trigger trigtype(first) trigdata(99_00) initq(system.channel.initq) replace //00传输队列



def chl(99_29) chltype(sdr) discint(1800) conname('192.168.1.29(6666)') xmitq(MB) trptype(tcp) shortrty(10000) shorttmr(30) longtmr(300) longrty(999999999) batchsz(50) replace

def chl(29_99) chltype(rcvr) trptype(tcp) replace //29的发送及接受通道



def chl(99_00) chltype(sdr) discint(1800) conname('192.168.1.31(6666)') xmitq(MB00) trptype(tcp) shortrty(10000) shorttmr(30) longtmr(300) longrty(999999999) batchsz(50) replace

def chl(00_99) chltype(rcvr) trptype(tcp) replace //00的发送及接受通道





def listener(MB99) trptype(tcp)

alter listener(MB99) trptype(tcp) port(6666) control(qmgr)

alter qmgr ccsid(819)

end

============MB=========

mqsicreateconfigmgr -i kongpeng -a $$ -q MB99 MB_MANAGER

mqsistart MB_MANAGER





192.168.1.29配置:

========MQ===========

crtmqm -lc -lf 8192 -lp 2 -ls 1 -q MB

strmqm MB

runmqsc MB



define channel(SYSTEM.ADMIN.SVRCONN) chltype(SVRCONN) trptype(TCP) mcauser('mqm')

define channel(CHANNEL1) chltype(SVRCONN) TRPTYPE(TCP) mcauser('mqm')



def ql(deadq) defpsist(yes) maxdepth(20000) replace

def ql(ERRMSG) defpsist(yes) maxdepth(20000) replace

alter qmgr deadq(deadq)



def ql(in) maxdepth(10000) defpsist(yes) maxmsgl(1048576) replace



def qr(99_IN) rname(IN) rqmname(MB99) xmitq(MB99) defpsist(yes) replace



def ql(MB99) usage(xmitq) defpsist(yes) maxdepth(10000) maxmsgl(1048576) trigger trigtype(first) trigdata(29_99) initq(system.channel.initq) replace

def chl(29_99) chltype(sdr) discint(1800) conname('192.168.1.199(6666)') xmitq(MB99) trptype(tcp) shortrty(10000) shorttmr(30) longtmr(300) longrty(999999999) batchsz(50) replace

def chl(99_29) chltype(rcvr) trptype(tcp) replace



def listener(MB) trptype(tcp)

alter listener(MB) trptype(tcp) port(6666) control(qmgr)

alter qmgr ccsid(819)

end

============MB=========

mqsicreatebroker MB -i kongpeng -a $$ -q MB -n MBDB

mqsistart MB

mqsicreateconfigmgr -i kongpeng -a $$ -q MB MB_MANAGER

mqsistart MB_MANAGER











---------------------------------------------------------------------------------------------------------------------

mqsicreateaclentry MB_MANAGER -u kongpeng -a -x F -p





Add an access control list (ACL) entry to the Configuration Manager for the user with the Message Brokers Toolkit local user ID. For example, if USERA connects to the Message Brokers Toolkit on COMPUTERA, which belongs to DOMAINA, and is trying to connect to Configuration Manager CMA:

USERA must exist as a user on the Configuration Manager system and belong to the mqm group

USERA could have one of the following ACL entries:

To create an ACL entry for USERA to connect with full Configuration Manager Proxy authority from any computer or domain, issue the following command:

mqsicreateaclentry CMA -u USERA -a -x F -p

To create an ACL entry for USERA to connect with full Configuration Manager Proxy authority from COMPUTERA only, issue the following command:

mqsicreateaclentry CMA -u USERA -m COMPUTERA -x F -p

To create an ACL entry for USERA to connect with full Configuration Manager Proxy authority from DOMAINA only, issue the following command:

mqsicreateaclentry CMA -u USERA -m DOMAINA -x F -p

If a domain name and computer name match, and an ACL entry specified the -m parameter, connection from either the domain or computer is acceptable because they are not considered to be different users.

ACLs are necessary for all connections to the Configuration Manager so the user who issues a command such as mqsideploy from the command line must also have appropriate ACL entries.







setmqaut -m MB -t qmgr -p kongpeng +all

dspmqaut -m MB -t qmgr -p kongpeng
free counters