Setting up Glassfish Server on CentOS

All these steps are based on tutorial from

  1. yum install java-1.7.0-openjdk-devel
  2. Add following lines to /etc/profile: export PATH=$PATH:/usr/lib/jvm/java-1.7.0-openjdk- export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-
  3. Run this command to reload environment variables: source /etc/profile
  4. wget
  5. unzip -d /opt/oracle
  6. cd /opt/oracle/glassfish4/bin/
  7. ./asadmin start-domain
  8. ./asadmin create-service Found the Linux Service and successfully uninstalled it. The Service was created successfully. Here are the details: Name of the service:domain1 Type of the service:Domain Configuration location of the service:/etc/init.d/GlassFish_domain1 User account that will run the service: root You have created the service but you need to start it yourself. Here are the most typical Linux commands of interest:* /etc/init.d/GlassFish_domain1 start
    • /etc/init.d/GlassFish_domain1 stop
    • /etc/init.d/GlassFish_domain1 restart For your convenience this message has also been saved to this file: /opt/oracle/glassfish4/glassfish/domains/domain1/PlatformServices.log Command create-service executed successfully.
  9. ./asadmin change-admin-password . Initial admin password is blank. You need to change it to something else.
  10. ./asadmin --host --port 4848 enable-secure-admin
  11. Enjoy!

Leave a Reply