Installing GlassFish4.0 Process notes on CentOS 6.5

Source: Internet
Author: User
Tags glassfish

Installing GlassFish4.0 Process notes on CentOS 6.5

1. Install the JDK, note the number of digits of the operating system, or 32:

[Email protected] ~]# Mkdir/usr/java
[Email protected] ~]# Cd/usr/java
[[email protected] Java] #rpm-uvh/bak/jdk-7u55-linux-x64.rpm

[Email protected] java]# java_home=/usr/java/jdk1.7.0_55
[Email protected] java]# export Java_home
[Email protected] java]# path= $JAVA _home/bin: $PATH
[Email protected] java]# export PATH

[Email protected] java]# Vi/etc/profile
Java_home=/usr/java/jdk1.7.0_55
Export Java_home
Path= $JAVA _home/bin: $PATH
Export PATH
[Email protected] java]# Source/etc/profile

[Email protected] ~]# echo $JAVA _home
/usr/java/jdk1.7.0_55

2. Download and install GlassFish 4, ML multi-language version

[Email protected] ~]# MV Glassfish-4.0-ml.zip/usr/share/glassfish-4.0-ml.zip
[Email protected] ~]# Cd/usr/share
[Email protected] share]# unzip-q glassfish-4.0-ml.zip

[Email protected] share]# Groupadd webserver
[Email protected] share]# useradd-m-G webserver-g webserver WebApp
[[email protected] share]# ID WebApp
[Email protected] share]# passwd WebApp
[Email protected] share]# chown-r WEBAPP:WEBSERVE/USER/SHARE/GLASSFISH4

3. Set the running GlassFish as the service

[Email protected] ~]# CD/ETC/INIT.D
[Email protected] init.d]# VI GlassFish
#!/bin/bash
# description:glassfish Start Stop Restart
# Processname:glassfish
# chkconfig:234 20 80
Java_home=/usr/java/jdk1.7.0_55
Export Java_home
Path= $JAVA _home/bin: $PATH
Export PATH
Glassfish_home=/usr/share/glassfish4/glassfish

Case $ in
Start
SH $GLASSFISH _home/bin/asadmin Start-domain domain1
;;
Stop
SH $GLASSFISH _home/bin/asadmin Stop-domain domain1
;;
Restart
SH $GLASSFISH _home/bin/asadmin Stop-domain domain1
SH $GLASSFISH _home/bin/asadmin Start-domain domain1
;;
Esac
Exit 0


[Email protected] init.d]# chmod 755 GlassFish
[Email protected] init.d]# chkconfig--add GlassFish
[Email protected] init.d]# chkconfig--level 234 glassfish on

4. Start GlassFish

[[Email protected] init.d]# service GlassFish start
Waiting for domain1 to start ....
Successfully started the Domain:domain1
Domain Location:/usr/share/glassfish4/glassfish/domains/domain1
Log File:/usr/share/glassfish4/glassfish/domains/domain1/logs/server.log
Admin port:4848
Command Start-domain executed successfully.

5. Modify the admin admin account password

[[email protected] INIT.D] #cd/usr/share/glassfish4/glassfish/bin
[Email protected] bin]#./asadmin Change-admin-password

6. Setting up remote access

[Email protected] bin]#./asadmin--host 192.168.1.114--port 4848 enable-secure-admin

7. Restart GlassFish

[[Email protected] ~] #service glassfish Restart

8. If access is not available, be careful to turn on firewall 4848, 80 port

[[Email protected] ~] #vi/etc/sysconfig/iptables
-A input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 4848-j ACCEPT
[Email protected] ~]#/etc/init.d/iptables restart

9. Close the GlassFish service

[[Email protected] ~]# service GlassFish stop
Waiting for the domain to stop ....
Command Stop-domain executed successfully.

Ubuntu 12.04 Installation GlassFish3.1.2 http://www.linuxidc.com/Linux/2012-06/62545.htm

CentOS installation GlassFish4.0 configuration jdbc Connection MySQL http://www.linuxidc.com/Linux/2014-07/104572.htm

GlassFish Details : please click here
GlassFish : please click here.

For more information on CentOS, see the centos feature page http://www.linuxidc.com/topicnews.aspx?tid=14

This article permanently updates the link address : http://www.linuxidc.com/Linux/2014-10/108419.htm

Installing GlassFish4.0 Process notes on CentOS 6.5

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.