martes, 28 de mayo de 2013

Como aplicar un fixpack a WebSphere Portal 7

Primero deben de bajarse el update Installer para el WebSphere Portal Server 7 para su SO en la pagina de IBM.

Se van a la ruta donde se encuentra instalado el portal server:
/opt/IBM/WebSphere/PortalServer

Crean la carpeta update, se cambian a ese directorio, mueven su archivo tar y lo descomprimen ahi:

mkdir update
cd update
mv /home/javier/Downloads/7.0-WP-UpdateInstaller-Linux-x86.tar .
tar xvf 7.0-WP-UpdateInstaller-Linux-x86.tar

Ahora crean dos directorios, bajo update: fixes y fixpacks:

mkdir fixes
mkdir fixpacks

Ahora copian al directorio de fixpacks los archivos fixpack y al directorio fixes los cumulative fixes.

Unzipean el fixpack

unzip 7.0.0-WP-Multi-FP001.zip

Y ponen el archivo WP_PTF_7001.ptflist en el directorio de fixes:

mv /home/javier/Downloads/WP_PTF_7001.ptflist .

Ponen la variable de entorno de WAS_HOME para que el instalador no llore:

export WAS_HOME=/opt/IBM/WebSphere/AppServer

Hay que abrir el siguiente archivo y modificar lo siguiente:

vi /opt/IBM/WebSphere/wp_profile/ConfigEngine/properties/wkplc.properties

WasPassword=ReplaceWithYourPwd  #Linea 156
PortalAdminPwd=ReplaceWithYourPwd #Linea 351

Luego ejecutan el siguiente comando:

./updatePortal.sh -fixpack -installDir "/opt/IBM/WebSphere/PortalServer" -fixpackDir "/opt/IBM/WebSphere/PortalServer/update/fixpacks" -install -fixpackID WP_PTF_7001
*el fixpackID viene en el archivo .ptflist , en mi caso instale el fixpack 1, ustedes checkenlo dependiendo el que instalen.
Y se van y se toman un cafe porque tarda como 10 minutos en instalar, si todo ha salido bien veran lo siguiente al final:
Log: ExecCmd::launch returns 0
Task 601 out of 602; End Installing fix pack 'WP_PTF_7001', component 'wp.ptf.config'.
Task 602 out of 602; Begin Completing fix pack 'WP_PTF_7001'
Task 602 out of 602; End Completing fix pack 'WP_PTF_7001'
subTmpDir to be cleaned up: /tmp/ptfs
Fix pack installation completed successfully.
chmod -R 550 /opt/IBM/WebSphere/PortalServer  done!
UpdateInstaller.puiReturnCode is 0
End of [ ./updatePortal.sh ]

Y para los fixes ejecutan el siguiete comando:
./updatePortal.sh -fix -installDir "/opt/IBM/WebSphere/PortalServer" -fixDir "/opt/IBM/WebSphere/PortalServer/update/fixes" -install -fixes PM53918
Y veran lo siguiente si todo sale bien:
Log: ExecCmd::launch returns 0
Task 605 out of 606; End (1 of 1) Installing fix PM53918.installing component 604 of 604: wp.ptf.config. 
Task 606 out of 606; Begin (1 of 1) Installing fix PM53918.completing installation
Task 606 out of 606; End (1 of 1) Installing fix PM53918.completing installation
subTmpDir to be cleaned up: /tmp/efixes
chmod -R 550 /opt/IBM/WebSphere/PortalServer  done!
Fix installation completed successfully.
UpdateInstaller.puiReturnCode is 0
End of [ ./updatePortal.sh ]

viernes, 3 de mayo de 2013

Como Aplicar un Fixpack al WebSphere Application Server 7

Primero antes que nada deben de bajarse el Update Installer para el software de WebSphere para su plataforma, en mi caso es un Linux de 64 bits, lo pueden encontrar en el siguiente link: Update Installer.

Una vez bajado lo descomprimen en la carpeta que quieran, les va a crear una carpeta llamada UpdateInstaller. Dentro de esta carpeta se encuentra un archivo llamado responsefile.updiinstaller.txt lo copian en un archivo nuevo para modificarlo.
cp responsefile.updiinstaller.txt responsefile.txt
Lo abren y se van a las siguientes lineas:
-OPT silentInstallLicenseAcceptance="true" //Linea 43 para aceptar los terminos

-OPT disableOSPrereqChecking="true"  //Linea 69 para que no revise el OS

-OPT installLocation="/opt/IBM/WebSphere/UpdateInstaller" //Linea 113 para ver donde lo instalaran

Lo guardan y en el mismo directorio se encuentra el ejecutable de install, como aquí no somos de ventanitas, por eso hemos modificado el archivo, para correr todo en la linea de comando tecleamos:
./install -options "responsefile.txt" -silent

Si todo salio bien, verán la carpeta UpdateInstaller donde le especificaron que lo hiciera.
Pues bien ya han instalado el instalador de fixpacks, si es raro pero así debe de ser. Ahora deben de bajar el archivo .pak del fixpack que quieren aplicar, este archivo lo deben de poner en el directorio:
/opt/IBM/WebSphere/UpdateInstaller/maintenance/

De igual forma hay un directorio llamado:
/opt/IBM/WebSphere/UpdateInstaller/responsefiles

Y ahí un archivo llamado install.txt, lo copiamos para dejarlo de base:
cp install.txt myInstall.txt
Lo abren y modifican la siguiente linea:
-W product.location="/opt/IBM/WebSphere/AppServer" //Linea 104 donde esta el AppServer


Antes que nada deben de verificar que no esta corriendo ningún WAS para que no existan posibilidades de que ocurra algún error en la actualización, si hay alguno corriendo, apagenlo.
Y con eso teclean lo siguiente bajo el directorio de UpdateInstaller, recuerden nada de ventanitas aquí puro rockstar de la command line ;) :
./update.sh -options responsefiles/myInstall.txt -silent

Para ver el log de la instalación pueden hacerlo así:
tail -f /opt/IBM/WebSphere/UpdateInstaller/logs/tmp/updatelog.txt

Si todo salio bien al final de ese log verán algo así como:
(May 3, 2013 4:46:08 PM), Install, com.ibm.ws.install.ni.ismp.actions.SettleNIFRegistryAction, msg1, Current install/uninstall process is successful. Process type is: maintenance

(May 3, 2013 4:46:08 PM), Install, com.ibm.ws.install.ni.ismp.actions.SetExitCodeAction, msg1, CWUPI0000I: EXITCODE=0

(May 3, 2013 4:46:08 PM), Install, com.ibm.ws.install.ni.ismp.actions.ISMPLogSuccessMessageAction, msg1, INSTCONFSUCCES