CentOS 操做系統下搭建tsung性能測試環境_Part 1html
by:授客 QQ:1033553122java
步驟1、下載軟件安裝包linux
CentOS-6.0-x86_64-bin-DVD1.isoc++
jdk-6u4-linux-x64-rpm.binjson
erlang:centos
otp_src_17.1.tar.gzbash
下載地址:http://www.erlang.org/download.htmlsession
tsungssh
下載地址:http://tsung.erlang-projects.org/dist/性能
wxWidgets-3.0.1.tar.bz2:
下載地址:http://www.wxwidgets.org/downloads/
Template-toolkit
下載地址: http://template-toolkit.org/download/index.html#debian以上除了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
#如上,提示錯誤,安裝pengl(iso沒自帶,據網上說的,安裝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
[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
[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
[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
[root@localhost tsung-1.5.1]# tsung -v
Tsung version 1.5.1
步驟4、#安裝perl的Template 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 t 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