Tsung CentOS 操作系统下搭建tsung性能测试环境_Part 1

时间:2023-02-04 06:42:17

CentOS 操作系统下搭建tsung性能测试环境_Part 1

by:授客 QQ1033553122

步骤1、下载软件安装包

CentOS-6.0-x86_64-bin-DVD1.iso

jdk-6u4-linux-x64-rpm.bin

erlang:

otp_src_17.1.tar.gz

下载地址:http://www.erlang.org/download.html

tsung

下载地址:http://tsung.erlang-projects.org/dist/

wxWidgets-3.0.1.tar.bz2:

下载地址:http://www.wxwidgets.org/downloads/

以上除了CentOS外也可通过我的分享连接进入下载

http://pan.baidu.com/s/1kTqmYWn


步骤2、安装erlang

[root@localhost software]#
tar -xzvf otp_src_17.1.tar.gz

[root@localhost software]#
cd otp_src_17.1


#配置erlang软件安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang

...

checking for cl...
no

configure:
error: no acceptable C compiler found in $PATH

See `config.log' for more
details.

#如上,提示错误,解决方法:安装C编译器gcc

[root@localhost
otp_src_17.1]# mount /dev/cdrom /mnt

[root@localhost
otp_src_17.1]# cd /etc/yum.repos.d/

[root@localhost
yum.repos.d]# ls

CentOS-Base.repo 
CentOS-Debuginfo.repo 
CentOS-Media.repo

[root@localhost
yum.repos.d]# vi local.repo #输入以下内容后保存

[centos]

name=centos

baseurl=file:///mnt

gpgcheck=0

enabled=1

[root@localhost
yum.repos.d]# mkdir bak

[root@localhost
yum.repos.d]# ls

bak 
CentOS-Base.repo 
CentOS-Debuginfo.repo 
CentOS-Media.repo  local.repo

[root@localhost
yum.repos.d]# mv CentOS*.* bak

[root@localhost
yum.repos.d]# yum clean all

Loaded plugins:
fastestmirror

Cleaning up
Everything

[root@localhost
yum.repos.d]# yum update

#安装前先查找是否存在对应软件包,往后就不再赘述

[root@localhost
yum.repos.d]# yum list | grep gcc

...

[root@localhost
yum.repos.d]# yum install gcc


#继续配置erlang软件安装环境

[root@localhost ~]# cd
./software/otp_src_17.1

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang

...

configure:
error: GNU make is required!

#如上,提示错误,解决方法:安装make

[root@localhost
otp_src_17.1]# yum install make

#继续配置erlang软件安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang

...

checking for perl...
no_perl

configure:
error: Perl is required to generate v2 to v1 mib converter
script

configure:
error: /bin/sh '/root/software/otp_src_17.1/lib/snmp/./configure'
failed for snmp/.

configure:
error: /bin/sh '/root/software/otp_src_17.1/lib/configure' failed
for lib

#如上,提示错误,解决方法:安装Perl

[root@localhost
otp_src_17.1]# yum install perl

#继续配置erlang的安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang

...

configure:
error: No curses library functions found

configure:
error: /bin/sh '/root/software/otp_src_17.1/erts/configure' failed
for erts

#如上,提示错误,解决方法:安装curese类库

[root@localhost
otp_src_17.1]# yum install ncurses

...

#提示已经安装,解决方法:安装开发版

[root@localhost
otp_src_17.1]# yum install ncurses-devel

#继续配置erlang的安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang

...

********************** 
APPLICATIONS DISABLED 
**********************

*********************************************************************

crypto        
: No usable OpenSSL found

jinterface    
: No Java compiler found

odbc   
       :
ODBC library - link check failed

orber         
: No C++ compiler found

ssh           
: No usable OpenSSL found

ssl           
: No usable OpenSSL found

*********************************************************************

*********************************************************************

********************** 
APPLICATIONS INFORMATION 
*******************

*********************************************************************

wx            
: wxWidgets not found, wx will NOT be usable

*********************************************************************

*********************************************************************

********************** 
DOCUMENTATION INFORMATION 
******************

*********************************************************************

documentation 
:

xsltproc is missing.

fop is missing.

The documentation can not be built.

#如上,提示错误,解决方法:安装OpenSSL

[root@localhost
otp_src_17.1]# yum install openssl

...

Package
openssl-1.0.0-4.el6.x86_64 already installed and latest
version

Nothing to do

#提示已经安装,解决方法:安装devel版

[root@localhost
otp_src_17.1]# yum install openssl-devel

#继续配置erlang的安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang

...

********************** 
APPLICATIONS DISABLED 
**********************

*********************************************************************

jinterface    
: No Java compiler found

odbc          
: ODBC library - link check failed

orber         
: No C++ compiler found

*********************************************************************

*********************************************************************

********************** 
APPLICATIONS INFORMATION 
*******************

*********************************************************************

wx            
: wxWidgets not found, wx will NOT be usable

*********************************************************************

*********************************************************************

********************** 
DOCUMENTATION INFORMATION 
******************

*********************************************************************

documentation 
:

xsltproc is missing.

fop is missing.

The documentation can not be built.

#如上,提示错误,解决方法:安装unixODBC库

[root@localhost
otp_src_17.1]# yum install unixODBC

#继续配置erlang的安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang
--without–javac

...

********************** 
APPLICATIONS DISABLED 
**********************

*********************************************************************

jinterface    
: Java compiler disabled by user

odbc          
: ODBC library - link check failed

orber         
: No C++ compiler found

*********************************************************************

*********************************************************************

********************** 
APPLICATIONS INFORMATION 
*******************

*********************************************************************

wx            
: wxWidgets not found, wx will NOT be usable

*********************************************************************

*********************************************************************

********************** 
DOCUMENTATION INFORMATION 
******************

*********************************************************************

documentation  :

xsltproc is missing.

fop is missing.

The documentation can not be built.

#如上,提示错误依旧,解决方法:安装devel版

[root@localhost
otp_src_17.1]# yum install unixODBC-devel

#继续配置erlang安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang
--without–javac

*********************************************************************

********************** 
APPLICATIONS DISABLED 
**********************

*********************************************************************

jinterface    
: Java compiler disabled by user

orber         
: No C++ compiler found

*********************************************************************

*********************************************************************

********************** 
APPLICATIONS INFORMATION 
*******************

*********************************************************************

wx            
: wxWidgets not found, wx will NOT be usable

*********************************************************************

*********************************************************************

********************** 
DOCUMENTATION INFORMATION 
******************

*********************************************************************

documentation 
:

xsltproc is missing.

fop is missing.

The documentation can not be built.

#如上,提示错误,解决方法:安装gcc-c++编译器

[root@localhost
otp_src_17.1]# yum install gcc-c++

#继续配置erlang的安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang
-disable-javac

...

config.status:
include/x86_64-unknown-linux-gnu/erl_native_features_config.h is
unchanged

*********************************************************************

********************** 
APPLICATIONS DISABLED 
**********************

*********************************************************************

jinterface    
: No Java compiler found

*********************************************************************

*********************************************************************

********************** 
APPLICATIONS INFORMATION 
*******************

*********************************************************************

wx            
: wxWidgets not found, wx will NOT be usable

*********************************************************************

*********************************************************************

********************** 
DOCUMENTATION INFORMATION 
******************

*********************************************************************

documentation 
:

xsltproc is missing.

fop is missing.

The documentation can not be built.

 

#如上,提示错误,解决方法:安装wxWidgets(iso安装包中没有,需要下载)

[root@localhost software]#
bzip2 -d wxWidgets-3.0.1.tar.bz2

[root@localhost software]#
tar -xvf wxWidgets-3.0.1.tar

[root@localhost software]#
cd wxWidgets-3.0.1

#注意:-enable-unicode选项不能少

[root@localhost
wxWidgets-3.0.1]# ./configure -enable-unicode

...

configure:
error:

The development
files for GTK+ were not found. For GTK+ 2, please

ensure that
pkg-config is in the path and that gtk+-2.0.pc is

installed. For
GTK+ 1.2 please check that gtk-config is in the path,

and that the
version is 1.2.3 or above. Also check that the

libraries
returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config

--libs' are in
the LD_LIBRARY_PATH or equivalent.

#如上,提示错误,解决方法:安装GTK+

[root@localhost
otp_src_17.1]# yum install gtk2-devel

#继续配置wxWidgets安装环境(注意:-enable-unicode选项不能少)

[root@localhost
wxWidgets-3.0.1]# ./configure --with-opengl
-enable-unicode -enable-debug

...

configure:
WARNING: libSM not found; disabling session management
detection

checking for
OpenGL headers... not found

checking for
GL/gl.h... no

configure:
error: OpenGL libraries not available

#如上,提示错误,安装pengliso没自带,据网上说的,安装opengl相关类库(mesa))

[root@localhost
otp_src_17.1]# yum  install
mesa-libGL-devel

#再次配置wxWidgets的安装环境

[root@localhost
wxWidgets-3.0.1]# ./configure --with-opengl
-enable-unicode

...

checking for OpenGL
headers... not found

checking for GL/gl.h...
no

configure: error: OpenGL
libraries not available

#如上,提示错误,解决方法:继续安装其它版本的mesa

[root@localhost
otp_src_17.1]# yum install mesa-libGLU-devel

#安装wxWidgets

[root@localhost
wxWidgets-3.0.1]# make && make install

#继续配置erlang的安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang
-disable-javac

*********************************************************************

********************** 
APPLICATIONS DISABLED 
**********************

*********************************************************************

jinterface    
: No Java compiler found

*********************************************************************

*********************************************************************

********************** 
DOCUMENTATION INFORMATION 
******************

*********************************************************************

documentation 
:

fop is missing.

Using fakefop to generate placeholder PDF files.

 

#如上,提示错误,解决方法:安装java
jdk

[root@localhost software]#
ls

jdk-6u13-linux-i586.bin 
jdk-6u13-linux-i586.zip 
otp_src_17.1 
otp_src_17.1.tar.gz 
wxWidgets-3.0.1 
wxWidgets-3.0.1.tar

[root@localhost software]#
mkdir -p /usr/local/java

[root@localhost software]#
mv jdk-6u13-linux-i586.bin /usr/local/java

[root@localhost software]#
cd /usr/local/java/

[root@localhost java]#
ls

jdk-6u13-linux-i586.bin

[root@localhost
java]# chmod 777 jdk-6u13-linux-i586.bin

[root@localhost java]#
./jdk-6u13-linux-i586.bin

...

./jdk-6u13-linux-i586.bin:
./install.sfx.5278: /lib/ld-linux.so.2: bad ELF interpreter: No
such file or directory

Failed to
extract the files.  Please refer to the
Troubleshooting section of

the Installation
Instructions on the download page for more information.

#如上,提示错误,解决方法:安装64位的jdk

[root@localhost java]#
chmod 777 jdk-6u4-linux-x64-rpm.bin

[root@localhost java]#
./jdk-6u4-linux-x64-rpm.bin

[root@localhost java]#
export JAVA_HOME=/usr/local/java

[root@localhost java]#
ls

jdk-6u4-linux-amd64.rpm               
sun-javadb-common-10.3.1-4.1.i386.rpm 
sun-javadb-docs-10.3.1-4.1.i386.rpm

jdk-6u4-linux-x64-rpm.bin             
sun-javadb-core-10.3.1-4.1.i386.rpm   
sun-javadb-javadoc-10.3.1-4.1.i386.rpm

sun-javadb-client-10.3.1-4.1.i386.rpm 
sun-javadb-demo-10.3.1-4.1.i386.rpm

[root@localhost java]# rpm
-ivh jdk-6u4-linux-amd64.rpm

[root@localhost java]# find
/ -name dt.jar

/usr/java/jdk1.6.0_04/lib/dt.jar

[root@localhost java]#
export JAVA_HOME=/usr/java/jdk1.6.0_04

[root@localhost java]#
export JRE_HOME=/usr/java/jdk1.6.0_04/jre

[root@localhost lib]#
export CLASSPATH=.;$JAVA_HOME/lib/dt.jar;$JAVA_HOEM/lib/tools.jar;

-bash:
/usr/java/jdk1.6.0_04/lib/dt.jar: Permission denied

-bash:
/lib/tools.jar: No such file or directory

#如上,提示错误,解决方法:更改权限,更改字符

[root@localhost lib]# chmod
777 /usr/java/jdk1.6.0_04/lib/dt.jar

[root@localhost lib]# chmod
777 /usr/java/jdk1.6.0_04/lib/tools.jar

[root@localhost lib]# vi
/etc/profile

Tsung CentOS 操作系统下搭建tsung性能测试环境_Part 1Tsung CentOS 操作系统下搭建tsung性能测试环境_Part 1

[root@localhost lib]# source /etc/profile

#继续配置erlang的安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang

...

********************** 
DOCUMENTATION INFORMATION 
******************

*********************************************************************

documentation 
:

fop is missing.

Using fakefop to generate placeholder PDF files.

#如上,提示错误,解决方法:安装fop

[root@localhost
otp_src_17.1]# yum install fop

#继续配置erlang的安装环境

[root@localhost
otp_src_17.1]# ./configure --prefix=/usr/local/erlang

#安装

[root@localhost
otp_src_17.1]# make && make install

#配置环境变量

[root@localhost lib]# vi
/etc/profile

Tsung CentOS 操作系统下搭建tsung性能测试环境_Part 1Tsung CentOS 操作系统下搭建tsung性能测试环境_Part 1

[root@localhost lib]#
source /etc/profile

#确认是否安装成功

[root@localhost
otp_src_17.1]# erl -version

Erlang
(SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 6.1


步骤
3、安装tsung

[root@localhost software]#
tar -xvf tsung-1.5.1.tar.gz

[root@localhost software]#
cd tsung-1.5.1

[root@localhost
tsung-1.5.1]# ./configure --prefix=/usr/local/tsung
--with-erlang=/usr/local/erlang

[root@localhost
tsung-1.5.1]# make && make install

#配置环境变量

[root@localhost
tsung-1.5.1]# vi /etc/profile

Tsung CentOS 操作系统下搭建tsung性能测试环境_Part 1Tsung CentOS 操作系统下搭建tsung性能测试环境_Part 1

[root@localhost tsung-1.5.1]# source /etc/profile

#确认是否安装成功

[root@localhost
tsung-1.5.1]# tsung -v

-bash: tsung: command not
found

[root@localhost
tsung-1.5.1]# find / -name tsung

/usr/local/tsung

/usr/local/tsung/bin/tsung

/usr/local/tsung/lib/tsung

/usr/local/tsung/share/doc/tsung

/usr/local/tsung/share/tsung

/root/software/tsung-1.5.1/src/tsung-plotter/tsung

/root/software/tsung-1.5.1/src/tsung

Tsung CentOS 操作系统下搭建tsung性能测试环境_Part 1

[root@localhost
tsung-1.5.1]# tsung -v

Tsung version
1.5.1


步骤
4#安装perlTemplate
Toolkit

[root@localhost software]#
tar -xvf Template-Toolkit-2.25.tar.gz

[root@localhost software]#
cd Template-Toolkit-2.25

[root@localhost
Template-Toolkit-2.25]# ls

bin  Changes  HACKING  images  INSTALL  lib 
Makefile.PL 
MANIFEST 
META.json 
META.yml 
parser 
README 

TODO 
xs

[root@localhost
Template-Toolkit-2.25]# perl Makefile.PL

Can't locate
ExtUtils/MakeMaker.pm in @INC (@INC contains: ./lib
/usr/local/lib64/perl5 /usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
/usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line
11.

BEGIN failed--compilation
aborted at Makefile.PL line 11.

#如上,提示错误,解决方法:安装perl-ExtUtils-MakeMaker

[root@localhost
otp_src_17.1]# yum install perl-ExtUtils-MakeMaker

#继续安装Template
Toolkit

[root@localhost
Template-Toolkit-2.25]# perl Makefile.PL

[root@localhost
Template-Toolkit-2.25]# make

[root@localhost
Template-Toolkit-2.25]# make test

...

t/pod.t
............... skipped: Pod::POM not installed

...

t/zz-pmv.t
............ Can't locate Test/More.pm in @INC (@INC contains:
/root/software/Template-Toolkit-2.25/blib/lib
/root/software/Template-Toolkit-2.25/blib/arch
/usr/local/lib64/perl5 /usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
/usr/lib64/perl5 /usr/share/perl5 .) at

...

Test Summary
Report

-------------------

t/unicode.t        
(Wstat: 512 Tests: 0 Failed: 0)

Non-zero exit status:
2

Parse errors: No plan
found in TAP output

t/zz-pmv.t         
(Wstat: 512 Tests: 0 Failed: 0)

Non-zero exit status:
2

...

Parse errors: No plan
found in TAP output

Files=89,
Tests=2787, 17 wallclock secs ( 0.23 usr  0.14 sys +  4.94 cusr  0.95 csys
=  6.26
CPU)

Result:
FAIL

Failed 5/89 test
programs. 0/2787 subtests failed.

make: ***
[test_dynamic] Error 2