Jboss的版本是4.2.1,在Linux中的安装目录为/mnt/semantic/jboss-4.2.1
1、linux系统i18n设置让tomcat和websphere不乱码:
vi /etc/syscopnfig/i18n
LANG="zh_CN.UTF-8"
SUPPORTED="zh_CN.GBK:zh:zh_CN.GB2312:zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"
2、修改字符集设置
vi /etc/profile
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
source /etc/profile
3、修改Jboss服务器端口
vi /mnt/semantic/jboss-4.2.1/server/default/deploy/jboss-web.deployer/server.xml
<!--<Connector port="8081" address="${jboss.bind.address}" -->
<Connector port="8081" address="0.0.0.0"
maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
4、修改日志文件配置,防止LOG文件无限制增大
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.log.dir}/server.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="1000KB"/>
<param name="MaxBackupIndex" value="1"/>
<!-- Rollover at midnight each day -->
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<!-- Rollover at the top of each hour
<param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
-->
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
<!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
<param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
-->
</layout>
</appender>
5、工程发布
JBoss支持热部署,也就是war文件部署到服务器上后不需要重新启动JBoss(Tomcat不支持这种特性)。war文件的部署很简单,直接将war文件拷贝到JBoss\server\default\deploy目录下即可。
原文 :http://blog.sina.com.cn/s/blog_6b706e1501011tje.html