1. 在HP的官方网站上下载LoadRunner9.5 的Linux安装程序[T7177-15009.iso],安装文档[hp_man_LRIG9.50_01_pdf.pdf];
x'bL7G
usw9K0安装程序包括Hp、Ibm、Linux、Solaris系统的支持(LR9.0对应安装文件为[TLRNUX900WC_00.zip])。
F c(Q5o0K3T9^Evn0?Z7F,jY"e02. 安装包的处理:
3K,jn5R;g01. ZIP解压:unzip TLRNUX900WC_00.zip51Testing软件测试网X2D4}!j@
2. 挂载ISO:mkdir /mnt/LoadRunner ; mount -t iso9660 -o loop T7177-15009.iso /mnt/LoadRunner51Testing软件测试网e
jZDS&gx U
2i"MVN
wm03. 开始安装,以LR9.5为例:51Testing软件测试网8Vd4NvX+v2e7lt0Q
/mnt/LoadRunner/Linux/installer.sh
)?!`@!i
c3G3ki0按提示操作,直接Next到完成。51Testing软件测试网nK]Q5g
E^,]:g
f:B0LuHf+E o-S04. 添加用户和环境变量:
s4{u#~i+A3]0useradd -g 0 -s /bin/csh higkoo51Testing软件测试网/d {]As W.Ia
cat /opt/HP/HP_LoadGenerator/env.csh > /etc/.login51Testing软件测试网fGy!B(Mh(p
cat /opt/HP/HP_LoadGenerator/env.csh >~higkoo/.cshrc
J{o5R)I0touch ~root/.rhosts ~higkoo/.rhosts51Testing软件测试网#y j!X*[)Jj
/].|.}
[uF0DhNj05. 检查运行环境(在本机或使用VNC执行):
3bY;Z/o6xq&j
l$E
n0su - higkoo
H7KD D&\K _F0cd /opt/HP/HP_LoadGenerator/bin/
9GmQ2`,f0./verify_generator51Testing软件测试网1[.H A i Vl"E$t
m
a)p)RBTDb;a+t06. 启动服务(用新增的用户higkoo):51Testing软件测试网5G7}^C{~4w$X:y(z
cd /opt/HP/HP_LoadGenerator/bin/51Testing软件测试网-^9j#U%P5i^C$bMau W8i
./m_daemon_setup start51Testing软件测试网_;~qY0krf
51Testing软件测试网8Mz C}.c-Ch
H A
7. 检查是否启动:51Testing软件测试网_)Q1`@2f!FT%[9S
ps aux | grep m_agent_daemon
A Q$Ku?VM0AX
p0netstat -naop | grep 54345
8\;H!VuP2p
i[0^!I6w
xP1`*i2U"h08. 注意事项:51Testing软件测试网v3m*zMk+O2|v+E @
开启端口54345或关闭防火墙(service iptables stop)51Testing软件测试网+R;G_*W
r e
D$hG;t
j[#]F051Testing软件测试网LV&hVRYo
正确设置后用verify_generator的检测结果是:51Testing软件测试网Bj.Sp,i8X!P
./verify_generator51Testing软件测试网0G-xnCucf ===================================================51Testing软件测试网0n0HZLGwg HP51Testing软件测试网!S5q$BQoL,W Vuser Environment Verification Utility51Testing软件测试网X%D*G9v$};D ===================================================51Testing软件测试网N1wl$o$WKt4{ 51Testing软件测试网U!q
x)l:` Product: HP LoadRunner 9.50 .L?
e4Ejes0Version: 09.50.000051Testing软件测试网1\`X |'w Build: 337851Testing软件测试网$M/Op/u'G T*Yb higkoolincn100ce5:51Testing软件测试网]4zo%M:M U(W;q"F p6X2q%kL)qL&R0verify_generator...OK51Testing软件测试网-r#rW'w ^g)v verify_generator...OK51Testing软件测试网efm7QP%g)[ verify_generator...OK )M3O$] KJU0Don't forget to make sure that the name of the controller machine51Testing软件测试网'e Fps)ds0V2C#N+pJ4q is also in .rhosts51Testing软件测试网(c0oC(x*@ verify_generator...OK51Testing软件测试网J;yhO^
s#t verify_generator...OK51Testing软件测试网
Gm m(~(p9Sd verify_generator...OK K*Js'gnT0w0verify_generator...OK 2z?t SX?0verify_generator...OK51Testing软件测试网r?a/B;xR
m)C#Ff verify_generator...OK 8gNKi[!x h?0verify_generator...OK k*]+a8_&j\X0_______________________________________________51Testing软件测试网$[K6J+_Qbj 51Testing软件测试网;Q_W'~*m
B'I8C Summary: [}y {"Rm
i)o4e0________ H-~/?5b'l2J0a_~a0Vuser Host higkoolincn100ce5: OK PaHp"X)j*?0 |
51Testing软件测试网?H1{:w `9NWj
使用Controller连接,在“UNIX Environment Tab”下选择“Don't use RSH ”即可连接Linux负载机。
!s @!S`p"DV8^8{0
51Testing软件测试网
~^D9_7`N
若使用RSH连接,则负载机必须安装RSH并正确配置,正如检测过程中描述的“Don't forget to make sure that the name of the controller machine”。51Testing软件测试网$kjni+u,XHc6^fm
&PbJ/Uz8|051Testing软件测试网!~?-i Mbq#y?5Y
补充,Linux下似乎只支持Web/Http协议的脚本。譬如WinSock协议,从名称上都知道只适合Windows:51Testing软件测试网3z ?4i+C9FNX cG
“Error (-81024): LR_VUG: The 'WinSock' type is not supported on 'LINUX' platforms .”51Testing软件测试网+j*jTE7Nxb'kI
另外试了Java协议,确实不行,报错如下:
lO i!U+o DOwL$S0 Error (-81024): LR_VUG: The 'General-Java' type is not supported on 'LINUX' platforms .51Testing软件测试网KVM:u*by,Ak
依赖库:yum -y --disablerepo=\* --enablerepo=AutoInstaller --nogpgcheck --skip-broken localinstall /mnt/CentOS_Final/CentOS/compat-libstdc++-33-3.2.3-61.i386.rpm51Testing软件测试网\l~de%|(Vyp
否则会报:m_agent_daemon: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory51Testing软件测试网P~d3fTu
注意hosts文件的配置,如果机器名和hosts里配置不一致也会导致LoadRunner启动失败,51Testing软件测试网6gvE.N tv+?
譬如:Error: Communication error: Failed to get the server host IP by calling the gethostbyname function.。51Testing软件测试网:ZX4N#w4k7g?$E(T
附上给LoadRunner定制的系统服务脚本(/etc/init.d/loadrunner):
Br
W/L#R"~0#!/bin/bash # /etc/init.d/loadrunner# Loadrunner负载生成器服务DAEMON=m_daemon_setupARGV="$@"DIR=/opt/HP/HP_LoadGenerator/bin/USER=higkooUBIT="su - $USER -c "
N {v3[(k(X_:O0$UBIT "cd $DIR && ./$DAEMON $ARGV" 运行服务:
U;Tt Y-^Y QA UI0service loadrunner start
3Z {S.\}g0m_agent_daemon ( 1808 ),
"ZRPpa1aV#z0