Tag Archives: installation

FreeBSD源代码安装tsung

我之前的一篇文章《FreeBSD安装tsung》介绍过在FreeBSD下用ports安装erlang和tsung,但是FreeBSD里面的软件太古老,很难安装成功,特别是安装java遇到很大的挫折,之后又尝试源代码安装erlang和tsung,发现一般情况下可以去掉java选项,可以使安装过程变得简单很多。

1.OS版本

64位的Freebsd,uname -a命令:

FreeBSD AN 7.0-RELEASE FreeBSD 7.0-RELEASE #2: Fri Apr 11 10:34:32 CST 2014   amd64

2.安装gmake

需要root权限:

cd /usr/ports/devel/gmake/
make install clean

2.安装erlang

版本:otp-src-R16B03.tar.gz,“gmake install”需要root权限:

tar zxvf otp_src_R16B03.tar.gz
cd otp_src_R16B03 && ./configure --without-javac && gmake && gmake install

3.安装tsung

版本:tsung-1.5.0.tar.gz,“gmake install”需要root权限:

tar zxvf tsung-1.5.0.tar.gz
cd tsung-1.5.0 && ./configure && gmake && gmake install

4.参考文献

FreeBSD安装tsung

1.OS版本

FreeBSD AN 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Wed Dec 12 23:19:45 CST 2012

2.tsung的一些依赖关系

  • Erlang/OTP R12B-5 and up (http://www.erlang.org/download.html). Erlang is now part of fedora and debian/ubuntu repositories.
  • pgsql module made by Christian Sunesson (for the PostgreSQL plugin): sources available at http://jungerl.sourceforge.net/ . The module is included in the source and binary distribution of Tsung. It is released under the EPL License.
  • mysql module made by Magnus Ahltorp & Fredrik Thulin (for the mysql plugin): sources available at http://www.stacken.kth.se/projekt/yxa/ . The modified module is included in the source and binary distribution of Tsung. It is released under the three-clause BSD License.
  • eldap module (for the LDAP plugin): sources available at http://jungerl.sourceforge.net/ . The module is included in the source and binary distribution of Tsung. It is released under the GPL License.
  • mochiweb libs (for xpath parsing, optionally used for dynamic variables in the HTTP plugin): sources available at http://code.google.com/p/mochiweb/ . The module is included in the source and binary distribution of Tsung. It is released under the MIT License.
  • gnuplot and perl5 (optional; for graphical output with tsungstats.pl script). The Template Toolkit is used for HTML reports (see http://template-toolkit.org/)
  • python and mathplotlib (optional; for graphical output with tsung-plotter).

for distributed tests, you need an ssh access to remote machines without password (use a RSA/DSA key without pass-phrase or ssh-agent) (rsh is also supported)

  • bash

一般情况下,我们只需要安装erlang,Freebsd默认没有java解释器,所以需要安装java解析器还有erlang.

3.FreeBSD安装java

有开源的java解决方案,也有oracle的官方版本,详情请看: http://www.freebsd.org/java/ http://www.freebsd.org/java/install.html

这里使用开源的openjdk:

cd /usr/ports/java/openjdk6 
make install clean

4.安装tsung

获得tsung,不需要最新的,用官方推荐的R12B版本就行:

wget http://www.erlang.org/download/otp_src_R12B-5.tar.gz
tar zxvf otp_src_R12B-5.tar.gz
cd cd otp_src_R12B
./configure && make && make install

5.可能会出现的问题

5.1 无法找到java解释器

*********************************************************************
------------------  APPLICATIONS DISABLED  **********************
*******************************************************************

jinterface     : No Java compiler found
odbc           : ODBC library - link check failed

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

需要按照步骤3安装java解释器

5.2 安装openssl出错

bss_dgram.c: In function 'dgram_sctp_handle_auth_free_key_event':
bss_dgram.c:962: error: 'SCTP_AUTH_FREE_KEY' undeclared (first use in this function)
bss_dgram.c:962: error: (Each undeclared identifier is reported only once
bss_dgram.c:962: error: for each function it appears in.)
bss_dgram.c: In function 'dgram_sctp_read':
bss_dgram.c:1053: error: 'SCTP_SENDER_DRY_EVENT' undeclared (first use in this function)
bss_dgram.c:1085: error: 'struct sctp_event_subscribe' has no member named 'sctp_sender_dry_event'
bss_dgram.c: In function 'BIO_dgram_sctp_wait_for_dry':
bss_dgram.c:1544: error: 'struct sctp_event_subscribe' has no member named 'sctp_sender_dry_event'
bss_dgram.c:1595: error: 'SCTP_SENDER_DRY_EVENT' undeclared (first use in this function)
bss_dgram.c:1612: error: 'struct sctp_event_subscribe' has no member named 'sctp_sender_dry_event'
--- Error code 1

Stop in /usr/ports/security/openssl/work/openssl-1.0.1c/crypto/bio.

make -DBATCH install clean
--- Error code 1

Stop in /usr/ports/security/openssl/work/openssl-1.0.1c/crypto.
--- Error code 1

Stop in /usr/ports/security/openssl/work/openssl-1.0.1c.
--- Error code 1

Stop in /usr/ports/security/openssl.
--- Error code 1

Stop in /usr/ports/security/openssl.

去掉STCP的选项:

cd /usr/ports/security/openssl
make config

去掉 []SCTP SCTP protocol support,然后:

make clean
make instal clean

5.3 很多已经安装,需要更新

出错信息类似:

tall'' to upgrade it properly.
      If you really wish to overwrite the old port of devel/libcheck
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
--- Error code 1

安装的时候加入选项FORCEPKGREGISTER=”yes”

make FORCE_PKG_REGISTER="yes" install clean

安装过程可能还会缺少很多软件,很可能需要手工安装。顺便发一下牢骚,freebsd的ports系统真没有gentoo好用。

6.参考文献

这里还教你如何使用tsung