linux(CentOS7.2)安装 Tsung

官网地址:http://tsung.erlang-projects.org/user_manual/introduction.html

运行环境:Linux CentOS 7.2

安装软件erlang(运行tsung需要的必备环境)

                perl5    (生成报表的脚本支持环境)

                 gnuplot (报表统计图片生成工具

                 tsung 

                Template(perl需要安装Template扩展

安装

1.安装erlang

1)wget http://www.erlang.org/download/otp_src_18.1.tar.gz      //下载erlang包

2)./configure               //执行成功后生成Makefile文件


3)make && make install        //

4) erl      //验证是否安装成功


2.安装perl5 gnuplot

1)yum install perl5 gnuplot          //安装perl5 gnuplot 

2)perl -v                                //验证perl是否安装成功


3)gnuplot                               //验证gnuplot是否安装成功


3.安装tsung

1) wget http://tsung.erlang-projects.org/dist/tsung-1.7.0.tar.gz      //下载tsung包

2)tar -zxvf tsung-1.7.0.tar.gz   //解压

3)cd tsung-1.7.0

4)./configure            //生成makefile

5)make 

6)make install 

7)tsung      //验证是否安装成功


4.安装Template

1)wget http://cpan.org/modules/by-module/Template/Template-Toolkit-2.26.tar.gz

2)tar -zxvf Template-Toolkit-2.26.tar.gz

3)cd Template-Toolkit-2.26/

4) perl Makefile.PL

5)make

6)make test

7)make install

5.安装gnuplot 

1)yum install -y gnuplot gd libpngzlib

6.配置环境变量

1)vi /etc/profile                            //erl和tsung都写自己安装的真实地址,然后在PATH后加上红框内的参数


2):wq!                          //保存退出

3)source /etc/profile          //使配置生效

测试~~~~~~~

1)cd /root

2)mkdir .tsung

3)cp /opt/software/develop/tsung-1.7.0/examples/http_simple.xml  /root/.tsung/tsung.xml                //将tsung安装目录下的http_simple.xml拷贝至rootr ./tsunggh 。注:红色字体写真实安装地址

4)tsung start                //运行tsung,执行的是/root/.tsung/tsung.xml 文件,如图


5)cd  /root/.tsung/log/20180712-1416           //进入Log文件,红色字体写真实的log文件名

6)/opt/software/develop/tsung-1.7.0/src/tsung_stats.pl               //执行命令生成图象报表,红色字体写tsung_stats.pl真实存在的路径,执行成功后生成如下图的文件


7)tar cvf 123.tar 20180712-1416                            //将日志文件打包拷贝到windows上

8)在windows打开report.html 可查看到图形报告,即该环境测试通过,接下来要学习的是如何配置有效的xml!!!



猜你喜欢

转载自blog.csdn.net/u010481688/article/details/80989162