Check the correct version of java is running
* Open a terminal window
* Use bash
type:
bash
* Get the version of java
type:
java -version
* Check the version is java 1.6 or above
Upgrading java version
* ftp the install package of the JDK to /opt/dropzone
* Give the install execution access
type:
chmod a+x jdk-6u10-beta-bin-b24-solaris-i586-14_may_2008.sh
* Install the JDK by running the install script
type:
./jdk-6u10-beta-bin-b24-solaris-i586-14_may_2008.sh
* Check that the installation work by doing a directory listing
type:
ls -l
* Move the installation to /usr/jdk/instances
type:
mv ./jdk1.6.0_10 /usr/jdk/instances
* Check that in moved successfully
type:
ls -l /usr/jdk/instances
* Move the latest symbolic link to point to the new installation
type:
rm /usr/jdk/latest; ln -s instances/jdk1.6.0_10 /usr/jdk/latest;
* Check that the latest symbolic link points to the new installation
type:
ls -l /usr/jdk/latest
* Move the java symbolic link to point to the new installation
type:
rm /usr/java; ln -s jdk/latest /usr/java;
* Check the new java version is being picked up
type:
java -version
Copy the relevant deployment of Glassfish to the server
* ftp the install package of Glassfish to /opt/fundamo/dropzone
* Install Glassfish by running the install jar
type:
java -Xmx256m -jar glassfish-installer-v2ur2-b04-sunos_x86.jar
* Check that the installation work by doing a directory listing
type:
ls -l
* Move the installation to /opt
type:
mv ./glassfish /opt
* Change directory to /opt/glassfish
type:
cd /opt/glassfish
* Make the ant binaries executable
type:
chmod -R +x lib/ant/bin
* Setup the installation for a non-clustered install
type:
lib/ant/bin/ant -f setup.xml
o Clustered installations are not covered here, but you should run lib/ant/bin/ant -f setup-cluster.xml
* Move the symbolic link to asadmin to point to the new Glassfish installation
type:
rm /usr/sbin/asadmin; ln -s /opt/glassfish/bin/asadmin /usr/sbin/asadmin;
Create the domain
* Go to the glassfish installation directory
type:
cd /opt/glassfish
* Create the domain called mydomain that listens on port 80 for HTTP and port 443 for HTTPS. The admin port is port 4848
type:
asadmin create-domain --adminport 4848 --domaindir ./domains --profile developer --instanceport 80 --domainproperties http.ssl.port=443 mydomain
* To start and stop the domain use
type:
asadmin start-domain mydomain
type:
asadmin stop-domain mydomain
* Test the server is running
type:
http://<ip address of the server>
type:
https://<ip address of the server>
* Configure you application via the administrator console
type:
http://<ip address of the server>:4848
Set the domain to run as a service
* Go to the domains glassfish installation directory
type:
cd /opt/glassfish/domains/mydomain
* Create a password file called .passwordfile that contain the following lines
AS_ADMIN_USER=<admin username>
AS_ADMIN_PASSWORD=<admin password>
AS_ADMIN_MASTERPASSWORD=changeit
* Create the service
type:
asadmin create-service --passwordfile ./domains/mydomain/.passwordfile ./domains/mydomain
* Check the service was created
type:
svcs -a | grep mydomain
o You should see output like this
disabled 16:24:09 svc:/application/SUNWappserver/mydomain:default
* Remove the AS_ADMIN_MASTERPASSWORD line from the password file by editing /opt/glassfish/domains/mydomain/.passwordfile (I don't know why, but the service does not start unless you do)
* Enable the service
type:
svcadm enable svc:/application/SUNWappserver/mydomain:default
* Check that it is online
type:
svcs -a | grep mydomain
o You should see output like this
online* 16:24:09 svc:/application/SUNWappserver/mydomain:default
o If not check the log at
/var/svc/log/application-SUNWappserver-mydomain:default.log
No comments:
Post a Comment