linux weblogic 重新配置集群,一、WebLogic 12C集群部署-主机初始化

这里用的weblogic版本是12.2.1.3.0;主机OracleLinux7

硬件要求

Checking if CPU speed is above 300 MHz

Checking if this platform requires a 64-bit JVM

Checking swap space: must be greater than 512 MB

Checking temp space: must be greater than 300 MB

一、虚拟主机准备

ISO下载地址

这里准备了两块磁盘,一块做系统盘,一个做应用盘;CPU参数勾选复选项。

cf2a9fd9a5c2284d4c2ab833cf3c678f.png

b3881661fcb2a0e5da7f679b5a67f123.png

系统盘的划分

ba5b68f916a567a21038ce19fc7c0244.png

二、设置固定IP

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-ens33

TYPE=Ethernet

BOOTPROTO=static

NAME=ens33

DEVICE=ens33

ONBOOT=yes

IPADDR=192.168.33.20

NETMASK=255.255.255.0

GATEWAY=192.168.33.2

EOF

systemctl restart network

#设置DNS

cat << EOF > /etc/resolv.conf

Generated by NetworkManager

nameserver 192.168.33.2

nameserver 114.114.114.114

nameserver 8.8.8.8

EOF

常用工具

yum install lrzsz unzip vim net-tools -y

三、设置主机名,主没有太多的作用,可以随意但是要有意义:比如位置+应用+IP

hostnamectl set-hostname v-app-20

四、格式化文件系统操作

#Disk /dev/sdb是要分配的磁盘

[root@weblogic-20 ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x0000f16a

Device Boot Start End Blocks Id System

/dev/sda1 * 2048 1050623 524288 83 Linux

/dev/sda2 1050624 41943039 20446208 8e Linux LVM

Disk /dev/sdb: 42.9 GB, 42949672960 bytes, 83886080 sectors

……

#新建分区,将整个磁盘划分

root@weblogic-20 ~]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Device does not contain a recognized partition table

Building a new DOS disklabel with disk identifier 0xeb3774f0.

Command (m for help): n

Partition type:

p primary (0 primary, 0 extended, 4 free)

e extended

Select (default p): p

Partition number (1-4, default 1):

First sector (2048-83886079, default 2048):

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-83886079, default 83886079):

Using default value 83886079

Partition 1 of type Linux and of size 40 GiB is set

Command (m for help): p

Disk /dev/sdb: 42.9 GB, 42949672960 bytes, 83886080 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0xeb3774f0

Device Boot Start End Blocks Id System

/dev/sdb1 2048 83886079 41942016 83 Linux

Command (m for help): wq

#创建VG

[root@localhost ~]# vgcreate appvg /dev/sdb1

Volume group "appvg" successfully created

[root@localhost ~]# lvcreate -l 100%free -n app appvg

Logical volume "app" created.

[root@localhost ~]#

#格式化

[root@localhost ~]# mkfs.xfs /dev/appvg/app

meta-data=/dev/appvg/app isize=256 agcount=4, agsize=2621184 blks

= sectsz=512 attr=2, projid32bit=1

= crc=0 finobt=0, sparse=0

data = bsize=4096 blocks=10484736, imaxpct=25

= sunit=0 swidth=0 blks

naming =version 2 bsize=4096 ascii-ci=0 ftype=1

log =internal log bsize=4096 blocks=5119, version=2

= sectsz=512 sunit=0 blks, lazy-count=1

realtime =none extsz=4096 blocks=0, rtextents=0

#挂载

[root@weblogic-20 ~]# vi /etc/fstab

#

# /etc/fstab

# Created by anaconda on Sun Feb 21 04:48:38 2021

#

# Accessible filesystems, by reference, are maintained under '/dev/disk'

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

/dev/mapper/ol-root / xfs defaults 0 0

UUID=488f605a-d443-44fa-ad5e-5f6238fced63 /boot xfs defaults 0 0

/dev/mapper/ol-swap swap swap defaults 0 0

/dev/appvg/app /weblogic xfs inode64 0 0

[root@localhost ~]# mkdir /weblogic

[root@localhost ~]# mount /weblogic

五、添加用户

useradd -d /weblogic -U weblogic

[root@localhost ~]# chown weblogic:weblogic /weblogic

[root@localhost ~]# passwd weblogic

Changing password for user weblogic.

New password:

BAD PASSWORD: The password is shorter than 8 characters

Retype new password:

passwd: all authentication tokens updated successfully.

#前面的都是ROOT操作,下面登陆weblogic

su weblogic

#复制环境变量文件

cp /etc/skel/.bashrc /weblogic/

cp /etc/skel/.bash_profile /weblogic/

重新登陆

六、JDK安装,设置环境变量

#上载,解压JDK

[root@localhost weblogic]# cd /opt/

[root@localhost opt]# ll

total 0

[root@localhost opt]# rz

rz waiting to receive.

zmodem trl+C ȡ

100% 140354 KB 14035 KB/s 00:00:10 0 Errors.gz...

[root@localhost opt]# tar zxf jdk-8u281-linux-x64.tar.gz && rm -f jdk-8u281-linux-x64.tar.gz

[root@localhost opt]# ln -s jdk1.8.0_281 jdk1.8

[root@localhost opt]# ll

total 4

lrwxrwxrwx. 1 root root 12 Feb 20 22:20 jdk1.8 -> jdk1.8.0_281

drwxr-xr-x. 8 10143 10143 4096 Dec 9 07:50 jdk1.8.0_281

cat >> /etc/profile <

export JAVA_HOME=/opt/jdk1.8

export PATH=$JAVA_HOME/bin:$PATH

export CLASSPATH=.:/lib/dt.jar:/lib/tools.jar

EOF

[root@localhost ~]# source /etc/profile

[root@localhost ~]# java -version

java version "1.8.0_281"

Java(TM) SE Runtime Environment (build 1.8.0_281-b09)

Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值