• boa,thttp服务器安装,配置,测试


    boa

    1, SERVER_ROOT自定义,define.h头文件中,默认“/etc/boa"

    2,./configure

    3,修改CC,默认CC=gcc,make

    4,error

    util.c: In function ‘get_commonlog_time’:
    util.c:100:39: error: pasting "t" and "->" does not give a valid preprocessing token
             time_offset = TIMEZONE_OFFSET(t);
                                           ^
    compat.h:120:30: note: in definition of macro ‘TIMEZONE_OFFSET’
     #define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff
                                  ^
    make: *** [util.o] Error 1

    删除compat.h中 #define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff的##

    5,再make

    6,复制二进制文件boa到安装目录,如/usr/bin

    7,复制boa.conf到SERVER_ROOT,配置boa.conf重点

    DocumentRoot /var/www  网站目录

    ScriptAlias /cgi-bin/   /var/www/cgi-bin(存放cgi程序的实际位置)

    启动: ./boa -c /etc/boa

    thttpd

    1,   CC=gcc-arm ./configure --host=arm-linux

    2,  make

    3,  配置文件     ./contrib/redhat-rpm/thttpd.conf

    dir  网站地址

    #chroot

    cgipat=/cgi-bin/*

    host=地址

    测试:静态网页,图片,cgi程序

    ab  重要选项,-n请求次数,-c并发量,-k 使用keepAlive特性 -r socket遇到错误不推出

      ab -rkc 1000 -n 1000 网址

    当设置数据较大时,需要更改系统限制

    ulimit -a 设置系统限制,需要在su -下才能设置

    pmap 报告进程的内存映射  man pmap

      

    其他测试工具记录下:webbench iometer iozone netperf

  • 相关阅读:
    (十三)子查询
    (十二)多表查询
    MFC读写配置ini文件
    (十一)分组函数(多行函数)
    Django(二十一)组合搜索
    Django(二十)model中的 class Meta
    (十)单行函数
    (九)逻辑运算,order by,desc
    类作为成员变量
    内部类——匿名内部类
  • 原文地址:https://www.cnblogs.com/jokoz/p/4575543.html
Copyright © 2020-2023  润新知