The system I use is: Redhat Linux Enterprise 4, JDK is: 1.4.2-11, jboss is: JBoss-4.0.3sp1
1. JDK installation and configuration
Install JDK
From Sun website, you can download any JDK version of JDK, which I have downloaded. I downloaded: J2SDK-1.4.2-11.bin, (for the first time, all software is downloaded with Firefox in graphics interface, vegetables what...);
Go to your directory where your JDK is located, then run ./j2sdk-1.4.2-11.bin, Enter. . . ,
At this time, the system will prompt to agree to the SUN protocol, of course, press the "Y" agreement agreement, then carriage return, will start to decompress after the return, will automatically generate a J2SDK-1.4.2 in the same directory after completion. 11 directory;
Copy this directory to / usr / local directory
Configure JDK Open Terminal Enter: VI / etc / profile, if you use a graphical interface, you can double-click to open the profile file directly to the / etc directory; edit this file to set the environment variable:
A few lines are added, as follows:
Java_home = / usr / local / j2sdk-1.4.2-11
PATH = $ PATH: $ java_home / bin
Classpath =.: $ Java_home / lib / dt.jar: $ java_home / lib / Tools.jar
Add Java_Home, ClassPath to the string behind the import,
Note: The interval between the variable attributes here is no longer like a semicolon ";" separated by a colon, but use the colon: "
The above process basically completed the JDK configuration, but when I installed JBOSS and launched it, I always reported that JVM was found, and I solved according to the following way.
Run the Which Java command, if Java is selected when installing the system, then the system comes with Java, in my system: / usr / sbin / java, this file will conflict with our own JDK conflicts (Even if the parameters are configured, the JDK that yourself is installed can also be used), which causes JBoss to identify the JDK path, and then the jboss is started normally after it is deleted.
Now restart the machine, JDK's configuration is completed.
2. JBoss installation and configuration installation JBoss JBoss is free, you can download one from www.jboss.org, mine is JBoss-4.0.3sp1.tar.gz;
Run tar -zxvf jboss-4.0.3sp1 decompression, get a folder of the same name in the same directory
; Copy this folder to usr / local
Simple configuration JBoss open terminal, vi / etc / profile,
Join one line: jboss_home = / usr / local / jboss directory name, save exit, add jboss_home to Import, save exit.
Now the simplest basic configuration of JBoss is almost good, you can enter
/ usr / local / jboss installation directory / bin directory, run: sh run.sh to launch your JBoss server;
Enter: http: // Host IP address: 8080, Enter, this should be able to see the initial interface of JBoss, but if other programs have been installed in the computer, the 8080 port is occupied, that can fail , Because port conflicts;
Change JBoss default port
This is the same as the configuration TOMCAT port operation, just change the port address of the web server in JBoss, the web server directory is: / usr / local / jboss installation directory /ser/default/deploy/jbossweb-tomcat55.sar. Modify this The following contents in Server.xml in the directory:
Port = "8080" Address = "$ {jboss.bind.address}" Maxthreads = "250" strategy = "ms" maxhttpheadersize = "8192" EMPTYSessionPath = "True" Enablelookups = "false" redirectport = "8443" acceptcount = "100" ConnectionTimeout = "20000" disableuploadtimeout = "true" /> Modify the port parameter to the required port number Configure the web virtual directory to find the following in Server.xml: AutodePloy = "false" DeployonStartup = "false" deployXML = "false"> Add a line below it to add a virtual directory Path = "/ weeklyreport" DocBase = "/ usr / local / weeklyreport" /> The PATH parameter is the virtual directory name entered in the browser, and DOCBASE is directories to local access. The above port and virtual directory configuration also apply to Tomcat 5.5, but it does not apply to the Tomcat 5.0 configuration completion after restarting JBoss Note: After the above configuration, JBoss configuration is basically completed, however, the current JBoss can not resolve JSP, Servlet and EJB, because it is missing a very important JAR package: Commons-IO- version number .jar, download this JAR package, put it JBoss installation directory / server / default / lib