weblogic单机部署
安装weblogic
1.1 修改 打开文件最大个数、最大进程数【root用户操作】
## 新session永久生效,需要打开新终端(hard的值不能小于soft的值)
[root@node2 ~]$ vi /etc/security/limits.conf * soft nofile 65535 * hard nofile 65535 weblogic soft nproc 65535 weblogic hard nproc 65535 ## 临时设置 (1)硬限制 [root@db ~]# ulimit -Hn 102400 (2)软限制 [root@db ~]# ulimit -Sn 102400 [root@db ~]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 15021 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 102400 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 15021 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
创建weblogic用户、上传软件包
[root@db ~]# useradd weblogic [root@db ~]# echo 123456|passwd --stdin weblogic [root@db ~]# su - weblogic [weblogic@db ~]$ mkdir softwares [weblogic@db softwares]$ ll total 1230724 -rw-r--r-- 1 weblogic weblogic 191753373 Dec 16 2018 jdk-8u191-linux-x64.tar.gz -rw-r--r-- 1 weblogic weblogic 1068506707 Apr 24 21:54 wls1036_generic.jar
安装jdk
[weblogic@db softwares]$ tar xfz jdk-8u191-linux-x64.tar.gz [weblogic@db softwares]$ ll total 1230724 drwxr-xr-x 7 weblogic weblogic 245 Oct 6 2018 jdk1.8.0_191 -rw-r--r-- 1 weblogic weblogic 191753373 Dec 16 2018 jdk-8u191-linux-x64.tar.gz -rw-r--r-- 1 weblogic weblogic 1068506707 Apr 24 21:54 wls1036_generic.jar [weblogic@db softwares]$ echo -e "export JAVA_HOME=/home/weblogic/softwares/jdk1.8.0_191\nexport PATH=$PATH:$JAVA_HOME/bin" >> ~/.bash_profile [weblogic@db softwares]$ . ~/.bash_profile
安装weblogic
[weblogic@db softwares]$ java -jar wls1036_generic.jar Unable to instantiate GUI, defaulting to console mode. Extracting 0%....................................................................................................100% <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Welcome: -------- This installer will guide you through the installation of WebLogic 10.3.6.0. Type "Next" or enter to proceed to the next prompt. If you want to change data entered previously, type "Previous". You may quit the installer at any time by typing "Exit". Enter [Exit][Next]>回车<默认即可>
<-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Choose Middleware Home Directory: --------------------------------- "Middleware Home" = [Enter new value or use default "/home/weblogic/Oracle/Middleware"] Enter new Middleware Home OR [Exit][Previous][Next]> /home/weblogic/mywl <直接回车会使用默认的weblogic安装目录> <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Choose Middleware Home Directory: --------------------------------- "Middleware Home" = [/home/weblogic/mywl] Use above value or select another option: 1 - Enter new Middleware Home 2 - Change to default [/home/weblogic/Oracle/Middleware] Enter option number to select OR [Exit][Previous][Next]> 1 <选择自定义的weblogic安装目录> <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Choose Middleware Home Directory: --------------------------------- "Middleware Home" = [/home/weblogic/mywl] Enter new Middleware Home OR [Exit][Previous][Next]> 回车 <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Register for Security Updates: ------------------------------ Provide your email address for security updates and to initiate configuration manager. 1|Email:[] 2|Support Password:[] 3|Receive Security Update:[Yes] Enter index number to select OR [Exit][Previous][Next]> 3 <接收更新> <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Register for Security Updates: ------------------------------ Provide your email address for security updates and to initiate configuration manager. "Receive Security Update:" = [Enter new value or use default "Yes"] Enter [Yes][No]? No <不接收> <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Register for Security Updates: ------------------------------ Provide your email address for security updates and to initiate configuration manager. "Receive Security Update:" = [Enter new value or use default "Yes"] ** Do you wish to bypass initiation of the configuration manager and ** remain uninformed of critical security issues in your configuration? Enter [Yes][No]? yes <不接收通知> <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Register for Security Updates: ------------------------------ Provide your email address for security updates and to initiate configuration manager. 1|Email:[] 2|Support Password:[] 3|Receive Security Update:[No] Enter index number to select OR [Exit][Previous][Next]> 回车 <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Register for Security Updates: ------------------------------ Provide your email address for security updates and to initiate configuration manager. 1|Email:[] 2|Support Password:[] 3|Receive Security Update:[No] Enter index number to select OR [Exit][Previous][Next]> 回车 <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Choose Install Type: -------------------- Select the type of installation you wish to perform. ->1|Typical | Install the following product(s) and component(s): | - WebLogic Server | - Oracle Coherence 2|Custom | Choose software products and components to install and perform optional |configuration. Enter index number to select OR [Exit][Previous][Next]> 回车 <默认使用典型> <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> JDK Selection (Any * indicates Oracle Supplied VM): --------------------------------------------------- JDK(s) chosen will be installed. Defaults will be used in script string-substitution if installed. 1|Add Local Jdk 2|/home/weblogic/softwares/jdk1.8.0_191[x] *Estimated size of installation: 690.2 MB Enter 1 to add or >= 2 to toggle selection OR [Exit][Previous][Next]> 回车 <使用自定义的jdk版本> <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Choose Product Installation Directories: ---------------------------------------- Middleware Home Directory: [/home/weblogic/mywl] Product Installation Directories: 1|WebLogic Server: [/home/weblogic/mywl/wlserver_10.3] 2|Oracle Coherence: [/home/weblogic/mywl/coherence_3.7] Enter index number to select OR [Exit][Previous][Next]> 回车 <确认安装目录> <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> The following Products and JDKs will be installed: -------------------------------------------------- WebLogic Platform 10.3.6.0 |_____WebLogic Server | |_____Core Application Server | |_____Administration Console | |_____Configuration Wizard and Upgrade Framework | |_____Web 2.0 HTTP Pub-Sub Server | |_____WebLogic SCA | |_____WebLogic JDBC Drivers | |_____Third Party JDBC Drivers | |_____WebLogic Server Clients | |_____WebLogic Web Server Plugins | |_____UDDI and Xquery Support | |_____Evaluation Database |_____Oracle Coherence |_____Coherence Product Files *Estimated size of installation: 690.3 MB Enter [Exit][Previous][Next]> Apr 24, 2021 10:47:44 PM java.util.prefs.FileSystemPreferences$1 run INFO: Created user preferences directory. <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Installing files.. 0% 25% 50% 75% 100% [------------|------------|------------|------------] [***************************************************] Performing String Substitutions... <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Configuring OCM... 0% 25% 50% 75% 100% [------------|------------|------------|------------] [***************************************************] Creating Domains... <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Installation Complete Congratulations! Installation is complete. Press [Enter] to continue or type [Exit]> 回车 <-------------------- Oracle Installer - WebLogic 10.3.6.0 -------------------> Clean up process in progress ...
安装后的目录结构如下
[weblogic@db ~]$ ll total 0 drwxrwxr-x 2 weblogic weblogic 25 Apr 24 22:47 bea ## 中间件的开发公司 drwxrwxr-x 7 weblogic weblogic 183 Apr 24 22:47 mywl drwxrwxr-x 3 weblogic weblogic 87 Apr 24 22:31 softwares
[weblogic@db ~]$ cd mywl/
[weblogic@db mywl]$ ll total 152 drwxrwxr-x 6 weblogic weblogic 121 Apr 24 22:47 coherence_3.7 -rw-rw---- 1 weblogic weblogic 133 Apr 24 22:47 domain-registry.xml drwxrwxr-x 2 weblogic weblogic 21 Apr 24 22:47 logs ## 记录weblogic的组件安装明细 drwxrwxr-x 7 weblogic weblogic 28672 Apr 24 22:47 modules -rw-rw-r-- 1 weblogic weblogic 625 Apr 24 22:47 ocm.rsp -rw-rw-r-- 1 weblogic weblogic 108882 Apr 24 22:47 registry.dat -rw-rw-r-- 1 weblogic weblogic 1908 Apr 24 22:47 registry.xml ## 配置文件,记录服务器信息 drwxrwxr-x 8 weblogic weblogic 107 Apr 24 22:47 utils ## 工具目录 drwxrwxr-x 8 weblogic weblogic 131 Apr 24 22:47 wlserver_10.3
[weblogic@db logs]$ cat log.txt Apr 24, 2021 10:47:56 PM -- install "WebLogic Platform" 10.3.6.0 at /home/weblogic/mywl release 10.3.6.0 [Added] |_____Common Infrastructure Engineering 7.4.0.0 [Added] | |_____Uninstall [Added] | |_____Patch Client [Added] | |_____Patch Attachment Facility [Added] | |_____Clone Facility [Added] |_____WebLogic Server 10.3.6.0 [Added] | |_____Core Application Server [Added] | |_____Administration Console [Added] | |_____Configuration Wizard and Upgrade Framework [Added] | |_____Web 2.0 HTTP Pub-Sub Server [Added] | |_____WebLogic SCA [Added] | |_____WebLogic JDBC Drivers [Added] | |_____Third Party JDBC Drivers [Added] | |_____WebLogic Server Clients [Added] | |_____WebLogic Web Server Plugins [Added] | |_____UDDI and Xquery Support [Added] | |_____Server Examples [Not Installed] | |_____Evaluation Database [Added] | |_____Workshop Code Completion Support [Added] |_____Oracle Configuration Manager 10.3.5.0 [Added] | |_____Data Collector [Added] |_____Oracle Coherence 3.7.1.1 [Added] |_____Coherence Product Files [Added] |_____Coherence Examples [Not Installed]
[weblogic@db mywl]$ ll utils/ total 20 drwxrwxr-x 2 weblogic weblogic 82 Apr 24 22:47 bsu ##11g版本补丁安装脚本,12c版本以后是opatch drwxrwxr-x 7 weblogic weblogic 88 Apr 24 22:47 ccr drwxrwxr-x 2 weblogic weblogic 74 Apr 24 22:47 clone drwxrwxr-x 4 weblogic weblogic 30 Apr 24 22:47 config drwxrwxr-x 3 weblogic weblogic 80 Apr 24 22:47 quickstart drwxrwxr-x 4 weblogic weblogic 112 Apr 24 22:47 uninstall -rw-rw-r-- 1 weblogic weblogic 18441 Apr 24 22:47 utils.jar
[weblogic@db wlserver_10.3]$ pwd /home/weblogic/mywl/wlserver_10.3 [weblogic@db wlserver_10.3]$ ll common/bin/ total 112 -rwxr-x--- 1 weblogic weblogic 22773 Apr 24 22:47 commEnv.sh -rwxr-x--- 1 weblogic weblogic 2116 Apr 24 22:47 config_builder.sh -rwxr-x--- 1 weblogic weblogic 2268 Apr 24 22:47 config.sh -rwxr-x--- 1 weblogic weblogic 2573 Apr 24 22:47 pack.sh -rwxr-x--- 1 weblogic weblogic 2150 Apr 24 22:47 setPatchEnv.sh -rwxr-x--- 1 weblogic weblogic 4076 Apr 24 22:47 startDerby.sh -rwxr-x--- 1 weblogic weblogic 4082 Apr 24 22:47 startManagedWebLogic.sh -rwxr-x--- 1 weblogic weblogic 1442 Apr 24 22:47 stopDerby.sh -rwxr-x--- 1 weblogic weblogic 2081 Apr 24 22:47 unpack.sh -rwxr-x--- 1 weblogic weblogic 3292 Apr 24 22:47 upgrade.sh -rwxr-x--- 1 weblogic weblogic 31211 Apr 24 22:47 wlscontrol.sh -rwxr-x--- 1 weblogic weblogic 13740 Apr 24 22:47 wlsifconfig.sh -rwxr-x--- 1 weblogic weblogic 778 Apr 24 22:47 wlst.sh
创建域
[weblogic@db wlserver_10.3]$ common/bin/config.sh Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 Unable to instantiate GUI, defaulting to console mode. Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/weblogic/mywl/wlserver_10.3/common/lib/libjni.so which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'. <------------------- Fusion Middleware Configuration Wizard ------------------> Welcome: -------- Choose between creating and extending a domain. Based on your selection, the Configuration Wizard guides you through the steps to generate a new or extend an existing domain. ->1|Create a new WebLogic domain | Create a WebLogic domain in your projects directory. 2|Extend an existing WebLogic domain | Use this option to add new components to an existing domain and modify |configuration settings. Enter index number to select OR [Exit][Next]> 1 <创建新的域> <------------------- Fusion Middleware Configuration Wizard ------------------> Select Domain Source: --------------------- Select the source from which the domain will be created. You can create the domain by selecting from the required components or by selecting from a list of existing domain templates. ->1|Choose Weblogic Platform components | You can choose the Weblogic component(s) that you want supported in |your domain. 2|Choose custom template | Choose this option if you want to use an existing template. This |could be a custom created template using the Template Builder. Enter index number to select OR [Exit][Previous][Next]> 1 <安装系统推荐的组件> <------------------- Fusion Middleware Configuration Wizard ------------------> Application Template Selection: ------------------------------- Available Templates |_____Basic WebLogic Server Domain - 10.3.6.0 [wlserver_10.3]x |_____Basic WebLogic SIP Server Domain - 10.3.6.0 [wlserver_10.3] [2] |_____WebLogic Advanced Web Services for JAX-RPC Extension - 10.3.6.0 [wlserver_10.3] [3] |_____WebLogic Advanced Web Services for JAX-WS Extension - 10.3.6.0 [wlserver_10.3] [4] Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> 回车 <安装基础版weblogic域> <------------------- Fusion Middleware Configuration Wizard ------------------> Edit Domain Information: ------------------------ | Name | Value | _|________|_____________| 1| *Name: | base_domain | Enter value for "Name" OR [Exit][Previous][Next]> 回车 <确认域名称> <------------------- Fusion Middleware Configuration Wizard ------------------> Select the target domain directory for this domain: --------------------------------------------------- "Target Location" = [Enter new value or use default "/home/weblogic/mywl/user_projects/domains"] Enter new Target Location OR [Exit][Previous][Next]> /home/weblogic/domains <修改域的安装路径> <------------------- Fusion Middleware Configuration Wizard ------------------> Configure Administrator User Name and Password: ----------------------------------------------- Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers. | Name | Value | _|_________________________|_________________________________________| 1| *Name: | weblogic | 2| *User password: | | 3| *Confirm user password: | | 4| Description: | This user is the default administrator. | Use above value or select another option: 1 - Modify "Name" 2 - Modify "User password" 3 - Modify "Confirm user password" 4 - Modify "Description" Enter option number to select OR [Exit][Previous][Next]> 2 <修改用户密码> <------------------- Fusion Middleware Configuration Wizard ------------------> Configure Administrator User Name and Password: ----------------------------------------------- Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers. "*User password:" = [] Enter new *User password: OR [Exit][Reset][Accept]> weblogic110 <确认用户密码> <------------------- Fusion Middleware Configuration Wizard ------------------> Configure Administrator User Name and Password: ----------------------------------------------- Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers. | Name | Value | _|_________________________|_________________________________________| 1| *Name: | weblogic | 2| *User password: | *********** | 3| *Confirm user password: | | 4| Description: | This user is the default administrator. | Use above value or select another option: 1 - Modify "Name" 2 - Modify "User password" 3 - Modify "Confirm user password" 4 - Modify "Description" 5 - Discard Changes ** CFGFWK-64018: The confirmed password does not match the entered one. Enter option number to select OR [Exit][Previous][Next]> 3 <确认密码> <------------------- Fusion Middleware Configuration Wizard ------------------> Configure Administrator User Name and Password: ----------------------------------------------- Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers. "*Confirm user password:" = [] Enter new *Confirm user password: OR [Exit][Reset][Accept]> weblogic110 <------------------- Fusion Middleware Configuration Wizard ------------------> Configure Administrator User Name and Password: ----------------------------------------------- Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers. | Name | Value | _|_________________________|_________________________________________| 1| *Name: | weblogic | 2| *User password: | *********** | 3| *Confirm user password: | *********** | 4| Description: | This user is the default administrator. | Use above value or select another option: 1 - Modify "Name" 2 - Modify "User password" 3 - Modify "Confirm user password" 4 - Modify "Description" 5 - Discard Changes Enter option number to select OR [Exit][Previous][Next]> 回车 <确认密码> <------------------- Fusion Middleware Configuration Wizard ------------------> Domain Mode Configuration: -------------------------- Enable Development or Production Mode for this domain. ->1|Development Mode 2|Production Mode Enter index number to select OR [Exit][Previous][Next]> 2 <选择生成模式> <------------------- Fusion Middleware Configuration Wizard ------------------> Java SDK Selection: ------------------- ->1|Sun SDK 1.8.0_191 @ /home/weblogic/softwares/jdk1.8.0_191 2|Other Java SDK Enter index number to select OR [Exit][Previous][Next]> 回车 <------------------- Fusion Middleware Configuration Wizard ------------------> Select Optional Configuration: ------------------------------ 1|Administration Server [ ] 2|Managed Servers, Clusters and Machines [ ] 3|RDBMS Security Store [ ] Enter index number to select OR [Exit][Previous][Next]> 1 <只安装管理服务器as,其他资源可以在控制台创建> <------------------- Fusion Middleware Configuration Wizard ------------------> Select Optional Configuration: ------------------------------ 1|Administration Server [x] 2|Managed Servers, Clusters and Machines [ ] 3|RDBMS Security Store [ ] Enter index number to select OR [Exit][Previous][Next]> 回车 <确认只安装as> <------------------- Fusion Middleware Configuration Wizard ------------------> Configure the Administration Server: ------------------------------------ Each WebLogic Server domain must have one Administration Server. The Administration Server is used to perform administrative tasks. | Name | Value | _|__________________|_____________________| 1| *Name: | AdminServer | 2| *Listen address: | All Local Addresses | 3| Listen port: | 7001 | 4| SSL listen port: | N/A | 5| SSL enabled: | false | Use above value or select another option: 1 - Modify "Name" 2 - Modify "Listen address" 3 - Modify "Listen port" 4 - Modify "SSL enabled" Enter option number to select OR [Exit][Previous][Next]> 回车 <使用默认端口7001> <------------------- Fusion Middleware Configuration Wizard ------------------> Creating Domain... 0% 25% 50% 75% 100% [------------|------------|------------|------------] [***************************************************] **** Domain Created Successfully! ****
启动weblogic
[weblogic@db base_domain]$ mkdir servers/AdminServer -p [weblogic@db base_domain]$ cd servers/AdminServer [weblogic@db AdminServer]$ mkdir security [weblogic@db AdminServer]$ cd security [weblogic@db security]$ vim boot.properties username=weblogic password=weblogic110
[weblogic@db security]$ mkdir ~/bin [weblogic@db security]$ mkdir ~/logs/www -p
[weblogic@db bin]$ vim restart-admin.sh #!/bin/bash DATE=`date +%F` USER_MEM_ARGS="-Xms1024m -Xmx1024m -XX:MetaspaceSize:64m -XX:MaxMetaspaceSize:1024m \ -XX:+UseConcMarkSweepGC \ -XX:CMSFullGCsBeforeCompaction=4 \ -XX:+CMSParallelRemarkEnabled \ -XX:+HeapDumpOnOutOfMemoryError \ -verbose:gc \ -XX:+PrintGCDetails \ -XX:+PrintGCTimeStamps \ -XX:-TraceClassUnloading \ -Xloggc:/home/weblogic/domains/base_domain/logs/gc_srv.log" export USER_MEM_ARGS JAVA_OPTIONS ps -ef | grep java | grep weblogic | grep AdminServer | awk '{print $2}' | xargs kill -9 > /dev/null 2>&1 nohup /home/weblogic/domains/base_domain/bin/startWebLogic.sh > /home/weblogic/logs/www/admin-${DATE}.log 2>&1 &
创建日志目录
[weblogic@db bin]$ mkdir /home/weblogic/domains/base_domain/logs/
启动控制台
[weblogic@db bin]$ chmod +x restart-admin.sh [weblogic@db bin]$ ./restart-admin.sh
[weblogic@db bin]$ ss -lntp State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 *:22 *:* LISTEN 0 128 :::22 :::* LISTEN 0 128 ::1:7001 :::* users:(("java",pid=6086,fd=386)) LISTEN 0 128 fe80::3636:bbda:548b:ddd2%eth0:7001 :::* users:(("java",pid=6086,fd=385)) LISTEN 0 128 ::ffff:10.0.0.10:7001 :::* users:(("java",pid=6086,fd=384)) LISTEN 0 128 ::ffff:127.0.0.1:7001 :::* users:(("java",pid=6086,fd=383)) LISTEN 0 70 :::33060 :::* LISTEN 0 128 :::3306 :::*
访问控制台
http://10.0.0.10:7001/console/login/LoginForm.jsp
posted on 2021-06-01 08:31 hopeless-dream 阅读(132) 评论(0) 编辑 收藏 举报