千家信息网

CentOS6安装tsung

发表于:2025-02-02 作者:千家信息网编辑
千家信息网最后更新 2025年02月02日,最近研究tsung,在CentOS上安装tsung和它的依赖包,最后安装apache2,用来查看报表通过一天的安装,熟悉了yum的安装卸载查看,tar包的configure、make、make ins
千家信息网最后更新 2025年02月02日CentOS6安装tsung

最近研究tsung,在CentOS上安装tsung和它的依赖包,最后安装apache2,用来查看报表

通过一天的安装,熟悉了yum的安装卸载查看,tar包的configure、make、make install经典安装

现将过程记录如下:


安装gcc-g++

yum -y install gcc-c++


安装ncurses

yum -y install ncurses-devel


安装perl

yum -y install perl-String-CRC32

yum -y install perl-URI.noarch

yum -y install perl-CPAN

依然报错,最后运行

yum -y install perl-Template-Toolkit安装成功


1.安装erlang

wget http://erlang.org/download/otp_src_R13B04.tar.gz
tar zxvf otp_src_R13B04.tar.gz
cd otp_src_R13B04

./configure --prefix=/home/erlang

make

make install

2.安装ncurses

wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz

tar zxvf ncurses-5.9.tar.gz
cd ncurses-5.9

./configure --prefix=/home/ncurses

make

make install

3.安装perl template

Wget http://www.template-toolkit.org/download/ libtemplate-perl_2.24.orig.tar.gz

tar zxvf libtemplate-perl_2.24.orig.tar.gz

cd Template-Toolkit-2.24

perl Makefile.PL

make

make test

sudo make install

4.安装gnuplot

Wget http://sourceforge.net/projects/gnuplot/files/ gnuplot-4.6.3.tar.gz

tar zxvf gnuplot-4.6.3.tar.gz

cd gnuplot-4.6.3

./configure

make

make install

5.安装 tsung

下载tsung1.4

按照erlang的安装方法进行安装即可

配置tsung
~/.tsung/tsung.xml
tsung默认的配置文件,如果这个目录和文件不存在,就手动来创建这个目录

mkdir ~/.tsung

6.安装apache2

wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz

wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz

wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip

wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.4.tar.gz


先安装apr-1.4.5.tar.gz

[root@xt test]# tar -zxf apr-1.4.5.tar.gz

[root@xt test]# cd apr-1.4.5

[root@xt apr-1.4.5]# ./configure --prefix=/usr/local/apr

[root@xt apr-1.4.5]# make && make install

在安装:apr-util-1.3.12.tar.gz

[root@xt test]# tar -zxf apr-util-1.3.12.tar.gz

[root@xt test]# cd apr-util-1.3.12

[root@xt apr-util-1.3.12]# ./configure--with-apr=/usr/local/apr

[root@xt apr-util-1.3.12]# make && make install

在安装:pcre-8.10.zip

[root@xt test]#unzip -o pcre-8.10.zip

[root@xt test]#cd pcre-8.10

[root@xt pcre-8.10]#./configure --prefix=/usr/local/pcre

[root@xt pcre-8.10]#make && make install


安装pcre-devel,不然httpd无法通过./configure

yum-y install pcre-devel


最后安装httpd-2.4.4.tar.gz

[root@xt test]# tar -zxf httpd-2.4.4.tar.gz

[root@xt test]# cd httpd-2.4.4

[root@xt apr-1.4.5]# ./configure

[root@xt apr-1.4.5]# make && make install



配置

vi/usr/local/apache2/conf/httpd.conf

ServerNameIP:80


启动>usr/local/apache2/bin/apachectl -k start

启动之后,在root权限下执行开放端口操作,这样其他PC也可以通过IP地址访问了

iptables -I INPUT -p tcp --dport 5222 -j ACCEPT

iptables -I INPUT -p udp --dport 5222 -j ACCEPT


配置apache开机自动启动

# vi /etc/rc.d/rc.local

//rc.local上加入一行/usr/local/apache/bin/apachectl -k start

重新启动apache

./apachectlrestart


//建立符号链接

cd/var/www

ln-s ~/.tsung/log/ tsungreport

这是就可以访问:http://localhost/tsungreport/20120728-0511/report.html来访问报表了


0