Jboss-5.1配置

 

jboss-5.1.0.GA配置

关键字: jboss-5.1.0.ga

jboss-5.1.0.GA-jdk6.zip配置:
1. JDK安装后的配置:
在环境变量中添加JAVA_HOME变量,其值设置为:JDK的安装路径C:/Java/jdk6.0
在系统变量里添加CLASSPATH变量,其值设置为:.;%JAVA_HOME%/lib/dt.jar; %JAVA_HOME%/lib/tools.jar;
然后在系统变量里找到path变量,在其值最后添加 ; %JAVA_HOME%/bin
2. 下载安装jboss
      下载地址: http://www.jboss.org/jbossas/downloads
下载完成后,将其解压缩后即可完成安装,解压缩后将其放置到一个不带空格的目录(若目录带有空格,例如:C:"Program Files,日后可能会产生一些莫名的错误),同时在“环境变量设置”中设置名为JBOSS_HOME的环境变量,值为JBoss的安装路径,
     在此,JBoss的安装工作已经结束,可通过如下方式测试安装是否成功:
运行JBoss安装目录"bin"run.bat,如果窗口中没有出现异常,且出现:10:11:08,656 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=
JBoss_5_1_0_GA date=200905221634)] Started in 1m:6s:110ms字样,则表示安装成功。
我们可以通过访问: http://localhost:8080/ 进入JBoss的欢迎界面,点击JBoss Management下的JMX Console可进入JBoss的控制台。
若启动失败,可能由以下原因引起:
1)    JBoss所用的端口(8080,1099,1098,8083等)被占用。一般情况下为8080端口被占用(例如,Oracle占用了8080端口),此时需要修改JBoss的端口,方法为进入JBoss安装目录" jboss-5.1.0.GA/server/default/deploy/jbossweb.sar目录,修改其下的server.xml目录,在此文件中搜索8080,将其改成你想要的端口即可(例如8088);
2)     JDK安装不正确;
3)      JBoss下载不完全。
3. JBoss 的配置
1)     日志文件设置:
        若需要修改JBoss默认的log4j设置,可修改JBoss安装目录"server/default/conf下的jboss-log4j.xml文件,在该文件中可以看到,log4j的日志输出在JBoss安装目录"server/default/log下的server.log文件中。对于log4j的设置,读者可以在网上搜索更加详细的信息。
2)     web 服务的端口号的修改:
这点在前文中有所提及,即修改JBoss安装目录"server"default"deployer"jboss-web.deployer下的server.xml文件,内容如下:
<Connector port="8080" address="${jboss.bind.address}"   
         maxThreads="250" maxHttpHeaderSize="8192"
         emptySessionPath="true" protocol="HTTP/1.1"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         connectionTimeout="20000" disableUploadTimeout="true" />
将上面的8080端口修改为你想要的端口即可。重新启动JBoss后访问: http://localhost/:新设置的端口,可看到JBoss的欢迎界面。
声明:本文转自 http://deer.iteye.com/blog/416787
deploy/jbossweb-tomcat55.sar/server.xml <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" prefix="access_log." suffix=".log" pattern="%h %t %r %s %D" directory="${jboss.server.home.dir}/../output/logs" resolveHosts="false" /> http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html pattern配置: %a - Remote IP address %A - Local IP address %b - Bytes sent, excluding HTTP headers, or '-' if zero %B - Bytes sent, excluding HTTP headers %h - Remote host name (or IP address if resolveHosts is false) %H - Request protocol %l - Remote logical username from identd (always returns '-') %m - Request method (GET, POST, etc.) %p - Local port on which this request was received %q - Query string (prepended with a '?' if it exists) %r - First line of the request (method and request URI) %s - HTTP status code of the response %S - User session ID %t - Date and time, in Common Log Format %u - Remote user that was authenticated (if any), else '-' %U - Requested URL path %v - Local server name %D - Time taken to process the request, in millis %T - Time taken to process the request, in seconds %I - current request thread name (can compare later with stacktraces) There is also support to write information from the cookie, incoming header, outgoing response headers, the Session or something else in the ServletRequest. It is modeled after the apache syntax: %{xxx}i for incoming request headers %{xxx}o for outgoing response headers %{xxx}c for a specific request cookie %{xxx}r xxx is an attribute in the ServletRequest %{xxx}s xxx is an attribute in the HttpSession The shorthand pattern name common (which is also the default) corresponds to '%h %l %u %t "%r" %s %b'.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值