{"id":58,"date":"2016-08-25T17:14:43","date_gmt":"2016-08-25T14:14:43","guid":{"rendered":"http:\/\/andre.hwt.ru\/?p=58"},"modified":"2016-09-02T14:57:47","modified_gmt":"2016-09-02T11:57:47","slug":"install-glassfish4-on-centos-6","status":"publish","type":"post","link":"https:\/\/andre.hwt.ru\/?p=58","title":{"rendered":"install glassfish4 on CentOS 6"},"content":{"rendered":"<div class=\"js-gist-file-update-container js-task-list-container file-box\"><\/div>\n<div class=\"js-gist-file-update-container js-task-list-container file-box\"><\/div>\n<div class=\"js-gist-file-update-container js-task-list-container file-box\">\n<h4>download and install<\/h4>\n<div class=\"highlight highlight-source-shell\">\n<pre><span class=\"pl-c\"># wget http:\/\/download.java.net\/glassfish\/4.0\/release\/glassfish-4.0.zip<\/span>\r\n<span class=\"pl-c\"># unzip glassfish-4.0.zip<\/span>\r\n<span class=\"pl-c\"># mv glassfish4 \/usr\/local<\/span><\/pre>\n<\/div>\n<h3><\/h3>\n<h3><a id=\"user-content-confirm-installation\" class=\"anchor\" href=\"https:\/\/gist.github.com\/thatbin\/9309219#confirm-installation\"><\/a>confirm installation<\/h3>\n<\/div>\n<p><!--more--><\/p>\n<div class=\"js-gist-file-update-container js-task-list-container file-box\">\n<div id=\"file-gistfile1-md\" class=\"file\">\n<div id=\"readme\" class=\"readme blob instapaper_body\">\n<article class=\"markdown-body entry-content\">\n<div class=\"highlight highlight-source-shell\">\n<pre><span class=\"pl-c\"># cd \/usr\/local\/glassfish4\/bin<\/span>\r\n<span class=\"pl-c\"># .\/asadmin start-domain<\/span>\r\n\r\n<span class=\"pl-k\">&lt;<\/span>open http:\/\/hostname:8080, http:\/\/hostname:<span class=\"pl-k\">4848&gt;<\/span>\r\n\r\n<span class=\"pl-c\">#.\/asadmin stop-domain\r\n<\/span>\r\n<\/pre>\n<\/div>\n<h3><a id=\"user-content-configuate-secure-admin-access\" class=\"anchor\" href=\"https:\/\/gist.github.com\/thatbin\/9309219#configuate-secure-admin-access\"><\/a>Configuate Secure Admin Access<\/h3>\n<p>when you access glass admin console on port 4848, you will get <code>Secure Admin must be enabled to access the DAS remotely.<\/code>error.<br \/>\nGlassfish force you access admin console remotely by https. <a href=\"http:\/\/charleech.wordpress.com\/2012\/03\/23\/glassfish-version-3-1-2-secure-admin-must-be-enabled-to-access-the-das-remotely\/\">reference<\/a><\/p>\n<pre><code>#.\/asadmin\r\n\r\nasadmin&gt; change-admin-password\r\nEnter admin user name [default: admin]&gt;admin\r\nEnter the admin password&gt;\r\nEnter the new admin password&gt;\r\nEnter the new admin password again&gt;\r\nCommand change-admin-password executed successfully.\r\n\r\nasadmin&gt; enable-secure-admin\r\nEnter admin user name&gt;  admin\r\nEnter admin password for user \"admin\"&gt;\r\nYou must restart all running servers for the change in secure admin to take effect.\r\nCommand enable-secure-admin executed successfully.\r\n\r\nasadmin&gt; stop-domain\r\nWaiting for the domain to stop .\r\nCommand stop-domain executed successfully.\r\n\r\nasadmin&gt; start-domain\r\nWaiting for domain1 to start .....\r\nSuccessfully started the domain : domain1\r\ndomain  Location: \/usr\/local\/glassfish4\/glassfish\/domains\/domain1\r\nLog File: \/usr\/local\/glassfish4\/glassfish\/domains\/domain1\/logs\/server.log\r\nAdmin Port: 4848\r\nCommand start-domain executed successfully.\r\n<\/code><\/pre>\n<p>open <code>http:\/\/hostname:4848<\/code>, and you can login now.<\/p>\n<h3><a id=\"user-content-set-glassfish-as-a-service\" class=\"anchor\" href=\"https:\/\/gist.github.com\/thatbin\/9309219#set-glassfish-as-a-service\"><\/a>set glassfish as a service<\/h3>\n<pre><code>create \/etc\/init.d\/glassfish.\r\n\r\n# chkconfig --add glassfish\r\n# chkconfig glassfish on\r\n\r\n# service glashfish start\r\n<\/code><\/pre>\n<\/article>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"js-gist-file-update-container js-task-list-container file-box\">\n<div id=\"file-glassfish\" class=\"file\">\n<div class=\"file-actions\">\n<pre>#!bin\/bash\r\n\r\n# description: glassfish start stop restart\r\n# processname: glassfish\r\n# chkconfig: 2345 95 20\r\n\r\nGLASSFISH_HOME=\/usr\/local\/glassfish4\r\nRETVAL=0\r\n\r\ncase \"$1\" in\r\n        start)\r\n                \"$GLASSFISH_HOME\/bin\/asadmin\" \"start-domain\"\r\n                ;;\r\n        stop)\r\n                \"$GLASSFISH_HOME\/bin\/asadmin\" \"stop-domain\"\r\n                ;;\r\n        restart)\r\n                \"$GLASSFISH_HOME\/bin\/asadmin\" \"restart-domain\"\r\n                ;;\r\n        *)\r\n                echo $\"Usage: $0 {start|stop|restart}\"\r\n                RETVAL=1\r\nesac\r\nexit $RETVAL<\/pre>\n<\/div>\n<div class=\"file-header\">\n<div class=\"file-actions\">\u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e\u00a0<a href=\"https:\/\/gist.github.com\/thatbin\/9309219\">\u0442\u0443\u0442<\/a><\/div>\n<div class=\"file-actions\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>download and install # wget http:\/\/download.java.net\/glassfish\/4.0\/release\/glassfish-4.0.zip # unzip glassfish-4.0.zip # mv glassfish4 \/usr\/local confirm installation<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[28,29],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts\/58"}],"collection":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=58"}],"version-history":[{"count":5,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts\/58\/revisions"}],"predecessor-version":[{"id":68,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts\/58\/revisions\/68"}],"wp:attachment":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}