手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

LAMPX-AMPX测试篇

[日期:2012-12-06] 来源:51cto  作者:mos1989 [字体:大 中 小]

Apache开启状态监控测试.

1、 查看是否启用此功能,此项功能由status_module模块提供

  1. httpd -M|grep status_module

2、 在/etc/httpd/httpd.conf中加入如下行

  1. <Location /status> #定义本地所有虚拟主机访问地址后面加/status即可使用
  2. SetHandler server-status #貌似是调用server-status设置显示信息
  3. Require ip 192.168.88.0/24 #仅允许我自己定义的网段可看
  4. </Location>

3、 重启httpd,并在物理机器上查看相关内容

  1. service httpd restart
  2. #打开浏览器:输入 linuxidc.example.com 输出内容如下:
  3. Apache Server Status for linuxidc.example.com (via 192.168.88.131)
  4. Server Version: Apache/2.4.3 (Unix) PHP/5.4.8 #软件及版本
  5. Server Built: Oct 27 2012 17:33:04 #软件编译安装的时间
  6. CurrentTime: Sunday, 28-Oct-2012 07:28:50 CST #服务器当前时间
  7. Restart Time: Sunday, 28-Oct-2012 07:15:27 CST #上次www软件重启 时间
  8. Parent Server Config. Generation: 1 #接收到重启命令的次数
  9. Parent Server MPM Generation: 0 #貌似是告诉父进程是工作在MPM的模式下..
  10. Server uptime: 13 minutes 22 seconds #服务器运行时间
  11. Total accesses: 3 - Total Traffic: 3 kB # Apache收发的数据量
  12. CPU Usage: u0 s0 cu0 cs0 #CPU使用情况
  13. .00374 requests/sec - 3 B/second - 1024 B/request
  14. 1 requests currently being processed, 74 idle workers
  15. PID Connections Threads Async connections
  16. total accepting busy idle writing keep-alive closing
  17. 8965 0 yes 0 25 0 0 0
  18. 8967 0 yes 0 25 0 0 0
  19. 8995 1 yes 1 24 0 0 0
  20. Sum 1 1 74 0 0 0
  21. ___________________________________________________W____________
  22. ___________.....................................................
  23. ................................................................
  24. 说明:
  25. * _:等待连结中。
  26. * S:启动中。
  27. * R: 正在读取要求。
  28. * W:正在送出回应。
  29. * K:处于保持联机的状态。
  30. * D:正在查找 DNS。
  31. * C:正在关闭连结。
  32. * L:正在写入记录文件。
  33. * G:进入正常结束程序中。
  34. * I:处理闲置。
  35. * .:尚无此程序。
  36. Scoreboard Key:
  37. "_" Waiting forConnection, "S" Starting up, "R" Reading Request,
  38. "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
  39. "C" Closing connection, "L" Logging, "G" Gracefully finishing,
  40. "I" Idle cleanup of worker, "."Open slot withnocurrent process
  41. Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request
  42. 1-0 8967 0/1/1 _ 0.00 796 0 0.0 0.00 0.00 192.168.88.1 linuxidc.example.com:80 GET /status HTTP/1.1
  43. 2-0 8995 0/1/1 _ 0.00 3 2 0.0 0.00 0.00 192.168.88.1 linuxidc.example.com:80 GET / HTTP/1.1
  44. 2-0 8995 0/0/0 W 0.00 0 1534167436 0.0 0.00 0.00 192.168.88.1 linuxidc.example.com:80 GET /status HTTP/1.1
  45. 2-0 8995 0/1/1 _ 0.00 3 1 0.0 0.00 0.00 192.168.88.1 linuxidc.example.com:80 GET /favicon.ico HTTP/1.1
  46. Srv Child Server number - generation #本程序与其父程序的编号
  47. PID OS process ID #本程序的PID(线程编号)
  48. Acc Number of accesses this connection / this child / this slot #分别表示本次联机、本程序所处理的存取次数
  49. M Mode of operation #该程序目前的状态。
  50. CPU CPU usage, number of seconds #该程序所耗用的 CPU 资源
  51. SS Seconds since beginning of linuxidct recent request #距离上次处理要求的时间
  52. Req Milliseconds required to process linuxidct recent request #最后一次处理要求所耗费的时间,以千分之一秒为单位
  53. Conn Kilobytes transferred this connection #本次联机所传送的数据量
  54. Child Megabytes transferred this child #由该子程序所传送的数据量
  55. Slot Total megabytes transferred this slot #由该 Slot 所传送的数据量

 

简单搭建一个wordpress,使www.linuxidc.com可以打开.

1、下载最新版wordpress并解压至网页根目录

  1. cd /root/work
  2. wget http://cn.wordpress.org/wordpress-3.4.2-zh_CN.tar.gz
  3. tar xf wordpress-3.4.2-zh_CN.tar.gz -C /web/linuxidcweb/
  4. cd /web/linuxidcweb/
  5. mv wordpress/* . #将wordpress文件直接放在网站根目录.

2、复制配置文件,并配置连接数据参数

  1. cp wp-config-sample.php wp-config.php #复制模板文件,切勿mv
  2. sed -i 's@database_name_here@test@g' wp-config.php #指定连接数据库
  3. sed -i 's@username_here@testuser@g' wp-config.php #连接数据库的用户名
  4. sed -i 's@password_here@123@g' wp-config.php #连接数据库的密码

3、打开物理机(Win7),进入wordpress做配置收尾工作
打开浏览器,输入 linuxidc.example.com
按提示,输入用户名,密码,邮箱然后提交即可.

linux
相关资讯       lamp  LAMPX 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款