小说转接入平台 lvs-dr集群

这两天把项目的脚本整理出来。。。。

 

 

 

 百度出了一个脚本,但是不能用,我这里都修改好了。

  
  
  
  
  1. # Version 0.0.1.1 - P-DX44  

  2. yum -y remove httpd  

  3. yum -y install pcre-devel pcre  

  4. mkdir ~/src  

  5. cd ~/src  

  6. #下载安装包,自己修改相应的地址即可  

  7. wget http://rfyiamcool.googlecode.com/files/lighttpd-1.4.19.tar.gz  

  8. tar xzvf lighttpd-1.4.13.tar.gz  

  9. cd lighttpd-1.4.13  

  10. ./configure --prefix=/usr/local/lighttpd --with-openssl  

  11. make && make install  

  12. mkdir /var/www  

  13. cd /var/www  

  14. ln -sf /is/sbin/lighttpd Light  

  15. mkdir log cache  

  16. chown -R nobody:nobody log cache  

  17. cat <<EOF> httpd.start  

  18. PATH=$PATH:/var/www  

  19. ulimit -c unlimited  

  20. ulimit -n 8192  

  21. cd /var/www  

  22. exec Light -f www.conf  

  23. EOF  

  24. cat <<EOF> httpd.stop  

  25. killall Light  

  26. EOF  

  27. chmod a+x httpd.start httpd.stop  

  28. m4 -U format -D HOSTNAME=$(hostname) <<__EOF__> www.conf  

  29. server.port = 80

  30. server.event-handler = "linux-sysepoll"

  31. server.username = "nobody"

  32. server.groupname = "nobody"

  33. server.document-root = "/var/www/html"

  34. server.dir-listing = "disable"

  35. server.follow-symlink = "enable"

  36. server.indexfiles = ("index.html")  

  37. server.max-keep-alive-requests = 0

  38. server.max-keep-alive-idle = 4

  39. server.errorlog="/var/www/log/lighttpd.error.log"

  40. server.max-fds = 40960

  41. server.modules          = ( "mod_rewrite",  

  42.                             "mod_redirect",  

  43.                             "mod_alias",  

  44.                             "mod_access",  

  45.                             "mod_auth",  

  46.                             "mod_status",  

  47.                             "mod_fastcgi",  

  48.                             "mod_proxy",  

  49.                             "mod_simple_vhost",  

  50.                             "mod_evhost",  

  51. #                           "mod_userdir",  

  52.                             "mod_cgi",  

  53.                             "mod_compress",  

  54. #                           "mod_usertrack",  

  55.                             "mod_expire",  

  56.                             "mod_secdownload",  

  57.                             "mod_flv_streaming",  

  58.                 "mod_setenv",  

  59.                             "mod_accesslog" )  

  60. setenv.add-response-header = ( "CPOINT" => "HOSTNAME" )  

  61. flv-streaming.extensions = ( ".flv" )  

  62. server.pid-file = "/var/www/log/httpd.pid"

  63. mimetype.assign = ( ".png"  => "image/png",  

  64.                     ".gif"  => "image/gif",  

  65.                     ".jpg"  => "image/jpeg",  

  66.                     ".jpeg" => "image/jpeg",  

  67.                     ".html" => "text/html",  

  68.                     ".txt"  => "text/plain",  

  69.                     ".wmv"  => "video/x-ms-wmv" )  

  70. status.status-url = "/in-status"

  71. status.config-url = "/in-config"

  72. simple-vhost.server-root = "/var/www"

  73. simple-vhost.default-host = "default"

  74. simple-vhost.document-root = "html"

  75. compress.cache-dir = "/var/www/cache"

  76. compress.filetype = ("text/html", "text/plain")  

  77. accesslog.filename = "/var/www/log/access.log"

  78. accesslog.format = "%h %l %u %t \"%m http://%v%U %H\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""  

  79. __EOF__  

  80. mkdir -p default/html  

  81. mkdir html 

 

你可能感兴趣的:(LVS,DR)