The work requires that a set of weblogic-10.3.6 has been installed in the CentOS release 6.3 (Final) environment recently, and three projects have been deployed on it. It has also encountered many problems and incompatible bugs along the way. Although the process is very painful, No matter how you experience it, it can be regarded as an improvement in your ability. In order to facilitate my future reference, it is specially organized into a blog and shared with everyone. I sincerely hope that it can help everyone.
Without further ado, let’s start to formally record the detailed steps.
1. Add weblogic user group and user
(1)groupadd weblogic # Create a weblogic user group (2) useradd weblogic -g weblogic # Create a weblogic user designated as a weblogic user group (3) passwd weblogic # Set the weblogic user password to weblogic
2. Switch to the weblogic user to log in to install jdk, here is the jdk-6u37-linux-x64 version as an example
(1)mkdir -p /home/weblogic/java # Create jdk installation directory (2)scp -P 9527 jdk-6u37-linux-x64.bin [email protected]:/home/weblogic/java # Upload the jdk installation package to the java directory (3)./jdk-6u37-linux-x64.bin # Installation file
3. Switch to the root user to configure system environment variables, as follows:
(1)vi /etc/profile (2) Insert the following content in the header of the file export JAVA_HOME=/home/weblogic/java/jdk1.6.0_37 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib/rt.jar export PATH=$JAVA_HOME/bin:$PATH
4. There is a small bug here that this version of jdk will freeze when executing random algorithms on a 64-bit machine (about 3-4 minutes), so you need to make simple modifications . The specific operations are as follows:
(1)cd /home/weblogic/java/jdk1.6.0_37/jre/lib/security/ (2) vi java.security (3)修改securerandom.source=file:/dev/urandom 为 securerandom.source=file:/dev/./urandom
5. Next, prepare the weblogic installation jar package (wls1036_generic_linux64.jar), switch to the weblogic user to start the installation (the installation process can simply default to the next step)
java -jar wls1036_generic_linux64.jar -mode=console
6. After the installation is complete, create base_domain
(1)cd /home/weblogic/Oracle/Middleware/wlserver_10.3/common/bin/ (2)./config.sh
7. The installation process is also relatively smooth, just default to the next step ( note: remember to set the weblogic login password and confirm the login password ), and the installation of weblogic has come to an end.
8. Start weblogic (AdminServer), the specific steps are as follows:
(1)cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain (2)nohup ./startWebLogic.sh &
9. Enter the URL http://117.79.146.xx:7001/console in the browser, press Enter, you will see the weblogic console login page, enter the set user name and password to log in.
(2) Create a deployment and point the target of the deployment to the server just created
(3) Create a data source and set the The target of the data source points to the server just created
10. Next, create a start script and stop script for the server you just created ( remember to use the weblogic user ), the specific steps are as follows:
(1)cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/bin (2) vi start9083.sh (3)nohup startManagedWebLogic.sh Server-9083 http://localhost:7001 > /home/weblogic/logs/9083.log & (4) vi stop9083.sh (5)stopManagedWebLogic.sh Server-9083
11. After the script is created, in order to facilitate start/stop, set the following settings in the environment variable of the currently logged in user:
(1)vi .bash_profile # Remember to switch to the user's home directory with the weblogic user first (2) Edit and add the following LC_ALL=zh_CN.GBK export LC_ALL LESSCHARSET=utf8 export LESSCHARSET BEA_BASE_HOME=/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain export BEA_BASE_HOME PATH=$PATH:$HOME/bin:$BEA_BASE_HOME/bin export PATH (3)source .bash_profile # Compile the profile to take effect immediately
12. At this point, you can directly use the weblogic user to run the start9083.sh and stop9083.sh commands directly in any directory.
13. However, due to the weblogic version, there are some compatibility problems that cause errors when starting the server. The specific solutions are as follows (I will upload the three jar packages involved in it as attachments):
(1) Add a copy of hibernate-jpa-2.1-api-1.0.0.Final.jar to $JAVA_HOME/jre/lib/ext/ (2) Copy and overwrite com.bea.core.kodo_1.5.0.0_4-2-1.jar and org.apache.openjpa_1.3.0.0_1-1-1-SNAPSHOT.jar to /home/weblogic/Oracle/ Middleware/modules/
14. Re-run start9083.sh to start the server successfully.