Install JDK1.8.60 and glassfish4.1.1 original under CentOS

Source: Internet
Author: User
Tags glassfish

First, installation environment

Operating system

Windows7 Enterprise 64-bit

The software that needs to be used

jdk:jdk-8u60-linux-x64.rpm

Glassfish:glassfish4.1.1.zip

Second, installation Preparation

Step1: Copy the JDK files on the host to the virtual machine.

Check that the virtual machine is open for FTP service first

Open the command line and enter the following command

Switch to root super user first

Su root (enter password)

Su-

Rpm–qa|grep vsftpd

If not installed, use the command to install

Yum–y Install VSFTPD

Installing the XFTP software under Windows

Create a new connection after running

Virtual machine IP Viewing mode: command: ifconfig

Use Xftp to put the downloaded JDK into the USR directory.

Another way: Drag files under Windows directly onto the desktop under CentOS. The files are then moved or copied to other folders via the MV command or the CP command.

Third, install the JDK

To enter the virtual machine, run the command line:

Switch to Super User first

Switch to usr folder

Cd/usr

LS (view file)

Run the Setup program

Mkdir/usr/java

chmod +x jdk-8u60-linux-x64.rpm (Tab key can be used)

RPM–IVH jdk-8u60-linux-x64.rpm

As shown

Configuring the Operating Environment

Vi/etc/profile

#java环境变量

java_home=/usr/java/jdk1.8.60 (Enter the path of your own installation)

Export JRE_HOME=/USR/JAVA/JDK1.8.60/JRE

Export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH

Export path= $JAVA _home/bin: $JRE _home/bin: $PATH

The two ways to add environment variables are

The final ticket is installed successfully

Command line Run Java–version

Displays the version information, indicating that the installation was successful.

Iv. installation of GlassFish

Step1: Use xftp to copy downloaded files to the USR directory under CentOS

Run the command line

Unzip-q Glassfish-4.1.1.zip

Mkdir/usr/glassfish

MV Glassfish4/usr/glassfish

Start

Cd/usr/glassfish/glassfish4/glassfish/bin

./startserv

8080 ports:

Console: 4848 ports

Remote access requires firewall configuration

To view the firewall configuration:

Service Iptables Status

[Email protected] ~]vi/etc/sysconfig/iptables

Add the following rule configuration

-A input-m state--state new-m tcp-p TCP--dport 4848-j ACCEPT

-A input-m state--state new-m tcp-p TCP--dport 8080-j ACCEPT

-A input-m state--state new-m tcp-p TCP--dport 8181-j ACCEPT

-A input-m state--state new-m tcp-p TCP--dport 3700-j ACCEPT

-A input-m state--state new-m tcp-p TCP--dport 7676-j ACCEPT

-A input-m state--state new-m tcp-p TCP--dport 3306-j ACCEPT

Save and exit and restart the firewall.

[Email protected] ~]service iptables restart

Log in to another computer on the LAN

/HTTP Server ip:4848

#设置管理员账号和口令

Cd/usr/glassfish/glassfish4/glassfish/bin

SH asadmin change-admin-password #开启远程管理

SH asadmin enable-secure-admin

To turn on remote access:

SH asadmin enable-secure-admin

Restart Service

After this, enter the command:

./startserv

Remote Connection Console (4848 port), using username (Admin) and password (admin):

Remote connection 8080 Port:

Install JDK1.8.60 and glassfish4.1.1 original under CentOS

Related Article

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.