Linux下安裝LoadRunner(LoadGenerator)
1. 在HP的官方網(wǎng)站上下載LoadRunner9.5 的Linux安裝程序[T7177-15009.iso],安裝文檔[hp_man_LRIG9.50_01_pdf.pdf];
安裝程序包括Hp、Ibm、Linux、Solaris系統(tǒng)的支持(LR9.0對(duì)應(yīng)安裝文件為[TLRNUX900WC_00.zip])。
2. 安裝包的處理:
1. ZIP解壓:unzip TLRNUX900WC_00.zip
2. 掛載ISO:mkdir /mnt/LoadRunner ; mount -t iso9660 -o loop T7177-15009.iso /mnt/LoadRunner
3. 開(kāi)始安裝,以LR9.5為例:
/mnt/LoadRunner/Linux/installer.sh
按提示操作,直接Next到完成。
4. 添加用戶和環(huán)境變量:
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
5. 檢查運(yùn)行環(huán)境(在本機(jī)或使用VNC執(zhí)行):
su - higkoo
cd /opt/HP/HP_LoadGenerator/bin/
./verify_generator
6. 啟動(dòng)服務(wù)(用新增的用戶higkoo):
cd /opt/HP/HP_LoadGenerator/bin/
./m_daemon_setup start
7. 檢查是否啟動(dòng):
ps aux | grep m_agent_daemon
netstat -naop | grep 54345
8. 注意事項(xiàng):
開(kāi)啟端口54345或關(guān)閉防火墻(service iptables stop)
正確設(shè)置后用verify_generator的檢測(cè)結(jié)果是:
./verify_generator =================================================== HP Vuser Environment Verification Utility ===================================================
Product: HP LoadRunner 9.50 Version: 09.50.0000 Build: 3378 higkoolincn100ce5:
verify_generator...OK verify_generator...OK verify_generator...OK Don't forget to make sure that the name of the controller machine is also in .rhosts verify_generator...OK verify_generator...OK verify_generator...OK verify_generator...OK verify_generator...OK verify_generator...OK verify_generator...OK _______________________________________________
Summary: ________ Vuser Host higkoolincn100ce5: OK |
使用Controller連接,在“UNIX Environment Tab”下選擇“Don't use RSH ”即可連接Linux負(fù)載機(jī)。
若使用RSH連接,則負(fù)載機(jī)必須安裝RSH并正確配置,正如檢測(cè)過(guò)程中描述的“Don't forget to make sure that the name of the controller machine”。
補(bǔ)充,Linux下似乎只支持Web/Http協(xié)議的腳本。譬如WinSock協(xié)議,從名稱上都知道只適合Windows:
“Error (-81024): LR_VUG: The 'WinSock' type is not supported on 'LINUX' platforms .”
另外試了Java協(xié)議,確實(shí)不行,報(bào)錯(cuò)如下:
Error (-81024): LR_VUG: The 'General-Java' type is not supported on 'LINUX' platforms .
依賴庫(kù):yum -y --disablerepo=\* --enablerepo=AutoInstaller --nogpgcheck --skip-broken localinstall /mnt/CentOS_Final/CentOS/compat-libstdc++-33-3.2.3-61.i386.rpm
否則會(huì)報(bào):m_agent_daemon: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
注意hosts文件的配置,如果機(jī)器名和hosts里配置不一致也會(huì)導(dǎo)致LoadRunner啟動(dòng)失敗,
譬如:Error: Communication error: Failed to get the server host IP by calling the gethostbyname function.。
附上給LoadRunner定制的系統(tǒng)服務(wù)腳本(/etc/init.d/loadrunner):
# /etc/init.d/loadrunner
# Loadrunner負(fù)載生成器服務(wù)
DAEMON=m_daemon_setup
ARGV="$@"
DIR=/opt/HP/HP_LoadGenerator/bin/
USER=higkoo
UBIT="su - $USER -c "
$UBIT "cd $DIR && ./$DAEMON $ARGV"運(yùn)行服務(wù):
service loadrunner start
m_agent_daemon ( 1808 ),
posted on 2012-03-14 13:36 順其自然EVO 閱讀(2171) 評(píng)論(0) 編輯 收藏