`
PowerNTT
  • 浏览: 27564 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

Jboss default方式下的Cluster配置[一]

阅读更多
Dependent Software:

jboss-4.2.2.GA.zip
httpd-2.2.9.tar.gz
mod_jk-1.2.26-httpd-2.2.6.so
jdk-1_5_0_16-linux-i586-rpm.bin

Install JDK

Install
# cd /home/tools
# chmod +x jdk-1_5_0_16-linux-i586-rpm.bin
#./ jdk-1_5_0_16-linux-i586-rpm.bin


Configuration

# vim /etc/profile
JAVA_HOME=/usr/java/jdk1.5.0_16
CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib
PATH=$PATH:$JAVA_HOME/bin

export JAVA_HOME PATH CLASSPATH

# source /etc/profile
# echo $JAVA_HOME

# cd /usr/bin
# ln -s -f /usr/java/jdk1.5.0_16/bin/java
# ln -s -f /usr/java/jdk1.5.0_16/bin/javac



Check

# java –version

java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
Java HotSpot(TM) Server VM (build 1.5.0_16-b02, mixed mode)

Install Jboss

Install
# su jboss
# cd /home/tools
# unzip -d /opt/ jboss-4.2.2.GA.zip


Configuration
# create group - change group id as needed
groupadd -g jboss

# create user - change user id as needed
useradd -g jboss -c "JBoss Admin" jboss


# vim /etc/profile 

JBOSS_HOME=/opt/jboss-4.2.2.GA
PATH=$PATH:$JBOSS_HOME/bin
export JBOSS_HOME PATH

# source /etc/profile
# echo $JBOSS_HOME

# chmod -Rf 755 $JBOSS_HOME


# vim jboss_init_redhat.sh

Add at front:
#JBOSS_HOST=${JBOSS_HOST:-"0.0.0.0"}
JBOSS_HOST=${JBOSS_HOST:-"192.168.150.75"}

Update the attributes:
JBOSS_HOME=${JBOSS_HOME:-"/opt/jboss-4.2.2.GA"} 
JBOSS_USER=${JBOSS_USER:-"jboss"} 
JAVAPTH=${JAVAPTH:-"/usr/java/jdk1.5.0_16/bin"} 
JBOSS_CONF=${JBOSS_CONF:-”default”} 

#if JBOSS_HOST specified, use -b to bind jboss services to that address
JBOSS_BIND_ADDR=${JBOSS_HOST:+"-b $JBOSS_HOST"}

#JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF"}

JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF $JBOSS_BIND_ADDR"}


Config for the shut down
#JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.sh -S -s $JBOSS_HOST"}
JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"cd $JBOSS_HOME/bin; $JBOSSCP"}

# vim run.conf
Update [Xmx can be set as the 80% of the max available memory]:
JAVA_OPTS=-Xms512m –Xmx1024m



Jboss Security

Security jmx-console:

#vim deploy/jmx-console.war/WEB-INF/jboss-web.xml

Uncomment this part:
<security-domain>java:/jaas/jmx-console</security-domain>

#vim deploy/jmx-console.war/WEB-INF/web.xml

Uncomment this part:
<security-constraint>
     <web-resource-collection>
       <web-resource-name>HtmlAdaptor</web-resource-name>
       <description>An example security config that only allows users with the
         role JBossAdmin to access the HTML JMX console web application
       </description>
       <url-pattern>/*</url-pattern>
       <http-method>GET</http-method>
       <http-method>POST</http-method>
     </web-resource-collection>
     <auth-constraint>
       <role-name>JBossAdmin</role-name>
     </auth-constraint>
</security-constraint>

Check the user file path of jmx-console:
#cat conf/login-config.xml

Update the user & password [Format username=password]:
#vim conf/props/jmx-console-users.properties
admin=admin


Security web-console:

#vim deploy/ management/console-mgr.sar/web-console.war/WEB-INF/jboss-web.xml

Uncomment this part:
<jboss-web> 
<depends>jboss.admin:service=PluginManager</depends> 
</jboss-web>

#vim deploy/ management/console-mgr.sar/web-console.war/WEB-INF/web.xml

Uncomment this part:
<security-constraint> 
<web-resource-collection> 
<web-resource-name>HtmlAdaptor</web-resource-name> 
<description>An example security config that only allows users with the 
role JBossAdmin to access the HTML JMX console web application 
</description> 
<url-pattern>/*</url-pattern> 
<http-method>GET</http-method> 
<http-method>POST</http-method> 
</web-resource-collection> 
<auth-constraint> 
<role-name>JBossAdmin</role-name> 
</auth-constraint> 
</security-constraint>

Check the user file path of web-console:
#cat conf/login-config.xml

Update the user & password [Format username=password]:
#vim console-mgr.sar/web-console.war/WEB-INF/classes/web-console-users.properties

admin=admin


Security invoker

Uncomment this paragraph in the “/deploy/jmx-invoker-service.xml” file.

<!-- Uncomment to require authenticated users
<interceptor code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
securityDomain="java:/jaas/jmx-console"/>
-->


Check
Check whether the Jboss is successful:

http:// 192.168.150.75/
http:// 192.168.150.75/jmx-console/
http:// 192.168.150.75/web-console/

3
3
分享到:
评论

相关推荐

    JBOSS负载均衡配置

    - `%JBoss_Home%\server\all\deploy`和`%JBoss_Home%\server\default\deploy`目录下的`deploy.last`、`jboss-web-cluster.sar`、`cluster-service.xml`和`ejb3-clustered-sfsbcache-service.xml`。 5. **配置集群...

    jboss集群配置方式及使用

    ### jboss集群配置方式及使用 #### JBoss简介与配置使用概述 JBoss是一套开源的应用服务器,由JBoss社区维护和支持。它提供了一个全面的企业级应用开发平台,支持多种应用部署模型,如Web应用程序、EJBs以及消息...

    Apache2.2.16+ mod_jk +Jboss4.2.3.GA集群

    - 配置会话复制需要编辑 `$JBOSS_HOME/server/default/deploy/jboss-web-cluster.sar/META-INF/jboss-service.xml` 和 `$JBOSS_HOME/server/default/deploy/cluster-service.xml` 文件。 - 集群中的所有节点必须处于...

    快速配置JBoss集群

    为了验证集群配置是否成功,可以在`%JBoss_Home%\server\default\deploy\jbossweb-tomcat55.sar\ROOT.war`目录下创建一个测试页面。 例如,创建`test`文件夹并放置三个JSP文件:`index.jsp`、`test_action.jsp`和`...

    jboss在linux上的安装

    - 在 `/usr/local/jboss-5.1.0.GA/` 目录下创建集群配置文件夹,例如 `cluster1`。 - 复制默认的配置文件夹到新创建的文件夹中:`cp -r server/default cluster1`。 - 修改 `cluster1` 中的配置文件以适应集群环境。...

    jboss集群

    以上是JBoss集群的基本配置和原理,具体步骤可以参考提供的两个博客文章:“在default目录下快速配置JBoss集群(Web方面)”和“JBoss安装,集群配置,负载均衡和session复制配置”。这些资源提供了详细的步骤指南和...

    Apache安装及jboss部署说明文档

    - JBoss 支持集群部署,可以在 `server/default/deploy/jboss-cluster-service.xml` 文件中配置集群相关的设置。 - **配置数据源,调整参数**: - 数据源配置通常位于 `server/default/deploy/datasources` 目录下...

    Sun MQ安装配置手册

    在一个磁盘空间较大的分区创建一个新的目录,如`mkdir /home/sunmq`,然后编辑`/opt/sun/mq/etc/imqenv.conf`,添加`IMQ_DEFAULT_VARHOME=/home/sunmq`,指定实例信息的存放位置。 4. **创建实例** 进入`/opt/sun...

Global site tag (gtag.js) - Google Analytics