RedHat Linux installation JDK, Maven, Jboss

Source: Internet
Author: User
Tags in domain jboss

The previous projects were all deployed under the Windows System environment, this time trying to deploy in a Linux system environment, so this time we have installed JDK on 7 hosts, Maven, JBoss One of the installed MySQL, and the LAN configuration, and finally finished. Below will install the steps to share with you!

system version:rhel-server-6.3-i386 32-bit operating system

hardware configuration : Kernel Intel (R) Pentium (r) 4 CPU 3.00GHz memory 998.5M

installation Environment : using shell commands


JDK Installation

1. First check to see if the system is installed, then uninstall and install the destination version if it is already installed

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >rpm-qa | grep jdk</span>

2. Assuming that the installed version is Java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5, execute the following command

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >RPM-E--nodeps java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5</span>

After uninstalling, perform the command in step 1 to verify that the uninstallation was successful

3. Our installation package jdk-8u45-linux-i586.rpm, execute the following command to install
<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >RPM-IVH jdk-8u45-linux-i586.rpm</span>
This command installs the JDK itself into the /usr/java/java1.8.0_45

4. When the installation command is executed, there may be an issue that does not have permission to execute, and the following command can be used to authorize

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >chmod +x jdk-8u45-linux-x64.rpm</span>

5. In order to unify the path, modify the folder name of the JDK

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >mv/usr/java/java1.8.0_45/usr/java/jdk1.8</span>
6. Execute the command, open the profile file, and configure the environment variables for the JDK

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >vi/etc/profile</span>

VI Open the file, open the default is the command mode, enter a or I can enter the editing mode, the following prompt insert ... At the end of the file, configure the following variables, press ESC to exit Edit, and then enter: Wq or: x Save exit. Configure as follows:


7. Save the changes after exiting to take effect

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >source/etc/profile</span>

8. Check the version information, verify the configuration is correct

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >java-version</span>
If the message appears, the installation configuration is successful

MAVEN Installation

Using the installation-free method, directly copy the destination folder to the destination folder and configure the environment variables.

1. Initial file is apache-maven-3.2.5-bin.tar.gz, first unzip the file

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >TAR-ZXVF apache-maven-3.2.5-bin.tar.gz</span>

2. Move the extracted file to/usr/local, and name it mamen-3.2.5

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >MV apache-maven-3.2.5/usr/local/maven-3.2.5</span>

3. Edit the profile file, configure environment variables

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >vi/etc/profile</span>

Edit as follows:


4. Making the edits effective

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >source/etc/profile</span>

5. Check the version information, verify the configuration is correct

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >mvn-v</span>
The configuration succeeds if the following information is present


JBoss Installation

The same is the installation-free way, the configuration is OK. Initial file is Jboss-eap-6.2.zip

1. Place the JBoss compression package under usr/local. The command is decompressed.

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >unzip jboss-eap-6.2.zip</span>

2. Rename the file jboss-eap-6.2 to jboss6.2 and copy it to usr/local/

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >MV jboss-eap-6.2 jboss6.2</span>

3. Start JBoss

You can enter the JBoss Bin directory by Cd/usr/local/jboss6.2/bin First and then enter the command./run.sh it will ask you to standalone (standalone run mode) to start the server or domain mode, Select the appropriate commands that they provide as needed.
./standalone.sh is the standalone operation mode
./domain.sh domain Mode
You may be prompted with insufficient permissions to run the command, and you can use the following command:

chmod 777 *

Add read/write/execute permissions for all files/folders.

View the console output command to see if the startup was successful


4. Add JBoss users. There are two types of management and application. Follow the steps below to get the line.

Under/usr/local/jboss6.2/bin, execute the command

<span style= "FONT-FAMILY:FANGSONG_GB2312;FONT-SIZE:18PX;" >./add-user.sh</span>

Follow the prompts to add users


This is where JBoss is configured.

At the end of the day, we show the memory footprint of the two JBoss run in domain mode:

Before starting


after startup


Memory consumption seems to be a bit of a hurry, and so deployment test to see if you want to expand memory.

RedHat Linux installation JDK, Maven, Jboss

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.