系统OEL8.4 处理  (rocky linux)

1、去除虚拟嵌套虚拟机功能

yum remove libvirt-libs

2、关闭防火墙

systemctl stop firewalld

systemctl disable firewalld

3、修改selinux参数

sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

4、修改主机名

hostnamectl set-hostname em13c

hostname #查看

前期准备

1、添加两块100g磁盘

分别for db 100g,em 100g 做成逻辑卷

fdisk /dev/sdb

fdisk /dev/sdc

pvcreate /dev/sdb1

pvcreate /dev/sdc1

vgcreate vgdb /dev/sdb1

vgcreate vgem /dev/sdc1

lvcreate -n lvdb -l 100%free vgdb

lvcreate -n lvem -l 100%free vgem

mkfs -t xfs /dev/vgdb/lvdb

mkfs -t xfs /dev/vgem/lvem

2、挂载

创建挂载点:

mkdir /u01

mkdir /u02

blkid #查出新添加盘uuid

将uuid添加进/etc/fstab

UUID="b917961c-43f1-41dd-94cd-6b4075da6035"      /u01   xfs    defaults        0 0

UUID="a3dfc962-4092-4373-8755-402645c52cfc"       /u02   xfs    defaults        0 0

# mount -a #自动挂载

3、vi /etc/hosts

添加

192.168.133.170 em13c.sztech.com em13c

192.168.133.180 dbserver

注:添加完之后重启系统

4、建立用户 组 目录

groupadd dba

groupadd oper

groupadd oinstall

useradd -g oinstall -G dba,oper oracle

echo "oracle_4U"|passwd --stdin

oracle

# mkdir -p /u01/app/oracle/product/19.12.0/db_1

5、权限设置

chown -R oracle:dba /u01/app

chmod -R 775 /u01/app

# ls -ltr -R /u01/app  说明:查看各级权限

6、上传介质

mkdir -p /u01/setup/db

cd /u01/setup/db

mkdir -p /u01/setup/em13c

LINUX.X64_1912_db_home.zip 放db

em13500_linux64-2.zip

em13500_linux64-3.zip

em13500_linux64-4.zip

em13500_linux64-5.zip

em13500_linux64.bin 放em13c

#查看解压文件

unzip -l LINUX.X64_1912_db_home.zip

6、设置oracle环境变量

# vi .bash_profile

export ORACLE_BASE=/u01/app/oracle

export

ORACLE_HOME=$ORACLE_BASE/product/19.12.0/db_1

export ORACLE_SID=emrep

export PATH=$ORACLE_HOME/bin:$PATH

# source .bash_profile

env |grep ORACLE_ #check

7、配置Yum源

#挂载镜像

# mount /dev/sr0 /mnt

# vi rh83.repo

[AppStream]

name=rh83-AppStream

baseurl=file:///mnt/AppStream/

enabled=1

gpgcheck=0

[BaseOS]

name=rh83-BaseOS

baseurl=file:///mnt/BaseOS/

enabled=1

gpgcheck=0

# yum makecache

8、安装包

# yum -y install bc binutils elfutils-libelf

elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio

libaio-devel libXrender libX11 libXau libXi libXtst libgcc libnsl librdmacm

libstdc++ libstdc++-devel libxcb libibverbs make policycoreutils

policycoreutils-python-utils smartmontools sysstat nfs-utils

9、root下修改内核参数

# vim /etc/sysctl.conf

kernel.shmmax = 277495689510912

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048586

fs.file-max = 6815744

kernel.shmall = 67747971072

net.ipv4.ip_local_port_range = 11000 65000

net.ipv4.tcp_tw_reuse = 1

net.core.somaxconn = 262144

net.ipv4.tcp_max_orphans = 262144

net.ipv4.tcp_max_syn_backlog = 262144

net.ipv4.tcp_synack_retries = 2

net.ipv4.tcp_syn_retries = 1

net.ipv4.tcp_fin_timeout = 1

net.ipv4.tcp_keepalive_time = 30

net.ipv4.tcp_keepalive_probes = 6

net.ipv4.tcp_keepalive_intvl = 5

net.ipv4.tcp_timestamps = 0

fs.aio-max-nr = 1048576

# /sbin/sysctl -p

9、解压开始安装DB

# unzip -d $ORACLE_HOME LINUX.X64_1912_db_home.zip

# export DISPLAY=192.168.133.1:0.0

# nm-connection-editor

说明:测试是否能调出图形界面

EM13C 搭建_linux

EM13C 搭建_3c_02

EM13C 搭建_oracle_03

EM13C 搭建_oracle_04

EM13C 搭建_linux_05

EM13C 搭建_oracle_06

EM13C 搭建_linux_07

EM13C 搭建_linux_08

报Swap空间不够,忽略此报错。

EM13C 搭建_linux_09

EM13C 搭建_oracle_10

点击“Yes”

EM13C 搭建_oracle_11

# watch df –h 实时查看磁盘变化

10、创建数据库

dbca

EM13C 搭建_linux_12

EM13C 搭建_3c_13

EM13C 搭建_3c_14

EM13C 搭建_3c_15

EM13C 搭建_oracle_16

EM13C 搭建_3c_17

EM13C 搭建_3c_18

EM13C 搭建_3c_19

EM13C 搭建_oracle_20

EM13C 搭建_oracle_21

EM13C 搭建_oracle_22

EM13C 搭建_3c_23

EM13C 搭建_linux_24

EM13C 搭建_3c_25

EM13C 搭建_oracle_26

EM13C 搭建_3c_27

EM13C 搭建_oracle_28

DB安装结束

现在开始安装em13c

[root@em13c em13c]# cd /u02

[root@em13c u02]# mkdir em13c

[root@em13c u02]# chown -R oracle:dba /u02

[root@em13c u02]# chmod -R 775 /u02

[oracle@em13c u02]$ cd /u01/setup/em13c

[oracle@em13c em13c]$ ll

total 8363808

-rw-r--r-- 1 root root 1897494675 Apr 20 16:18 em13500_linux64-2.zip

-rw-r--r-- 1 root root 2130750885 Apr 20 16:19 em13500_linux64-3.zip

-rw-r--r-- 1 root root 1454982045 Apr 20 13:08 em13500_linux64-4.zip

-rw-r--r-- 1 root root 1494500710 Apr 20 13:10 em13500_linux64-5.zip

-rwxr-xr-x 1 root root 1586801533 Apr 20 16:08 em13500_linux64.bin

[root@em13c em13c]# chmod +x em13500_linux64.bin

[oracle@em13c em13c]$ export DISPLAY=192.168.133.1:0.0

[oracle@em13c em13c]$./em13500_linux64.bin

EM13C 搭建_oracle_29

说明:生产环境不选sample,因为sample有连接限制,以下为oracle官方安装文档的信息。EM13C 搭建_3c_30

EM13C 搭建_oracle_31

EM13C 搭建_3c_32

安装包glibc-devel 32位的未安装i686

[root@em13c u02]# yum -y install glibc*i686 gcc

EM13C 搭建_oracle_33

EM13C 搭建_oracle_34

EM13C 搭建_linux_35

EM13C 搭建_linux_36

自动处理一下,剩下3个。

EM13C 搭建_oracle_37

解决方案如下:

alter system set

session_cached_cursors=300 scope=spfile;

alter system set shared_pool_size=500m;

alter system set

"_allow_insert_with_update_check"=true;

EM13C 搭建_3c_38

EM13C 搭建_oracle_39

EM13C 搭建_3c_40

EM13C 搭建_3c_41

EM13C 搭建_linux_42

EM13C 搭建_3c_43

EM13C 搭建_oracle_44

[root@em13c ~]#/u02/em13c/middleware/allroot.sh

EM13C 搭建_3c_45

em13c安装完毕,​​https://192.168.133.170:7803/em​

就能登陆

EM13C 搭建_linux_46

EM13C 搭建_oracle_47