Install, deploy Glassfish
GlassFish is a robust, commercially compatible Application Server for product-level quality and can be used for development, deployment, and redistribution free of charge.
Environment: CentOS 7.2
Steps:
First, Deploying the JDK environment
# tar zxf jdk-8u91-linux-x64.tar.gz && rm-rf jdk-8u91-linux-x64.tar.gz
# MV jdk1.8.0_91//USR/LOCAL/JDK
# vim/etc/profile.d/java.sh
# cat/etc/profile.d/java.sh
Java_home=/usr/local/jdk
java_bin= $JAVA _home/bin
Jre_home= $JAVA _home/jre
Path= $PATH: $JAVA _home/bin: $JAVA _home/jre/bin
Classpath= $JAVA _home/jre/lib: $JAVA _home/lib: $JAVA _home/jre/lib/charsets.jar
# source/etc/profile.d/java.sh
# java-version
Java Version "1.8.0_91"
Java (TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot (TM) 64-bit Server VM (build 25.91-b14, Mixed mode)
Second, installation Glassfish
# Unzip Glassfish-4.1.1.zip
# MV glassfish4//usr/local/glassfish
#cd /usr/local/glassfish/glassfish/bin
Start Glassfish( You must ensure that hostname and IP are added to the /etc/hosts corresponding records )
#./startserv &
# Netstat-anput |grep Java
t CP6 0 0 :::8686 :::* listen 12826/java
tcp6 0 0 :::4848 :::* LISTEN 12826/java
tcp6 0 0 :::8080 :::* LISTEN 12826/java
tcp6 0 0 :::3700 :::* LISTEN 12826/java
TCP6 0 0::: 8181:::* LISTEN 12826/java
TCP6 0 0::: 7676:::* LISTEN 12826/java
Open firewall port
# firewall-cmd--zone=public--add-port=8686/tcp--permanent
# firewall-cmd--zone=public--add-port= 4848 /tcp--permanent
# firewall-cmd--zone=public--add-port=8 080 /tcp--permanent
# firewall-cmd--zone=public--add-port= 3700 /tcp--permanent
# firewall-cmd--zone=public--add-port= 8181 /tcp--permanent
# firewall-cmd--zone=public--add-port= 7676/ TCP--permanent
#firewall-cmd--reload
Set Administrator account and password
# cd/usr/local/glassfish/glassfish/bin/
# ./asadmin Change-admin-password
Enter Admin user name [default:admin]>
Enter the admin password>
Enter the new admin password>
Enter the new admin password again>
Command Change-admin-password executed successfully.
Turn on remote access
# ./asadmin enable-secure-admin
Enter Admin User name> Admin
Enter admin password for user "admin" >
You must restart all running servers for the change on secure admin to take effect.
Command Enable-secure-admin executed successfully.
Restart Service
# ./stopserv
Command Stop-domain executed successfully.
#./ Startserv
After restarting the service, you can use the account created above to connect the console remotely
https://hostname:4848 or server ip:4848
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/7F/93/wKioL1cjJ0LjWIUwAACsPlF3Ies264.jpg "style=" float: none; "title=" 1.JPG "alt=" Wkiol1cjj0ljwiuwaacsplf3ies264.jpg "/>
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/7F/93/wKioL1cjJ0Ogh1IqAAGND1Zoz1A932.jpg "style=" float: none; "title=" 2.JPG "alt=" Wkiol1cjj0ogh1iqaagnd1zoz1a932.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/7F/95/wKiom1cjJnbwx4DbAAF22wekS_8270.jpg "style=" float: none; "title=" 3.JPG "alt=" Wkiom1cjjnbwx4dbaaf22weks_8270.jpg "/>
Deploy a simple application
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/7F/93/wKioL1cjJ0Sw8PGfAAIAZzUbt1o761.jpg "style=" float: none; "title=" 4.JPG "alt=" Wkiol1cjj0sw8pgfaaiazzubt1o761.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/7F/95/wKiom1cjJneBnRklAAC9OF9Ggag922.jpg "style=" float: none; "title=" 5.JPG "alt=" Wkiom1cjjnebnrklaac9of9ggag922.jpg "/>
After successful deployment , You can log in to Http://hostname:8080/hello Access
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7F/93/wKioL1cjJ0WiWfZCAABcjvYxM_0818.jpg "style=" float: none; "title=" 6.JPG "alt=" Wkiol1cjj0wiwfzcaabcjvyxm_0818.jpg "/>
This article is from the "10319031" blog, please be sure to keep this source http://10329031.blog.51cto.com/10319031/1769068
CentOS 7 Installation, deployment GlassFish