Prerequisites for WebLogic Application Deployment on CentOS
Before deploying applications to WebLogic on CentOS, complete the following setup:
java -version and configure environment variables (JAVA_HOME, PATH) in /etc/profile or ~/.bash_profile.root for installation. Run groupadd weblogic and useradd -g weblogic weblogic, then set a password with passwd weblogic.fmw_14.1.1.0.0_wls_lite_generic.jar for a minimal installation).firewall-cmd --permanent --add-port=7001/tcp and firewall-cmd --reload (or disable SELinux/firewall temporarily for testing).Step 1: Install WebLogic Server
weblogic user (su - weblogic) and extract the downloaded JAR file:mkdir -p /opt/weblogic && unzip fmw_14.1.1.0.0_wls_lite_generic.jar -d /opt/weblogic
/opt/weblogic/wls.rsp:[ENGINE]
Response File Version=1.0.0.0.0
[GENERIC]
ORACLE_HOME=/opt/weblogic/Oracle/Middleware
INSTALL_TYPE=WebLogic Server
DECLINE_SECURITY_UPDATES=true
java -jar /opt/weblogic/fmw_14.1.1.0.0_wls_lite_generic.jar -silent -responseFile /opt/weblogic/wls.rsp -invPtrLoc /opt/weblogic/oraInst.loc
(Create /opt/weblogic/oraInst.loc with inventory_loc=/opt/weblogic/oraInventory and inst_group=weblogic if not present.)Step 2: Create a WebLogic Domain
cd /opt/weblogic/Oracle/Middleware/wlserver/common/bin && ./config.sh
base_domain).weblogic/admin123)./opt/weblogic/user_projects/domains/base_domain).cd /opt/weblogic/user_projects/domains/base_domain/bin && ./startWebLogic.sh
Access the console at http://<server-ip>:7001/console (login with the admin credentials).Step 3: Deploy Applications (3 Common Methods)
http://<server-ip>:7001/console in a browser and authenticate.myapp.war)./opt/weblogic/deployments).MyApp).AdminServer).cp myapp.war /opt/weblogic/user_projects/domains/base_domain/applications/
java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password admin123 -install /opt/weblogic/deployments/myapp.war -targets AdminServer -name MyApp
Replace localhost, weblogic, admin123, and paths with your environment details.-list to verify the deployment:java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password admin123 -list
The output should include MyApp with a status of “deployed”.Step 4: Verify Application Access
After successful deployment, access the application using its context root:
myapp.war, the default URL is http://<server-ip>:7001/myapp.weblogic.xml file in the WAR’s WEB-INF directory:<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app">
<context-root>/customroot</context-root>
</weblogic-web-app>
Redeploy the application, and access it via http://<server-ip>:7001/customroot.Troubleshooting Tips
/opt/weblogic/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer.log) for errors. Common issues include missing dependencies or incorrect file permissions.ps -ef | grep weblogic), the port is open (netstat -tuln | grep 7001), and the context root is correct.