Created
July 23, 2015 06:57
-
-
Save diablowu/814575b47ce13ade27bb to your computer and use it in GitHub Desktop.
weblogic deploy cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BATCHUPDATE脚本,建立数据源 | |
| newds.script | |
| --------------------------------------------------- | |
| # create cp | |
| CREATE_POOL mypool url=jdbc:oracle:thin:@10.0.1.1:1521:intgtest11,driver=oracle.jdbc.OracleDriver,testConnsOnReserve=true,testTableName=dual,initialCapacity=2,maxCapacity=10,capacityIncrement=2,allowShrinking=true,props=user=user;password=passwd | |
| # create ds | |
| CREATE -mbean base_domain:Name=myds,Type=JDBCTxDataSource | |
| # set CP Name | |
| SET -mbean base_domain:Name=myds,Type=JDBCTxDataSource -property PoolName mypool | |
| #set targets | |
| SET -mbean base_domain:Name=myds,Type=JDBCTxDataSource -property Targets base_domain:Name=AdminServer,Type=Server | |
| # show result | |
| GET -mbean base_domain:Name=myds,Type=JDBCTxDataSource | |
| -------------------------------------- | |
| #执行newds.script | |
| #java weblogic.Admin -url localhost:7001 -username weblogic -password weblogic BATCHUPDATE -batchFile ./newds.script -batchCmdVerbose | |
| #部署目录 | |
| deploy.sh | |
| -------------------------------------- | |
| BEA_HOME=/opt/server/bea | |
| CLASSPATH="${BEA_HOME}/wlserver_10.3/server/lib/weblogic.jar:${CLASSPATH}" | |
| APP_DIR="/app/default" | |
| export CLASSPATH | |
| JAVA_HOME="${BEA_HOME}/jdk160_05" | |
| JAVA_BIN="${JAVA_HOME}/bin/java" | |
| $JAVA_BIN weblogic.Deployer \ | |
| -adminurl t3://localhost:7001 \ | |
| -user weblogic -password weblogic \ | |
| -deploy $APP_DIR | |
| --------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment