解壓Linux.zip Linux的負載機鏈接:https://pan.baidu.com/s/1yrmsT3PYfuL9Wlh4FEYxaA 密碼:s72n
unzip Linux.zip
chmod 777 -R Linux/
cd Linux
sh installer.sh
按提示依次輸入如下:
輸入'n'
輸入'a'
輸入'n'
輸入'i'
輸入'f'
如果沒有安裝csh shell,如果輸入csh提示沒有該命令,需要安裝csh
yum -y install csh
安裝依賴包
yum -y install glibc.i686
yum -y install libstdc++.so.5
vi /etc/csh.cshrc
在文件的最后加上
source /opt/HP/HP_LoadGenerator/env.csh
vi /opt/HP/HP_LoadGenerator/env.csh
將第9行注釋,修改為:
setenv LD_LIBRARY_PATH ${M_LROOT}/bin:${M_LROOT}/lib:/usr/lib
在文件的最后加上:
setenv DISPLAY 0.0
(保存的時候使用:wq!)
輸入env,然后找到 HOSTNAME=xxxx
然后輸入hostname,查看hostname的值,如果和上面env的值不一樣,修改hosts文件
vi /etc/hosts 把127.0.0.1 后面加上xxxx,也就是env中hostname=的值,例如:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 xxxxxx
在后面加上xxxx
useradd -g 0 -s /bin/csh lr_test
su lr_test
cd /opt/HP/HP_LoadGenerator/bin
./verify_generator
啟動LR 負載端:
cd /opt/HP/HP_LoadGenerator/bin
./m_daemon_setup start
如果成功的話會提示:m_agent_daemon ( 進程的PID ),
如果失敗的話會提示:m_agent_daemon ( is down)解決方法參考http://blog.sina.com.cn/s/blog_62079f62010199vm.html的
最后
再次檢查是否啟動成功
ps -ef | grep m_agent_daemon
在windows上打開Controller端,
建立場景, 選擇要執行的腳本,在Design模式下,點擊 右邊的Generators,
在彈出的小窗口中點擊Add, 添加新的Load Generator,
在name處填寫linux的IP地址,在Platform處,選擇UNIX,
點擊more,在Unix Environment 標簽下, 勾選Don't use RSH 項。
點擊 “OK”按鈕,
在Load Generators 頁面中選擇在剛添加的負載機上, 點擊“Connect”, 連接成功
出現問題解決方法:
1、修復/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory問題
yum -y install glibc.i686
2、/opt/HP/HP_LoadGenerator/bin/lrv/chk_thread_lmt: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
yum -y install libstdc++.so.5