In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Detailed explanation of the use, configuration and use of Jboss6.1
I. introduction:
JBoss is the result of the joint efforts of developers all over the world, an open source application server based on J2EE, because JBoss code is licensed by LGPL, you can use it in any commercial application for free without paying a fee.
(note: JBoss does not support servlet/JSP 's WEB container)
Download of Jboss: (http://jbossas.jboss.org/downloads.html) version of choice
III. JBoss has the following advantages:
1 JBoss is a free, open source implementation of J2EE, released under a LGPL license
2 JBoss requires relatively small memory and hard disk space
3 the installation is very simple, first extract the JBoss package file, and then configure some environment variables
4 JBoss can be "hot deployed". To deploy BEAN, simply copy the JAR file of BEAN to the deployment path and load it if it is not loaded. If it has already been loaded, update it automatically.
5 JBoss and Web server run in the same Java virtual machine, and Servlet calls EJB without going through the network, which greatly improves the running efficiency and security performance.
6 users can directly implement J2EE-EAR instead of implementing EJB-JAR and Web-WAR respectively, which is very convenient
7Jboss supports clusters
4. To configure the environment variable of jboss, you first need to specify the JAVA_HOME of JDK. (JDK, not JRE). Configure the installation directory for JBOSS_HOME. Run the Jboss installation directory "bin/run.bat" such as the dos window is not abnormal, the configuration is successful.
. Set the default project
Step 1: add the file jboss-web.xml under web-inf in the project to be set up
The main contents are as follows:
/
Step 2: change the ROOT.war under server\ default\ deploy\ to lowercase root.war
Step 3: start or restart JBOSS
5. Modify the port of Jboss: (for example, the port on which we usually use Tomcat or oracle will conflict with this)
% JBOSS_HOME%/server/default/deploy/jbossweb.sar/server.xml compilation is modified as follows: search HTTP/1.1 is changed to:
Port is the port number address is local area network or local access
6. Configure the data source:
Use the xml file in JBoss to configure the data source and find the% JBOSS_HOME%/docs/examples/jca file. There are configuration examples of various databases. This time the configuration Oracle found the oracle-ds.xml file. Modify information such as driver-class and user-name,password.
Copy the modified oracle-ds.xml file to the% JBOSS_HOME%/server/default/deploy directory
Database driver Copy to% JBOSS_HOME%/server/default/lib directory. Restart the configuration successfully.
Seven. User configuration of security
JMX Security configuration:
① found JBOSS_HOME%/common/deploy/jmx-console.war/WEB-INF/jboss-web.xml
According to the instructions. Remove comments that require login information
② found JBOSS_HOME%/common/deploy/jmx-console.war/WEB-INF/web.xml
Cancel such as * explanation: (turn on its authentication login)
HtmlAdaptor
An example security configthat only allows users with the
Role JBossAdmin to access the HTML JMXconsole web application
/ *
JBossAdmin
③ configure the login information of the user
Find% JBOSS_HOME%/server/default/conf/login-config.xml with the following code:
Props/jmx-console-users.properties
Props/jmx-console-roles.properties
User name and password are configured in props/jmx-console-users.properties
Roles are configured in props/jmx-console-roles.properties
④ opens two files to modify account information and role information.
Security configuration of Web-console:
① opens% JBOSS-Home%/common/deploy/jbossws-console.war/WEB-INF/jboss-web.xml, remove comments according to the instructions
Java:/jaas/JBossWS
Jbossws
② opens JBOSS-Home%/common/deploy/jbossws-console.war/WEB-INF/web.xml
Remove the comments according to the instructions
A security constraint that restricts access
ContextServlet
An example securityconfig that only allows users with the
Role 'friend' to access the JBossWS consoleweb application
/ *
Friend
③ configure the login information of the user
JBossWS's security domain and running role friend are both configured in% JBOSS_HOME%/server/default/conf/login-config.xml
Props/jbossws-users.properties
Props/jbossws-roles.properties
Anonymous
④ changes passwords and roles
Open% JBOSS_HOME%/server/default/conf/props/jbossws-user.properties to change your password.
Open% JBOSS_HOME%/server/default/conf/props/jbossws-roles.properties to change your password.
Note: the JSP server function is also included in JBoss, and it listens on port 8080, so Tomcat and JBoss cannot be started on the same computer at the same time. By default, JBoss only listens for localhost requests. If you want computers on the LAN to access them,
Command line runs run.bat-b 0.0.0.0
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.