准备篇
Centos服务器
loadrunner-11-load-generator.iso上传至服务器
确认安装c++
mkdir –p /usr/hxm/loadrunner建立文件夹
安装篇
挂载loadrunner-11-load-generator.iso
![图片](https://i-blog.csdnimg.cn/blog_migrate/1bb500839f6f1d3bc4499afbd948314e.png)
![图片](https://i-blog.csdnimg.cn/blog_migrate/653e55c77b3715e387805530e41cc3fe.png)
进入Linux目录下进行安装
输入./installer.sh弹出提示信息,根据提示信息进行安装完成
配置篇
添加用户
useradd -g 0 -s /bin/csh higkoo
cat /opt/HP/HP_LoadGenerator/env.csh >/etc/.login
cat /opt/HP/HP_LoadGenerator/env.csh >~higkoo/.cshrc
touch ~root/.rhosts ~higkoo/.rhosts
修改部分LR的配置(csh和bash有一个区别,就是在加载不同的shell时,可以加载不同的配置。
csh的默认配置在 /etc/csh.cshrc 下,bash的默认配置在 /etc/profile 。在这两个配置文件中,
可以加载一些shell的环境变量。
LR默认给出了一个环境变量的配置文件,文件在 /opt/HP/HP_LoadGenerator/env.csh 。可以看见*.csh这样的配置文件其实是csh的配置文件的格式)
将env.csh 这个配置目引入到csh的默认配置里面:vi /etc/csh.cshrc,在文件的最后一行加上 source/opt/HP/HP_LoadGenerator/env.csh、
切换到higkoo,验证是否安装成功
![图片](https://i-blog.csdnimg.cn/blog_migrate/46809f980fbbf13835b4e11b1b7eab2d.png)
验证一下程序安装的情况
验证程序为 /opt/HP/HP_LoadGenerator/bin/verify_generator
cd /opt/HP/HP_LoadGenerator/bin
./verify_generator设置一个DISPLAY 变量
修改env.csh文件(切换到root用户)
vi /opt/HP/HP_LoadGenerator/env.csh
文件最后方加上 setenv DISPLAY 0.0
![图片](https://i-blog.csdnimg.cn/blog_migrate/0d6f8364c080013c7811571d514b8abc.png)
再次验证程序
记得切换回higkoo用户,cd /opt/HP/HP_LoadGenerator/bin ./verify_generator
![图片](https://i-blog.csdnimg.cn/blog_migrate/68b2dc19204162430de3730ef69736f7.png)
/usr/local/bin/rar: /lib/ld-linux.so.2: badELF interpreter: No such file or directory解决方案
yum install glibc.i686
error while loading shared libraries: libstdc++.so.5:cannot open shared object file: No such file or directory解决方案
yum install libstdc++.so.5 –y
再次验证程序
![图片](https://i-blog.csdnimg.cn/blog_migrate/671f2cea77e6bc781c783de71be6f713.png)
启动篇
启动LR 负载端
cd /opt/HP/HP_LoadGenerator/bin
./m_daemon_setup start
控制台配置篇
controller控制台添加负载机
连接到负载机
![图片](https://i-blog.csdnimg.cn/blog_migrate/c4f6b10427687f2a50c83d61f553d20e.png)
注意事项篇
1、Windows客户端lr脚本保存路径不要用中文,否则linux-generator编译失败