<!--[if !supportLists]-->1. <!--[endif]-->下载安装jdk1.5以上版本
Cd /usr/local
Sh jdk-1_5_0_09-linux-i586.bin
<!--[if !supportLists]-->2. <!--[endif]-->Jboss5.1.0的安装
Unzip jboss-5.1.0.GA.zip
Mv jboss-5.1.0.GA jboss5.1.0
<!--[if !supportLists]-->3. <!--[endif]-->环境变量设置
Vi /etc/profile在最后边添加如下信息
JAVA_HOME=/usr/java/jdk1.5.0_09
CLASSPATH=.:$JAVA_HOME/lib.tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
<!--[if !supportLists]-->4. <!--[endif]-->Jboss配置
<!--[if !supportLists]-->1) <!--[endif]-->修改端口
Cd /usr/local/jboss5.1.0/server/default/deploy/jbossweb.sar
Vi server.xml
<!-- A HTTP/1.1 Connector on port 8080 -->
<Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"
connectionTimeout="20000" redirectPort="8443" />
将8080端口修改为80或其它需要的端口,将address后的jboss.bind.address改为本机的ip地址或者0.0.0.0,注意如果ip地址不修改且启动时没有绑定ip地址jboss启动后会无法访问。
<!--[if !supportLists]-->2) <!--[endif]-->修改默认启动首页顺序
Cd /usr/local/jboss5.1.0/server/default/deployers/jbossweb.deployer
Vi web.xml
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!--[if !supportLists]-->3) <!--[endif]-->安全设置
<!--[if !supportLists]-->a) <!--[endif]-->jmx-console 登录的用户名和密码设置
默认情况访问 http://localhost/jmx-console 就可以浏览jboss的部署管理的一些信息,不需要输入用户名和密码,使用起来有点
安全隐患。下面我们针对此问题对jboss进行配置,使得访问jmx- console也必须要知道用户名和密码才可进去访问。步骤如下:
找到JBoss安装目录/server/default/deploy/jmx-console.war/WEB-INF/jboss-web.xml文件,去掉<security-domain>java:/jaas/jmx-console</security- domain>的注释。修改后的该文件内容为:
<jboss-web>
<!-- Uncomment the security-domain to enable security. You will need to edit the htmladaptor login configuration to setup the
login modules used to authentication users.-->
<security-domain>java:/jaas/jmx-console</security-domain>
</jboss-web>
<!--[if !supportLists]-->b) <!--[endif]-->找到/server/default/deploy/jmx-console.war/WEB-INF/web.xml文件查找到<security-constraint/>节点,去掉它的注释,修
<!--[if !supportLists]-->b)<!--[endif]-->改后该部分内容为:
<!-- A security constraint that restricts access to the HTML JMX console
to users with the role JBossAdmin. Edit the roles to what you want and
uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
secured access to the HTML JMX console. -->
<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>
<!--[if !supportLists]-->c) <!--[endif]-->在第一步中的jmx-console安全域和第二步中的运行角色JBossAdmin都是在login-config.xml中配置,我们在JBoss安装目录/server/default/config下找到它。查找名字为:jmx-console的application-policy:
<application-policy name = "jmx-console">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required">
<module-option name="usersProperties">props/jmx-console-users.properties</module-option>
<module-option name="rolesProperties">props/jmx-console-roles.properties</module-o在此处可以看出,登录的角色、用户等的信息分别在props目录下的jmx-console-roles.properties和jmx-console-users.properties文件中设置,分别打开这两个文件ption>
</login-module>
</authentication>
</application-policy>
其中jmx-console-users.properties文件的内容如下:
# A sample users.properties file for use with the UsersRolesLoginModule
admin=admin
该文件定义的格式为:用户名=密码,在该文件中,默认定义了一个用户名为admin,密码也为admin的用户,可将其改成所需的
用户名和密码。
jmx-console-roles.properties的内容如下:
# A sample roles.properties file for use with the UsersRolesLoginModule
admin=JBossAdmin, HttpInvoker
分享到:
相关推荐
Jboss安装配置手册
JBoss安装与配置 教程 好东西.ppt
Jboss的配置安装Jboss的配置安装Jboss的配置安装Jboss的配置安装Jboss的配置安装
JBOSS5.1安装配置说明,说明Windows下JBoss的配置方法
Apache2.2+JBOSS 5 在LIUXN下的集群配置
Jboss7.1安装配置(linux环境)
linux系统jboss安装linux系统jboss安装linux系统jboss安装linux系统jboss安装linux系统jboss安装linux系统jboss安装linux系统jboss安装linux系统jboss安装linux系统jboss安装linux系统jboss安装linux系统jboss安装...
JBoss篇:安装与配置
1.17 JBoss 5.0 安装与配置详解 1.18 JBOSS安装配置 1.19 Oracle,MySql,SQL server分页 1.20 Jboss下的第一个EJB程序 1.21 JNDI 1.22 JNDI配置原理详解 1.23 JSF+Seam框架学习心得 1.24 java jdbc驱动的四...
JBoss安装配置Myeclipse10图文详解
linux下jboss安装与配置详细说明
Jboss服务器常用配置
本文将尝试指导你通过一些必要的步骤来安装一个完全可运行的JBoss服务器,并顺便了解一些有关JBoss的其他信息。
jboss服务器配置https环境的详细方法
Jboss + 优化配置 Jboss内存优化 Jboss数据库连接池优化 Jboss部署目录优化 Jboss应用安全加固
手把手系列-Eclipse+JBossIDE+JBoss开发环境配置
jboss7以上版本发布ejb时需要的配置文件,jboss-ejb3.xml和ejb-jar.xml,缺少csdn分数所以上传,请见谅。
jboss的安装与ejb的工程的配置(原创)
[Packt Publishing] JBoss AS 7 配置部署管理教程 (英文版) [Packt Publishing] JBoss AS 7 Configuration, Deployment and Administration (E-Book) ☆ 出版信息:☆ [作者信息] Francesco Marchioni [出版机构...
如何在MyEclipse配置Jboss