AWS
Weblogic

【AWS】RHEL6.4にWLS12.1.2をインストールしてみた

More than 1 year has passed since last update.

ちょいと検証環境を構築する必要があっていろいろ試した。



1. RHEL6.4環境を構築する

今回は、AWS EC2で検証環境を構築した。

基本的にデフォルト設定で環境を構築したため、エビデンスは省略。

[root@ip-172-31-16-220 ~]# cat /etc/redhat-release 

Red Hat Enterprise Linux Server release 6.4 (Santiago)
[root@ip-172-31-16-220 ~]#



2. インストール用ユーザを作成する

今回は、インストール用に weblogicユーザ を作成する。

[root@ip-172-31-16-220 ~]# id weblogic

uid=501(weblogic) gid=501(weblogic) groups=501(weblogic)
[root@ip-172-31-16-220 ~]#



3.事前条件の確認


3.1 パッケージ

WLS12.1.2インストールに必要となるパッケージの導入確認をする。

必要なパッケージは下記(OTN参照)。

1111.png


3.2 SWAP領域の確認

[root@ip-172-31-16-220 ~]# df -Ph

Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 5.7G 2.6G 3.1G 46% /
none 498M 0 498M 0% /dev/shm
[root@ip-172-31-16-220 ~]#

SWAP領域ないので突貫工事しました。

http://qiita.com/na0AaooQ/items/278a11ed905995bd16af

[root@ip-172-31-16-220 ~]# grep Swap /proc/meminfo

SwapCached: 0 kB
SwapTotal: 524280 kB
SwapFree: 524280 kB
[root@ip-172-31-16-220 ~]#



4. JDKのインストール

[root@ip-172-31-16-220 tmp]# rpm -qa | grep jdk

java-1.6.0-openjdk-1.6.0.0-1.62.1.11.11.90.el6_4.x86_64
java-1.7.0-openjdk-1.7.0.25-2.3.10.4.el6_4.x86_64
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# rpm -ivh jdk-7u40-linux-x64.rpm
Preparing... ########################################### [100%]
1:jdk ########################################### [100%]
Unpacking JAR files...
rt.jar...
jsse.jar...
charsets.jar...
tools.jar...
localedata.jar...
jfxrt.jar...
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# rpm -qa | grep jdk
java-1.6.0-openjdk-1.6.0.0-1.62.1.11.11.90.el6_4.x86_64
java-1.7.0-openjdk-1.7.0.25-2.3.10.4.el6_4.x86_64
jdk-1.7.0_40-fcs.x86_64
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# /usr/java/jdk1.7.0_40/bin/java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]#

[root@ip-172-31-16-220 tmp]# 

[root@ip-172-31-16-220 tmp]# alternatives --config java

There are 2 programs which provide 'java'.

Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java

Enter to keep the current selection[+], or type selection number:
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_40/bin/java 3
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# alternatives --config java

There are 3 programs which provide 'java'.

Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
3 /usr/java/jdk1.7.0_40/bin/java

Enter to keep the current selection[+], or type selection number: 3
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# alternatives --config java

There are 3 programs which provide 'java'.

Selection Command
-----------------------------------------------
* 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
+ 3 /usr/java/jdk1.7.0_40/bin/java

Enter to keep the current selection[+], or type selection number:
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
[root@ip-172-31-16-220 tmp]#



5. インストールディレクトリの作成

[root@ip-172-31-16-220 tmp]# ll /opt/oracle/

ls: cannot access /opt/oracle/: No such file or directory
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# mkdir -p /opt/oracle/weblogic/
[root@ip-172-31-16-220 tmp]# mkdir -p /opt/oracle/oraInventory/
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# ll /opt/oracle/
total 8
drwxr-xr-x. 2 root root 4096 Feb 11 05:00 oraInventory
drwxr-xr-x. 2 root root 4096 Feb 11 05:00 weblogic
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# chown weblogic:weblogic /opt/oracle/weblogic/
[root@ip-172-31-16-220 tmp]# chown weblogic:weblogic /opt/oracle/oraInventory/
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# ll /opt/oracle/
total 8
drwxr-xr-x. 2 weblogic weblogic 4096 Feb 11 05:00 oraInventory
drwxr-xr-x. 2 weblogic weblogic 4096 Feb 11 05:00 weblogic
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]#



6. インベントリファイルの作成

[root@ip-172-31-16-220 tmp]# cd /opt/oracle/oraInventory

[root@ip-172-31-16-220 oraInventory]#
[root@ip-172-31-16-220 oraInventory]# ll
total 0
[root@ip-172-31-16-220 oraInventory]# pwd
/opt/oracle/oraInventory
[root@ip-172-31-16-220 oraInventory]#
[root@ip-172-31-16-220 oraInventory]# vi oraInst.loc
[root@ip-172-31-16-220 oraInventory]# cat oraInst.loc
inventory_loc=/opt/oracle/oraInventory/
inst_group=weblogic
[root@ip-172-31-16-220 oraInventory]#



7. レスポンスファイルの作成

[root@ip-172-31-16-220 oraInventory]# cd /tmp/

[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]# vi sinstall.txt
[root@ip-172-31-16-220 tmp]# cat sinstall.txt
[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/opt/oracle/weblogic/

#Set this variable value to the Installation Type selected. e.g. Fusion Middleware Infrastructure, Fusion Middleware Infrastructure With Examples.
INSTALL_TYPE=WebLogic Server

#Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name.
MYORACLESUPPORT_USERNAME=

#Provide the My Oracle Support Password
MYORACLESUPPORT_PASSWORD=

#Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration
DECLINE_SECURITY_UPDATES=true

#Set this to true if My Oracle Support Password is specified
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

#Provide the Proxy Host
PROXY_HOST=

#Provide the Proxy Port
PROXY_PORT=

#Provide the Proxy Username
PROXY_USER=

#Provide the Proxy Password
PROXY_PWD=<SECURE VALUE>

#Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port]
COLLECTOR_SUPPORTHUB_URL=
[root@ip-172-31-16-220 tmp]#
[root@ip-172-31-16-220 tmp]#



8. インストール(サイレント)

[weblogic@ip-172-31-16-220 ~]$ java -jar /tmp/wls_121200.jar -silent -responseFile /tmp/sinstall.txt -invPtrLoc /opt/oracle/oraInventory/oraInst.loc

Extracting files.................
You do not have permission to access /opt/oracle/oraInventory/oraInst.loc in the inventory /opt/oracle/oraInventory.
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz. Actual 2400.171 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 524280 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Checking temp space: must be greater than 300 MB. Actual 679 MB Passed

Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2017-02-11_06-17-38AM
Log: /opt/oracle/oraInventory//logs/install2017-02-11_06-17-38AM.log
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Expected result: One of enterprise-4,enterprise-5,enterprise-6,redhat-6,redhat-4,redhat-5,SuSE-10,SuSE-11
Actual Result: enterprise-6
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.
Expected result: 1.7
Actual Result: 1.7.0_40
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.
Verifying data......
Copying Files...
-----------20%----------40%----------60%----------80%--------100%

The installation of WebLogic Server 12.1.2.0.0 completed successfully.
[weblogic@ip-172-31-16-220 ~]$



9. インストール確認

※簡単にopatchコマンドでも叩いてみる

[weblogic@ip-172-31-16-220 OPatch]$ ./opatch lsinventory

Oracle Interim Patch Installer version 13.1.0.0.0
Copyright (c) 2013, Oracle Corporation. All rights reserved.

Oracle Home : /opt/oracle/weblogic
Central Inventory : /opt/oracle/oraInventory/
from : /opt/oracle/weblogic/oraInst.loc
OPatch version : 13.1.0.0.0
OUI version : 13.1.0.0.0
Log file location : /opt/oracle/weblogic/cfgtoollogs/opatch/opatch2017-02-11_06-22-31AM_1.log

OPatch detects the Middleware Home as "/opt/oracle/weblogic"

Lsinventory Output file location : /opt/oracle/weblogic/cfgtoollogs/opatch/lsinv/lsinventory2017-02-11_06-22-31AM.txt

--------------------------------------------------------------------------------

There are no Interim patches installed in this Oracle Home.

--------------------------------------------------------------------------------

OPatch succeeded.
[weblogic@ip-172-31-16-220 OPatch]$


★インストールは問題なく出来た模様


10.ドメイン作成

GUIでドメインを作成してみる。

1111.png

1111.png

1111.png

1111.png

1111.png

1111.png

1111.png

1111.png

1111.png

[root@ip-172-31-16-220 test]# pwd

/opt/oracle/weblogic/user_projects/domains/test
[root@ip-172-31-16-220 test]#
[root@ip-172-31-16-220 test]# ll
合計 44
drwxr-x---. 2 root root 4096 2月 11 15:27 2017 autodeploy
drwxr-x---. 5 root root 4096 2月 11 15:27 2017 bin
drwxr-x---. 8 root root 4096 2月 11 15:27 2017 config
drwxr-x---. 2 root root 4096 2月 11 15:27 2017 console-ext
-rw-r-----. 1 root root 328 2月 11 15:27 2017 fileRealm.properties
drwxr-x---. 2 root root 4096 2月 11 15:27 2017 init-info
drwxr-x---. 2 root root 4096 2月 11 15:27 2017 lib
drwxr-x---. 2 root root 4096 2月 11 15:27 2017 nodemanager
drwxr-x---. 2 root root 4096 2月 11 15:27 2017 security
drwxr-x---. 3 root root 4096 2月 11 15:27 2017 servers
-rwxr-x---. 1 root root 263 2月 11 15:27 2017 startWebLogic.sh
[root@ip-172-31-16-220 test]#
[root@ip-172-31-16-220 test]# ./startWebLogic.sh &
[1] 2651
[root@ip-172-31-16-220 test]# .

1111.png

1111.png

1111.png

1111.png

1111.png

1111.png

1111.png