zoukankan      html  css  js  c++  java
  • Apache+jboss群集部署

    Jboss default方式上的Cluster配置[二] - 操作系统
    http://www.myexception.cn/operating-system/862858.html

    Jboss default方式下的Cluster配置[二]
    Install Apache

    Install

    Unzip
    gzip -d httpd-2.2.9.tar.gz
    tar xvf httpd-2.2.9.tar
    
    Config
    cd httpd-2.2.9
    ./configure --prefix=/opt/apache2
    
    Complile
    make
    
    Install.
    make install
    
    



    Configuraion

    vi /opt/apache2/conf/httpd.conf
    将User daemon和Group daemon改为User apache和Group apache

    Listen 192.168.150.75:80
    ServerName 192.168.150.75:80



    Add user and group for apache:

    groupadd apache
    useradd apache –g apache




    Check

    ./apachectl configtest



    Install Mod_JK

    Install

    Rename mod_jk-1.2.26-httpd-2.2.6.so to mod_jk.so;

    #mv mod_jk-1.2.26-httpd-2.2.6.so mod_jk.so



    Copy to the folder /opt/apache2/modules.

    #cp /home/tools/mod_jk.so 



    Configuration

    Add the below line in the bottom of /opt/apache2/conf/httpd.conf:

    Include conf/mod_jk.conf




    Copy the files to the folder:

    /opt/apache2/conf



    mod_jk.conf

    # Load mod_jk module
    # Specify the filename of the mod_jk lib
    loadModule jk_module modules/mod_jk.so
    
    # Where to find workers.properties
    JkWorkersFile conf/workers.properties
    
    # Where to put jk logs
    JkLogFile logs/mod_jk.log
    
    # Set the jk log level [debug/error/info]
    JkLogLevel info
    
    # Select the log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
    
    # JkOptions indicates to send SSK KEY SIZE
    JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
    
    # JkRequestLogFormat
    JkRequestLogFormat "%w %V %T"
    JkMountFile conf/uriworkermap.properties
    



    workers.properties

    #Define list of workers that will be used
    # for mapping requests
    worker.list=loadbalancer,status
    
    # Define Node1
    # modify the host as your host IP or DNS name.
    worker.node1.port=8009
    worker.node1.host=192.168.150.75
    worker.node1.type=ajp13
    worker.node1.lbfactor=1
    
    # Define prefered failover node for node1
    worker.node1.redirect=node2
    
    # Define Node2
    # modify the host as your host IP or DNS name.
    worker.node2.port=8009
    worker.node2.host=192.168.150.76
    worker.node2.type=ajp13
    worker.node2.lbfactor=2
    worker.node2.redirect=node1
    
    # Load-balancing behaviour
    worker.loadbalancer.type=lb
    worker.loadbalancer.balance_workers=node1,node2
    worker.loadbalancer.sticky_session=1
    
    # Status worker for managing load balancer
    worker.status.type=status



    uriworkermap.properties

    /application/*=loadbalancer
    /jkstatus=status
    #/*.jsp=loadbalancer
    #/*.do=loadbalancer
    !/*.gif=loadbalancer
    !/*.msi=loadbalancer
    !/*.exe=loadbalancer
    !/*.jpg=loadbalancer
    !/*.png=loadbalancer
    !/*.css=loadbalancer
    !/js/*.js=loadbalancer
    #!/*.htm=loadbalancer
    #!/*.html=loadbalancer
  • 相关阅读:
    将数组格式的字符串转换成数组
    引号嵌套引起的问题
    如何使用for循环把对象push到数组中,且前面的值不会被覆盖
    如何把一个大的对象,转成若干个小对象,然后在放到数组中
    前端如何设置一天只能点击一次的以及如何去判断第二天0点刷新的一些问题
    let和const的理解以及let,const,var的区别
    watch监控和computed监控
    媒体查询
    react中redux+react-redux插件的应用
    react中控制div的位置移动动画
  • 原文地址:https://www.cnblogs.com/paul8339/p/6956364.html
Copyright © 2011-2022 走看看