Redhat6.7 install weblogic and share the problems encountered

In a recent project, the web needs to be deployed to weblogic, but the client's test environment version is not the same as the official version, resulting in additional work;

In fact, it's also very good. Anyway, a person can't accompany his wife and children outside, and accompany with the computer is also very good.

No more nonsense, and started to go to the topic. Because of the encoding format of the website, some paths or commands are displayed in a distorted manner. I hope you can understand them correctly.

1. Download the installation package of weblogic, the package is very troublesome to download, and the package that my colleague wants later, the name is as follows: fmw_12.1.3.0.0_wls.jar is
totally beyond my expectations. . . .

The first problem encountered, after uploading the jar package, execute the installation command java -jar fmw_12.1.3.0.0_wls.jar after decompressing it for a while and suggesting that jdk is not supported; so the first problem is to download jdk1.8 also requested by the customer version.
Speaking of jdk as a person who hasn't touched java for a long time, I really don't know what its name is. I finally found it for a long time, only to find that its sometimes installed name is not jdk1.8, but another name Son, some of them are not easy to download. Oracle needs to register. Some birdman jdk downloads from a website will pay for them. I go to his uncle.
Share the link of a little brother: http://ghaffarian.net/downloads/

supports Thunder, the speed is quite good.

The second problem, unzip the jdk compression package, set the environment variables, but the implementation of weblogic installation, still prompts that jvm does not support, it seems that upgrading jdk did not take effect, yes it did not take effect.
A lot of brothers share to deal with this problem, only mentioning understanding the pressure and setting environment variables, but there is no mention of setting the java version used by the system. I will share it back, and thank you for sharing.

alternatives --install / usr / bin / java java /opt/java/jdk1.8.0_202/bin/java 4 [the first few installed jdk] Put the newly installed jdk into java bin

update-alternatives --config java select java version

These two commands are critical. The first one is to add the new jdk you installed to the system. This may not be accurate, but after you execute the command, you know what I am talking about.
The second directly selects the newly installed jdk as the system's default jdk.

All operations to upgrade jdk as a whole are as follows:

mkdir / opt / java
chmod 755 / opt / java
cp jdk-8u202-linux-x64.tar.gz.gz / opt / java
cd / opt / java
tar -xzvf jdk-8u202-linux-x64.tar.gz.gz / opt / java
rm jdk-8u202-linux-x64.tar.gz.gz
vim / etc / profile
export JAVA_HOME = / opt / Java / jdk1.8.0_102
export CLASSPATH = $ JAVA_HOME / lib / tools.jar
export PATH = $ PATH: $ JAVA_HOME / bin
export JRE_HOME = $ JAVA_HOME / jre
source / etc / profile
alternatives --install / usr / bin / java java /opt/java/jdk1.8.0_202/bin/java 4 [The first few installed jdk ] Put the newly installed jdk into java bin
update-alternatives --config java select java version

2. After the Jdk problem is solved, we continue our weblogic installation. At this time, you will find that weblogic is not allowed to install with root privileges. The following is to create users and operations to install weblogic. Because you want to simulate the customer's environment, there is no exclusion See the username weblogic that everyone uses.

All the basic commands are not explained,
groupadd weblogic
useradd -g weblogic -d / u01 / weblogic weblogic
Passwd weblogic   
chown -R weblogic: weblogic / u01

3. Switch the weblogic user to start the installation. At this time, there was another problem. Of course, if you installed the desktop when you installed the server, it might not appear. I ’m minimizing the command line mode, so I ’ll report an error here and the installation wo n’t go on. According to the error report, I finally found that it has something to do with not installing the desktop. Weblogic provides a mode called slim installation. By the way, weblogic 12c does not support -mode = console installation. You need to create two configuration files before you can implement the slide. For mode installation, the required operations are as follows.

export DISPLAY=127.0.0.1:0.0

vim oraInst.loc

inventory_loc=/u01/weblogic
inst_group=weblogic

vim wls.rsp

[ENGINE]

Response File Version=1.0.0.0.0
[GENERIC]
ORACLE_HOME=/u01/weblogic/Oracle/Middleware

INSTALL_TYPE=WebLogic Server
DECLINE_SECURITY_UPDATES=true
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

Create the two configuration files above and put them together with the installation package, then execute the following installation commands.
java -jar fmw_12.1.3.0.0_wls.jar -silent -response /u01/wls.rsp -invPtrLoc /u01/oraInst.loc

It prompts that the installation is 100% successful. If no error is reported, then weblogic is already installed.

Next, create a domain and add a business container, also called a managed server. There is also a problem here, because it is an imitation of the customer's environment. I will not explain it in the past. You can operate it all the way down. weblogic has created a managed server.

Set the weblogic environment variable
cd / u01 / weblogic / Oracle / Middleware / wlserver / server / bin
./setWLSEnv.sh

Create app user, create app user weblogic directory
groupadd app
useradd -g app -d / app app
passwd app

Use the app login to create the domain directory
ssh [email protected] create
in the app home directory. Profile
vim .profile

export JAVA_HOME=/opt/java/jdk1.8.0_202
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/libext
export PATH=$PATH:$JAVA_HOME/bin

source .profile makes the configuration effective

mkdir /domains/sandbox_domain && cd domains/sanbox_domain

cd / u01 / weblogic / Oracle / Middleware / wlserver / server / bin
vim setWLSEnv.sh
WL_HOME = "/ u01 / weblogic / Oracle / Middleware / wlserver"
./setWLSEnv.sh
cd / u01 / weblogic / Oracle / Middleware / oracle_common / common / bin / wlst.sh
./wlst.sh
cd / u01 / weblogic / Oracle / Middleware / wlserver / common / templates / scripts / wlst
cp basicWLSDomain.py /app/domains/sandbox_domain/sandbox.py
cd / app / domains / sandbox_domain /
Modify the basic domain configuration file, mainly set the path of the domain, the user name and password for logging in to the console (web page)

/u01/weblogic/Oracle/Middleware/oracle_common/common/bin/wlst.sh sandbox

The console opening speed is slow and optimization.
Open the java.security
vim used in the domain. /jre/lib/security/java.security
modify seucrerandom.source = file: / dev /./ urandom
securerandom.source = file: / dev /./ urandom
cd / app / domains / sandbox_domain / nodemanager
vim vim nodemanager.properties
ListenPort = 5556
SecureListener = false
StartScriptEnabled = true

cd /app/domains/sandbox_domain
./startWebLogic.sh

Create a new server in the console without binding any IP, because the managed server can be started from any machine with a weblogic startup environment without binding the IP. The
console configuration is just a weblogic server with information about the managed server added.

cd / app / domains / sandbox_domain / bin The
most important thing is to start the managed server, as follows:
./startManagedWebLogic.sh Create the server name http://192.168.93.128:7001

By the way, the managed server is created using the python configuration file in the directory where weblogic is installed. The specific operations are above, and the configuration file is posted below.

readTemplate("/u01/weblogic/Oracle/Middleware/wlserver/common/templates/wls/wls.jar")
cd('Servers/AdminServer')
set('ListenAddress','')
set('ListenPort', 7001)
cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('weblogic123')
setOption('OverwriteDomain', 'true')
setOption('JavaHome','/opt/java/jdk1.8.0_202')
writeDomain('/app/domains/sandbox_domain')
closeTemplate()
exit()

The configuration file has a lot of content. I only read one old man's blog post, and then used the above point. The useless ones can be deleted, or you can #Comment out.

If you are using redhat6.7, I think you may also encounter problems with other library files. Looking at the blog post I posted a few days ago to solve GLIBC_ *, you can definitely solve it.

Guess you like

Origin www.cnblogs.com/warrior-tian/p/12731558.html