WebLogic installs __linux in Linux environment

Source: Internet
Author: User
Tags chmod create domain log4j
WebLogic Installation
Installation Environment CentOS 6.4 x64
You can search WebLogic Install silent


Reference Documentation:
http://g14n.info/2014/11/install-weblogic-12c/
Official documents:
Https://docs.oracle.com/middleware/1213/core/WLSIG.pdf




1. Download and extract WebLogic
Oracle account needs to be registered, Oracle can develop learning, but production mode must have license
Address: http://www.oracle.com/technetwork/middleware/fusion-middleware/downloads/index.html
WebLogic is now part of the Fusion middleware, we choose the smallest zip download package




Download Ant
Http://mirrors.hust.edu.cn/apache//ant/binaries/apache-ant-1.9.4-bin.zip




2. Create users and Groups
# Groupadd WebLogic
# useradd-g WebLogic WebLogic
# passwd WebLogic


3. Prepare WebLogic Catalogue


# Mkdir/opt/weblogic
# Mkdir/opt/weblogic/mydomain
# Chown-r Weblogic/opt/weblogic






4. Copy and extract


# CP ~/wls1213_dev.zip/opt/weblogic/wls1213_dev.zip
# CP ~/apache-ant-1.9.4-bin.zip/opt/weblogic/apache-ant-1.9.4-bin.zip


# chown Weblogic/opt/weblogic/wls1213_dev.zip
# chown Weblogic/opt/weblogic/apache-ant-1.9.4-bin.zip




Switch to WebLogic User
# su WebLogic


Unzip the file under/opt/weblogic
$ unzip Apache-ant-1.9.4-bin.zip
$ unzip Wls1213_dev.zip


The above steps to ensure that the files in the WebLogic directory to allow users to WebLogic read and write permissions




5. Setting Environment variables


Switch to WebLogic User


# which Java check Java path


Edit. Bash_profile Add the following line


Export java_home=/usr/java/jdk1.7.0_55
Export path= $PATH: $JAVA _home/bin


Export ant_home=/opt/weblogic/apache-ant-1.9.4
Export path= $PATH: $ANT _home/bin


# default is-xms256m-xmx512m-xx:compilethreshold=8000-xx:permsize=128m-xx:maxpermsize=256m
Export user_mem_args= "-xms1024m-xmx2048m-xx:compilethreshold=8000-xx:permsize=1024m-xx:maxpermsize=2048m"


Alias start_weblogic= ' nohup/opt/weblogic/mydomain/bin/startweblogic.sh > $HOME/start_weblogic.nohup 2>&1 & '
Alias stop_weblogic= '/opt/weblogic/mydomain/bin/stopweblogic.sh '


########### #结束


Make the above environment variable effective
$ source ~/.bash_profile




6. Installation


$ Export mw_home=/opt/weblogic/wls12130
$ cd $MW _home
$./configure.sh


Do your want to configure a new domain? [y/n]? N


Remember to select N, or you will automatically create a mydomain, which is not recommended




7. Create domain


Set the environment variables first, the environment variables set by the previous script are obsolete, because our previous script has stopped, we need to reset


Execute the following command to find Classpath=
$/opt/weblogic/wls12130/wlserver/server/bin/setwlsenv.sh


Set Classpath
$ Export Classpath=/usr/java/jdk1.7.0_55/lib/tools.jar:/lotus/weblogic/wls12130/wlserver/server/lib/weblogic_ sp.jar:/lotus/weblogic/wls12130/wlserver/server/lib/weblogic.jar:/lotus/weblogic/wls12130/oracle_common/ Modules/net.sf.antcontrib_1.1.0.0_1-0b3/lib/ant-contrib.jar:/lotus/weblogic/wls12130/wlserver/modules/features /oracle.wls.common.nodemanager_2.0.0.0.jar:/usr/java/jdk1.7.0_55/lib/tools.jar:/lotus/weblogic/wls12130/ Wlserver/server/lib/weblogic-classes.jar:/lotus/weblogic/wls12130/oracle_common/modules/net.sf.antcontrib_ 1.1.0.0_1-0b3/lib/ant-contrib.jar:/lotus/weblogic/wls12130/wlserver/modules/features/ Oracle.wls.common.nodemanager_2.0.0.0.jar:




The invariant directory is created somewhere else.
$ cd/opt/weblogic/mydomain


$ $JAVA _home/bin/java $JAVA _options-xmx1024m-xx:maxpermsize=256m WebLogic. Server


Would the server to create a default configuration and boot? (y/n): Y


Enter username to boot WebLogic server:weblogic
Enter Password to boot WebLogic server: Note that the password is at least 8 digits, must contain strings and numbers, or create domain failure
For confirmation, re-enter password required to boot WebLogic server:




Show after success


Server state changed to RUNNING


Then you can access the WebLogic management console


Http://localhost:7001/console




8. Shutdown and start




$ start_weblogic
Show: 1[8105]


$ stop_weblogic




After startup, you can check the log with the following command:
$ tail-f $HOME/start_weblogic.nohup




Tip: log4j Configuration


You can configure a single line in the WebLogic user's. Bash_profile to develop log4j configuration


Export Log4j_config_file=/opt/weblogic/domain/config/log4j.xml




Modify the port, you can modify it in the admin console, you cannot access the admin console you can modify the configuration file
# VI./domains/mydomain/config/config.xml


New in front <listen-address/>
<listen-port>9001</listen-port>




Resolving problems with WebLogic console access slow


Modify the JDK $JAVA _home/jre/lib/security/java.security files used on Linux WebLogic
Change the Securerandom.source=file:/dev/urandom to
Securerandom.source=file:/dev/./urandom




Error resolution
<Error> <Server> <BEA-002606> <the Server is unable to create a server socket for listening on Channe L "Default".
The address 61.149.195.0 might are incorrect or another process is using port 9999:java.net.bindexception:cannot assign R Equested address>
Solving method
1) to see if WebLogic is running
# Ps-ef | grep WebLogic
2 to see if the port is occupied
# Netstat-an | grep 9999
3 Empty Cache Directory Restart try
Delete the Mydomain/servers/myserver directory directly
Cache Data tmp
4) Check the IP address in the file/etc/hosts
5) Check the mydomain/config/config.xml of the listening address listen-address
6) Check Mydomain/nodemanager/nodemanager.properties


In general, listen-address modified to localhost or host name




-----------------------------------------------------------
-----------------------------------------------------------
-----------------The above content has been tested and validated CentOS 7 Weblogic 12c 12.1.3
-----------------------------------------------------------
-----------------------------------------------------------




Two. Start WebLogic Service, instructions are as follows:


# CD .../domains/mydomain--point to the domain name


# nohup Startweblogic.sh &--running WebLogic service in the background




Three. Stop WebLogic Service, instructions are as follows:


./stopweblogic.sh generally difficult to close, need to kill the background process (often)
View background processes
#ps-ef|grep WebLogic such as:
Root 28596 28558 2 16:10 pts/1 00:00:18/opt/oracle/middleware/jr ...
Root 28880 28778 0 16:22 pts/2 00:00:00 grep weblogic

Kill background Process: # kill-9 28596 can








Linux self-Startup setting method:


1.
Create a/etc/init.d/weblogic file with the following file contents:


#!/bin/bash


# chkconfig:35 99 05


#description: Weblogic Server


#Please Eidt the Variable


Export Bea_base=/u02/weblogic/oracle/middleware


Export Bea_home= $BEA _base/user_projects/domains/base_domain


Export Bea_log=/var/log/weblogic.log


Export path= $PATH: $BEA _home/bin


Bea_owner=weblogic


Start () {


Echo-n "Starting WebLogic ..."


Su-"$BEA _owner" <<eoo


$BEA _home/bin/startweblogic.sh > $BEA _log 2>&1 &


Eoo


}


Stop () {


Echo-n "Stop WebLogic ..."


Su-"$BEA _owner" <<eoo


$BEA _home/bin/stopweblogic.sh >> $BEA _log


Eoo


}


Case "$" in


Start


Touch/var/lock/weblogic


Start


echo "OK"


;;


Stop


Rm-rf/var/lock/weblogic


Stop


echo "OK"


;;


Restart)


Stop


Sleep 3


Start


;;


*)


echo "$0{start|stop|reload|restart}"


Exit 1


;;


Esac


Exit 0


2. Add executable permissions


# chmod 700/etc/init.d/weblogic


# chmod +x/etc/init.d/weblogic


3. Add WebLogic to System services and start in 35 mode


# chkconfig--add WebLogic


[Root@tester init.d]/sbin/chkconfig--add WebLogic


[Root@tester init.d]/sbin/chkconfig--level WebLogic on


4. Add permissions to the log


# Touch/var/log/weblogic.log


# chown Weblogic.weblogic/var/log/weblogic.log


5. Establish Service Connection:


To stop WebLogic at reboot, we need the following links:


[Root@js-oracle init.d]# ln-s. /init.d/weblogic/etc/rc.d/rc0.d/k01weblogic


[Root@js-oracle init.d]# ln-s. /init.d/weblogic/etc/rc.d/rc6.d/k01weblogic





When the system starts WebLogic, we need the following links:


[Root@js-oracle init.d]# ln-s. /init.d/weblogic/etc/rc.d/rc2.d/s99weblogic


[Root@js-oracle init.d]# ln-s. /init.d/weblogic/etc/rc.d/rc3.d/s99weblogic


[Root@js-oracle init.d]# ln-s. /init.d/weblogic/etc/rc.d/rc5.d/s99weblogic


6. In


/u02/weblogic/oracle/middleware/user_projects/domains/base_domain/servers/adminserver/


Create the Security folder under this folder to create the file boot.properties


The contents of the Boot.properties file are as follows


Username=weblogic


password=11111111


7. Start WebLogic:


# service WebLogic Start


8. Stop WebLogic:


# Service WebLogic Stop





For an explanation of step 6


WebLogic in development mode, startup is not required to enter the administrator's username and password, but in the production mode, is needed. How can I automatically enter the administrator's password in production mode? The method is as follows:


The first method:


1. Create a password store file in the same directory as the WebLogic startup script boot.properties,


File contents:


Username= your WebLogic startup user


Password= your WebLogic's boot code.


2, start WebLogic again, at this time do not need a password can carry out the system.


3, delete the boot.properties file that you just created. (It has to be done, or it won't get in when it starts next time)


4, start WebLogic again, and then no password.


Note:


The development mode is used during installation and can be changed to production mode in the console.


The other is the D:\bea\user_projects\domains\mydomain\servers\ instance server to create a security directory, the boot.properties file into the line. Steps that do not require a 2,3,4.


Pay attention to the problem a chown–r weblogic:bea/u02


Give the WebLogic folder permissions to the WebLogic users under the BEA group

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.