Ⅰ. 修改文件數大小和線程數java
vi /etc/security/limits.conf * soft nproc 4096 * hard nproc 4096 * hard memlock unlimited * soft memlock unlimited * soft nofile 65536 * hard nofile 65536
##保存、從新登錄生效node
+ Ⅱ. 設置max virtual memory
vi /etc/sysctl.conflinux
vm.max_map_count=262144web
##添加完成執行下列命令
sysctl -pspring
+ Ⅲ. JDK需獨立安裝(因elasticsearch要求使用JDK11以上的版本)
cd /home/weblogic/sql
tar -zxvf /home/weblogic/jdk-11.0.4_linux-x64_bin.tar.gzapache
##根據實際環境,可把/home/weblogic替換成其餘的路徑bootstrap
### 2. Elasticsearch安裝 + Ⅰ. 用戶建立
useradd -g weblogic -p $(openssl passwd -1 Welcome1) weblogicapi
+ Ⅱ. Elasticsearch的安裝
cd /home/weblogic/apptomcat
tar -zxvf /home/weblogic/app/transwatch/matchingengine/packages/elasticsearch-6.7.2.tar.gz
mv elasticsearch-6.7.2 elasticsearch
chown -R weblogic:weblogic elasticsearch
cd elasticsearch/bin
./elasticsearch-plugin install file:////home/weblogic/app/transwatch/matchingengine/packages/rni-es-6.7.2.5-7.29.0-combined.zip
./elasticsearch-plugin install file:////home/weblogic/app/transwatch/matchingengine/packages/name-matcher-es-plugin-1.5.16.zip
### 3. Elasticsearch的配置 + Ⅰ. elasticsearch-env添加JAVA_HOME的環境變量
vi elasticsearch-env
#now set the path to java
##此處添加elasticsearch的JAVA_HOME(要求JDK11以上)環境變量
JAVA_HOME=/home/weblogic/jdk-11.0.4
export JAVA_HOME
+ Ⅱ. elasticsearch.yml的配置
vi elasticsearch.yml
cluster.name: CLUSTER
node.name: node10.35.63.157
bootstrap.memory_lock: true
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
node.data : false
node.master : true
discovery.zen.ping.unicast.hosts: [master_ip]
discovery.zen.minimum_master_nodes: 2
bootstrap.system_call_filter: false
+ Ⅲ. jvm.options的配置
vi jvm.options
##根據實際狀況修改內存大小
-Xms4g
-Xmx4g
10-:-XX:-UseConcMarkSweepGC
10-:-XX:-UseCMSInitiatingOccupancyOnly
10-:-XX:+UseG1GC
10-:-XX:InitiatingHeapOccupancyPercent=75
##根據硬件資源的實際狀況修改
10-:-XX:UseAVX=1
### 4. 啓動Elasticsearch
su - weblogic
cd /home/weblogic/app/elasticsearch/bin
./elasticsearch -d
## 2、Transwatch安裝與配置 ### 1. Transwatch安裝前準備 + Ⅰ. 查看weblogic下的項目是否啓動
ps -ef|grep weblogic
+ Ⅱ. 經查詢weblogic的項目啓動,則需殺掉相應的進程 + Ⅲ. JDK環境的安裝
cd /home/weblogic/
tar -zxvf /home/weblogic/jdk-8u144-linux-x64.tar.gz
##根據實際環境,可把/home/weblogic替換成其餘的路徑,EE的JDK環境同上。
+ Ⅳ. JDK環境的配置
vi /etc/profile
export JAVA_HOME=/home/weblogic/jdk
export PATH=/home/weblogic/jdk/bin:$PATH
export CLASSPATH=.:/home/weblogic/jdk/lib/dt.jar:/home/weblogic/jdk/lib/tools.jar
source /etc/profile
+ Ⅵ. 因TW、EE使用的是JDK8,而ME需使用JDK11,會引發lib目錄下一些jar包衝突 + 解決衝突的方式是在/home/weblogic/app目錄下建立lib8和lib11目錄,將引發衝突的jar包,放在各自對應lib目錄下便可 - [x] lib8 com.google.guava.guava.jar eclipselink.jar - [x] lib11 eclipselink-2.7.4.jar failureaccess-1.0.1.jar glassfish-corba-omgapi-4.2.1.jar guava-27.0.1-jre.jar jakarta.jws-api-1.1.1.jar javax.activation-1.2.0.jar javax.xml.soap-api-1.4.0.jar jaxb-api-2.3.0.jar jaxws-api-2.3.1.jar tomcat-annotations-api-9.0.24.jar tomcat-api-9.0.24.jar tomcat-catalina-9.0.24.jar tomcat-coyote-9.0.24.jar tomcat-jaspic-api-9.0.24.jar tomcat-jni-9.0.24.jar tomcat-jsp-api-9.0.24.jar tomcat-juli-9.0.24.jar tomcat-servlet-api-9.0.24.jar tomcat-util-9.0.24.jar tomcat-util-scan-9.0.24.jar ### 2. Transwatch安裝 + Ⅰ. 建立目錄transwatch
mkdir -p /home/weblogic/app/transwatch
cd /home/weblogic/app/transwatch
+ Ⅱ. 解壓trtw-installer-linux-*.tar.gz
tar -zxvf trtw-installer-linux-*.tar.gz
+ Ⅲ. 建立目錄transwatchwebapp
mkdir -p /home/weblogic/app/transwatch/webapp/transwatchwebapp
+ Ⅳ. 解壓transwatchwebapp.war
cd /home/weblogic/app/transwatch/webapp/transwatchwebapp
jar -xvf ../webapp/transwatchwebapp.war
cd WEB-INF/
rm –f lib/weld-servlet-*.Final.jar
### 3. Transwatch配置 + Ⅰ. 修改WEB-INF下的web.xml文件
cd /home/weblogic/app/transwatch/webapp/transwatchwebapp/WEB-INF/
vi web.xml
<param-name>transwatch.configDirectory</param-name>
<param-value>/home/weblogic/app/transwatch/conf</param-value>
##根據實際環境,可把/home/weblogic替換成app所在的路徑
+ Ⅱ. 修改conf下的properties文件
cd /home/weblogic/app/transwatch/conf
+ global.properties
vi global.properties jdbcDriver = oracle.jdbc.OracleDriver jdbcUrl = jdbc:oracle:thin:@10.35.63.157:1521:cmadb dbType = ORACLE user = TRANSWATCH password = transwatch ```
TWWebApp_log4j.properties
vi TWWebApp_log4j.properties log4j.rootLogger = INFO, defaultlog log4j.logger.monitorLogger = INFO, monitor log4j.appender.defaultlog = org.apache.log4j.RollingFileAppender log4j.appender.defaultlog.file = /home/weblogic/app/transwatch/logs/TWWebApp.log log4j.appender.defaultlog.maxFileSize = 10MB log4j.appender.defaultlog.MaxBackupIndex = 50 log4j.appender.defaultlog.layout = org.apache.log4j.PatternLayout log4j.appender.defaultlog.layout.conversionPattern = %d [%t] %-5p %m%n log4j.appender.defaultlog.append = true log4j.appender.defaultlog.encoding = UTF-8 log4j.appender.monitor = org.apache.log4j.RollingFileAppender log4j.appender.monitor.file = /home/weblogic/app/transwatch/logs/TWMonitor.log log4j.appender.monitor.maxFileSize = 1000KB log4j.appender.monitor.MaxBackupIndex = 5 log4j.appender.monitor.layout = org.apache.log4j.PatternLayout log4j.appender.monitor.layout.conversionPattern = %d [%t] %-5p %m%n log4j.appender.monitor.append = true log4j.appender.monitor.encoding = UTF-8 ##根據實際環境,可把/home/weblogic替換成app所在的路徑
DTSMain_log4j.properties
log4j.rootLogger = INFO, defaultlog log4j.appender.defaultlog = org.apache.log4j.DailyRollingFileAppender log4j.appender.defaultlog.file = /home/weblogic/app/transwatch/logs/MAIN_CA.log log4j.appender.defaultlog.DatePattern = '.'yyyy-MM-dd log4j.appender.defaultlog.layout = org.apache.log4j.PatternLayout log4j.appender.defaultlog.layout.conversionPattern = %d [%t] %-5p %m%n log4j.appender.defaultlog.append = true log4j.appender.defaultlog.encoding = UTF-8 ##根據實際環境,可把/home/weblogic替換成app所在的路徑
template_log4j.properties
log4j.rootLogger = INFO, defaultlog log4j.appender.defaultlog = org.apache.log4j.DailyRollingFileAppender log4j.appender.defaultlog.file = /home/weblogic/app/transwatch/logs/Administrator.log log4j.appender.defaultlog.DatePattern='.'yyyy-MM-dd log4j.appender.defaultlog.layout = org.apache.log4j.PatternLayout log4j.appender.defaultlog.layout.conversionPattern = %d [%t] %-5p %m%n log4j.appender.defaultlog.append = true log4j.appender.defaultlog.encoding = UTF-8 ##根據實際環境,可把/home/weblogic替換成app所在的路徑
修改config下的config.xml
cd /home/weblogic/Oracle/Middleware/user_projects/domains/domain_tw/config/
vi config.xml <!--在<security-configuration>節點的最後一行添加以下內容--> <enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
修改setDomainEnv.sh文件
vi setDomainEnv.sh TW_JAVA_OPTIONS="-Djava.security.egd=file:/dev/./urandom -Dcom.sun.xml.ws.spi.db.BindingContextFactory=com.sun.xml.ws.db.glassfish.JAXBRIContextFactory -Djavax.xml.bind.JAXBContext=com.sun.xml.bind.v2.ContextFactory -Djava.awt.headless=true" ##JAVA_OPTIONS添加TW_JAVA_OPTIONS JAVA_OPTIONS="${JAVA_OPTIONS} ${JAVA_PROPERTIES} ${TW_JAVA_OPTIONS}" ##lib8需添加到腳本中 CLASSPATH="${CLASSPATH}:/home/weblogic/app/lib8/*" export CLASSPATH ##根據實際環境,可把/home/weblogic替換成其餘的路徑
cd /home/weblogic/Oracle/Middleware/user_projects/domains/domain_tw/bin nohup ./startWeblogic.sh & ##查看啓動日誌 tail -f nohup.out ##根據實際環境,可把/home/weblogic替換成其餘的路徑
操做步驟以下:
Deployments
>Install
Ⅰ. JDK11需獨立安裝(因新的Namematcher要求使用JDK11以上的版本)
cd /home/weblogic tar -zxvf /home/weblogic/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz mv amazon-corretto-11.0.4.11.1 jdk11 ##根據實際環境,可把/home/weblogic替換成其餘的路徑
Ⅱ. 配置環境變量
vi /etc/profile ##末尾添加以下內容 export ME_HOME=/home/weblogic/app/transwatch/matchingengine export ME_LOGS=/home/weblogic/app/transwatch/logs ##根據實際環境,可把/home/weblogic替換成其餘的路徑
source /etc/profile
Ⅰ. 解壓name-matcher-installer-*-linux64.tar.gz
cd ${ME_HOME} tar -zxvf name-matcher-installer-*-linux64.tar.gz
Ⅱ. 解壓matching-engine.war
cd matching-engine jar -xvf matching-engine.war rm –f matching-engine.war
Ⅲ. 解壓Basis package
mkdir -p /home/weblogic/app/data/basis-7.29 cp ${ME_HOME}/packages/rni-es-6.7.2.3-7.29.0-combined.zip /home/weblogic/app/data/basis-7.29 cd /home/weblogic/app/data/basis-7.29 && unzip -o rni-es-6.7.2.3-7.29.0-combined.zip tar -zxvf ${ME_HOME}/packages/name-matcher-installer-basis-config.tar.gz -C /home/weblogic/app/data/basis-7.29/bt_root
在兩處存在bt_root目錄:
A、自定義目錄:/home/weblogic/app/data/basis-7.29/bt_root/rlpnc/data/etc;
B、系統默認:/home/weblogic/app/elasticsearch/elasticsearch/plugins/rni/bt_root/rlpnc/data/etc。
Ⅰ. 修改web.xml
cd WEB-INF/
vi web.xml <!--註釋或刪除如下內容--> <!-- <servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> --> <!--修改數據源鏈接類型(oracle爲oracle,sqlserver爲dbcp)--> <context-param> <param-name>spring.profiles.default</param-name> <param-value>standalone,dl-oracle</param-value> </context-param>
Ⅱ. 在WEB-INF目錄下,新建weblogic.xml
vi weblogic.xml <?xml version="1.0"?> <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <container-descriptor> <prefer-application-packages> <package-name>com.fasterxml.jackson.*</package-name> </prefer-application-packages> </container-descriptor> </weblogic-web-app>
Ⅲ. 修改me-config.properties
cd ${ME_HOME}/config/
vi me-config.properties ##localhost、127.0.0.一、7002的修改取決於使用的那臺Namematcher ##Matching Engine (Namematcher) REST URLs resourcesBaseUrl=http://localhost service.name-matcher.endpoint.entity.rest=http://127.0.0.1:7002/matching-engine/rest/ service.name-matcher.endpoint.rest=http://127.0.0.1:7002/matching-engine/rest/ #Namematcher namematcher.datasource.driver=oracle.jdbc.OracleDriver namematcher.datasource.url=jdbc:oracle:thin:@10.35.63.89:1521:CMADB namematcher.datasource.username=namematcher namematcher.datasource.password=namematcher namematcher.datasource.connections.maxTotal=100 namematcher.datasource.connections.maxIdle=100 namematcher.datasource.connections.minIdle=0 namematcher.datasource.connections.poolPreparedStatements=true ##DB的IP、username、password是Namematcher的信息,結合實際環境切記要修改 #Importer importer.datasource.driver=oracle.jdbc.OracleDriver importer.datasource.validationQuery=select 0 FROM DUAL importer.datasource.url=jdbc:oracle:thin:@10.35.63.89:1521:CMADB importer.datasource.username=nmimporter importer.datasource.password=nmimporter ##DB的IP、username、password是Importer的信息,結合實際環境切記要修改 #Elasticsearch namematcher.es.indexName=nm_worldcheck_index namematcher.es.aliasName=nm_worldcheck namematcher.es.indexProviderType=static namematcher.es.jest.urls=http://localhost:9900 namematcher.es.jest.maxConnections=100 basis.tech.rootdir=/home/weblogic/app/data/basis-7.29/bt_root hibernate.hbm2ddl.auto=none namematcher.enable_stats=false hibernate.format_sql=true hibernate.show_sql=false hibernate.autoReconnect=true hibernate.cache.use_structured_entries=true hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory hibernate.connection.charSet=UTF-8 hibernate.generate_statistics=false hibernate.query.substitutions=true 'T', false 'F' hibernate.use_sql_comments=false hibernate.physical_naming_strategy=cn.v2.dl.namematcher.support.PhysicalNamingStrategyUnderScoreImpl
Ⅳ. 修改setDomainEnv.sh
cd /home/weblogic/Oracle/Middleware/user_projects/domains/domain_me/bin
vi setDomainEnv.sh ##添加變量ME_JAVA_PROPERTIES ME_JAVA_PROPERTIES="- ME_JAVA_PROPERTIES="-DapplicationProperties=${ME_HOME}/config/dummy-config.properties -Dme.config.properties=${ME_HOME}/config/me-config.properties -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9100 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.awt.headless=true -Dspring.profiles.active=dl-oracle,standalone,ehcache -Dappserver.logs.base=${ME_LOGS} ${NM_JVM_OPTS}" ##修改JAVA_PROPERTIES JAVA_PROPERTIES="-Dwls.home=${WLS_HOME} -Dweblogic.home=${WLS_HOME} ${ME_JAVA_PROPERTIES}" ##若是默認512M堆內存,報OOM,則需修改堆內存,見如下內容,反之不需修改 WLS_MEM_ARGS_64BIT="-Xms3072m -Xmx3072m" export WLS_MEM_ARGS_64BIT WLS_MEM_ARGS_32BIT="-Xms3072m -Xmx3072m" export WLS_MEM_ARGS_32BIT if [ "${JAVA_VENDOR}" != "HP" ] ; then if [ "${VM_TYPE}" = "HotSpot" ] ; then WLS_MEM_ARGS_64BIT="-Xms3072m -Xmx3072m" export WLS_MEM_ARGS_64BIT WLS_MEM_ARGS_32BIT="-Xms3072m -Xmx3072m" export WLS_MEM_ARGS_32BIT fi fi
vi setDomainENV.sh ##因爲ME版本的緣由,須要amazon-corretto-11.0.4.11.1-linux-x64.tar.gz(JDK11)才能兼容,則需在setDomainENV.sh添加JAVA_HOME環境變量 CLASSPATH="${CLASSPATH}:/home/weblogic/app/lib11/*" export CLASSPATH #JAVA_HOME="${JAVA_HOME}" JAVA_HOME="/home/weblogic/jdk11" export JAVA_HOME
根據實際環境,可把/home/weblogic替換成其餘的路徑
cd /home/weblogic/Oracle/Middleware/user_projects/domains/domain_me/bin nohup ./startWeblogic.sh & ## 查看啓動日誌 tail -f nohup.out
操做步驟以下:
Deployments
>Install
配置環境變量
vi /etc/profile ## 末尾添加以下內容 export EE_HOME=/home/weblogic/app/entity-extractor/native ##根據實際環境,可把/home/weblogic替換成其餘的路徑
Ⅰ. 建立entity-extractor
cd /home/weblogic/app mkdir entity-extractor
Ⅱ. 解壓entity-extractor-installer-win64.zip
cd entity-extractor unzip entity-extractor-installer-0.0.1-win64.zip
Ⅲ. 解壓entity-extractor-service.war
cd entity-extractor-service jar -xf entity-extractor-service.war rm -f entity-extractor-service.war
Ⅳ. 複製licenses
cp /home/weblogic/app/data/basis/bt_root/rlp/licenses/rlp-license.xml /home/weblogic/app/entity-extractor/native/licenses/
Ⅰ. 修改log4j.properties
cd ${EE_HOME}/conf
vi log4j.properties log4j.rootLogger = DEBUG, defaultlog log4j.appender.defaultlog = org.apache.log4j.RollingFileAppender log4j.appender.defaultlog.file = /home/weblogic/app/entity-extractor/logs/EE_log.log log4j.appender.defaultlog.maxFileSize = 10MB log4j.appender.defaultlog.MaxBackupIndex = 50 log4j.appender.defaultlog.layout = org.apache.log4j.PatternLayout log4j.appender.defaultlog.layout.conversionPattern = %d [%t] %-5p %m%n log4j.appender.defaultlog.append = true log4j.appender.defaultlog.encoding = UTF-8 ##根據實際環境,可把/home/weblogic替換成其餘的路徑
Ⅱ. 修改servicecfg.properties
vi servicecfg.properties #interval to reload the whole configuration configRefreshInterval=86400000 #interval to re-create the Entity Extractor client object eeClientRebuildInterval=86400000
cd /home/weblogic/Oracle/Middleware/user_projects/domains/domain_ee/bin nohup ./startWeblogic.sh & ##查看啓動日誌 tail -f nohup.out ##根據實際環境,可把/home/weblogic替換成其餘的路徑
操做步驟以下:
Deployments
>Install
本文由博客羣發一文多發等運營工具平臺 OpenWrite 發佈