一、下載LoadRunner LoadGenerator 和 compat-libstdc++-33-3.2.3-61
二、安裝compat-libstdc++-33-3.2.3-61,根據自己linux位數選擇安裝文件
[root@xiaoxitest opt]# rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm
三、安裝LoadRunner Generator
[root@xiaoxitest opt]# unzip LoadRunner_Generator_for_Linux.zip #解壓縮
[root@xiaoxitest opt]# chmod -R 777 Linux/ #給Linux文件夾賦權
[root@xiaoxitest Linux]# ./installer.sh #安裝
輸入n繼續安裝
輸入a同意用戶協議
輸入i開始安裝
輸入f完成安裝
四、增加LR負載端用戶
[root@xiaoxitest Linux]# useradd -g 0 -s /bin/csh loadrunner
五、修改LR配置
[root@xiaoxitest HP_LoadGenerator]# vim /etc/csh.cshrc
在文件的最后一行加上 source /opt/HP/HP_LoadGenerator/env.csh
[root@xiaoxitest bin]# vim /opt/HP/HP_LoadGenerator/env.csh
在文件最后加上 setenv DISPLAY 0.0
六、驗證
[root@xiaoxitest HP_LoadGenerator]# su loadrunner #切換到loadrunner用戶
[loadrunner@xiaoxitest HP_LoadGenerator]$ env
[loadrunner@xiaoxitest bin]$ cd /opt/HP/HP_LoadGenerator/bin/
[loadrunner@xiaoxitest bin]$ ./verify_generator
七、啟動LR負載機
[loadrunner@xiaoxitest bin]$ cd /opt/HP/HP_LoadGenerator/bin
[loadrunner@xiaoxitest bin]$ ./m_daemon_setup start
啟動報錯,在/tmp下查看錯誤日志
查看當前shell主機名稱是xiaoxitest,無法ping通
切換到root用戶下,更改hosts配置,把xiaoxitest指向127.0.0.1
再次切換到loadrunner用戶,重新運行程序,啟動成功。
[root@xiaoxitest bin]# su loadrunner
[loadrunner@xiaoxitest bin]$ ./m_daemon_setup start
m_agent_daemon ( 4719 ),
[loadrunner@xiaoxitest bin]$
[loadrunner@xiaoxitest bin]$ ps -ef | grep m_agent_daemon #檢查是否啟動成功
附錄: