WPS: Migrando para o DB2 - Migrando via texto

From Wiki

Estamos migrando do IBM Cloudscape para o IBM DB2 Universal Database

Configurar os JDBC Drivers do DB2

1. Criar o diretório para os drivers JDBC

mkdir -p /opt/IBM/WebSphere/PortalServer/dbdrivers

Copie os arquivos

  • db2jcc4.jar
  • db2jcc_license_cu.jar

para este diretório.

2. Estamos utilizando o driver IBM DB2 JDBC Driver Type 4

  • com.ibm.db2.jcc.DB2Driver

Backup dos arquivos de configuração

Vá para o diretório /opt/IBM/WebSphere/wp_profile/ConfigEngine/properties

cd /opt/IBM/WebSphere/wp_profile/ConfigEngine/properties

faça um backup dos arquivos wkplc.properties

cp wkplc.properties wkplc.properties_antesDB2
cp wkplc_dbtype.properties wkplc_dbtype.properties_antesDB2
cp wkplc_dbdomain.properties wkplc_dbdomain.properties_antesDB2


Definições no arquivo wkplc_dbtype.properties

Edite o arquivo wkplc_dbtype.properties, localize as entradas db2.DbDriver e db2.DbLibrary. Então defina o seguinte:

db2.DbDriver=com.ibm.db2.jcc.DB2Driver

db2.DbLibrary=/opt/IBM/WebSphere/PortalServer/dbdrivers/db2jcc4.jar:/opt/IBM/WebSphere/PortalServer/dbdrivers/java/db2jcc_license_cu.jar

Salve e Feche o arquivo.

Definições no arquivo wkplc_dbdomain.properties

Edite o arquivo wkplc_dbdomain.properties, e altere as seguintes entradas:

feedback.DbType=db2
feedback.DbName=FDBKDB
feedback.DbSchema=feedback
feedback.DataSourceName=fdbkdbDS
feedback.DbUrl=jdbc:db2://mydbserver:50000/FDBKDB:returnAlias=0;
feedback.DbUser=db2iwp8
feedback.DbPassword=password
feedback.DbRuntimeUser=wp8user
feedback.DbRuntimePassword=password
likeminds.DbType=db2
likeminds.DbName=LMDB
likeminds.DbSchema=likeminds
likeminds.DataSourceName=lmdbDS
likeminds.DbUrl=jdbc:db2://mydbserver:50000/LMDB:returnAlias=0;
likeminds.DbUser=db2iwp8
likeminds.DbPassword=password
likeminds.DbRuntimeUser=wp8user
likeminds.DbRuntimePassword=password
release.DbType=db2
release.DbName=RELDB
release.DbSchema=release
release.DataSourceName=reldbDS
release.DbUrl=jdbc:db2://mydbserver:50000/RELDB:returnAlias=0;
release.DbUser=db2iwp8
release.DbPassword=password
release.DbRuntimeUser=wp8user
release.DbRuntimePassword=password
community.DbType=db2
community.DbName=COMMDB
community.DbSchema=community
community.DataSourceName=commdbDS
community.DbUrl=jdbc:db2://mydbserver:50000/COMMDB:returnAlias=0;
community.DbUser=db2iwp8
community.DbPassword=password
community.DbRuntimeUser=wp8user
community.DbRuntimePassword=password
customization.DbType=db2
customization.DbName=CUSTDB
customization.DbSchema=customization
customization.DataSourceName=custdbDS
customization.DbUrl=jdbc:db2://mydbserver:50000/CUSTDB:returnAlias=0;
customization.DbUser=db2iwp8
customization.DbPassword=password
customization.DbRuntimeUser=wp8user
customization.DbRuntimePassword=password
jcr.DbType=db2
jcr.DbName= JCRDB
jcr.DbSchema=jcr
jcr.DataSourceName=jcrdbDS
jcr.DbUrl=jdbc:db2://mydbserver:50000/JCRDB:returnAlias=0;
jcr.DbUser=db2iwp8
jcr.DbPassword=password
jcr.DbRuntimeUser=wp8user
jcr.DbRuntimePassword=password


Salve e Feche o arquivo.

Validando a configuração

Vá para o diretório

/opt/IBM/WebSphere/wp_profile/ConfigEngine

e execute o seguinte comando

#./ConfigEngine.sh validate-database-connection

Se no final do processo aparecer

BUILD SUCCESSFUL
Total time: NN seconds

A configuração ocorreu corretamente

Realizando a configuração

Vá para o diretório

/opt/IBM/WebSphere/wp_profile/ConfigEngine

e execute o seguinte comando

# ./ConfigEngine.sh database-transfer

Se no final do processo aparecer

BUILD SUCCESSFUL
Total time: NN minutes and NN seconds

A configuração ocorreu corretamente

Pare e reinicie os servidores

Vá para o diretório

cd /opt/IBM/WebSphere/AppServer/bin

e execute os seguintes comandos:

# ./stopServer.sh WebSphere_Portal -user wpsadmin -password was_admin_password

aguarde ...

# ./stopServer.sh server1 -user wpsadmin  -password was_admin_password

aguarde ...

# ./startServer.sh server1 -user wpsadmin  -password was_admin_password

aguarde ...

# ./startServer.sh WebSphere_Portal -user wpsadmin  -password was_admin_password

aguarde ...



Continuar no artigo WPS: Instalando o Websphere Portal Server,

Ver também