Install & Configure GlassFish on CentOS/RHEL 6x
-- GlassFish is an Application Server which can also be used as a Web Server (Http Server). GlassFish Server is the world's first implementation of the Java Platform.
Step: 1. Bind Hosts File :
# vi /etc/hosts
10.100.97.39 ser3.domain.com ser3
-- Save & Quit (:wq)
Step: 2. Disable Selinux & Stop Firewall :
# vi /etc/sysconfig/selinux
SELINUX=disabled
-- Save & Quit (:wq)
# service iptables stop
# chkconfig iptables off
Step: 3. Install NTP Server (for Time Synchronization) :
# yum -y install ntp
# service ntpd restart
# chkconfig ntpd on
# ntpdate pool.ntp.org
# init 6
Step: 4. Installing the Java :
# yum -y install wget
# cd /opt
# wget --no-check-certificate --no-cookies --header 'Cookie: oraclelicense=accept-securebackup-cookie' http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.rpm
# yum -y install jdk-8u5-linux-x64.rpm
Step: 5. Setup JAVA_HOME Variable :
# export JAVA_HOME=/usr/java/jdk1.8.0_05
# export PATH=$PATH:$JAVA_HOME
# echo $JAVA_HOME
Step: 6. Edit the Java Profile :
# vi /etc/profile.d/java.sh
#!/bin/bash
JAVA_HOME=/usr/java/jdk1.8.0_05
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME
export CLASSPATH=.
-- Save & Quit (:wq)
# chmod +x /etc/profile.d/java.sh
# source /etc/profile.d/java.sh
Step: 7. Check Version of JAVA :
# java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Client VM (build 25.5-b02, mixed mode)
Step: 8. Download & Extract Glassfish :
# yum -y install unzip
# cd /opt
# wget http://download.java.net/glassfish/4.1.1/release/glassfish-4.1.1.zip
# wget http://download.java.net/glassfish/4.0/release/glassfish-4.0.zip
# unzip glassfish-4.1.1.zip
Step: 9. Start the GlassFish Server :
# /opt/glassfish4/bin/asadmin start-domain
Waiting for domain1 to start .........
Successfully started the domain : domain1
domain Location: /opt/glassfish4/glassfish/domains/domain1
Log File: /opt/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.
Step: 10. Set GlassFish Admin Password (By Default Password is Blank) :
# cd /opt/glassfish4/bin/
# ./asadmin
asadmin> change-admin-password
Enter admin user name [default: admin]> Just Press Enter.
Enter the admin password> Just Press Enter.
Enter the new admin password> Passw0rd (Press Enter.)
Enter the new admin password again> Passw0rd (Press Enter.)
Command change-admin-password executed successfully.
Step: 11. Enabled to Access the DAS Remotely on GlassFish :
asadmin> enable-secure-admin
Enter admin user name> admin
Enter admin password for user "admin"> Passw0rd
You must restart all running servers for the change in secure admin to take effect.
Command enable-secure-admin executed successfully.
asadmin> stop-domain
Waiting for the domain to stop .
Command stop-domain executed successfully.
asadmin> start-domain
Waiting for domain1 to start .......
Successfully started the domain : domain1
domain Location: /opt/glassfish4/glassfish/domains/domain1
Log File: /opt/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.
asadmin> exit
Command multimode executed successfully.
Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog
0 comments:
Post a Comment