首页 > 数据库 >OEL 5.11安装oracle 10.2.0.1

OEL 5.11安装oracle 10.2.0.1

时间:2022-12-04 17:00:54浏览次数:56  
标签:10.2 0.1 10g leo 5.11 oracle ogg root u01

文档课题:OEL 5.11安装oracle 10.2.0.1
系统:oel 5.11 64位
数据库:oracle 10.2.0.1 64位
软件包名称:10201_database_linux_x86_64.cpio.gz
1、安装准备
1.1、系统信息
[root@leo-10g-ogg-10g-ogg ~]# cat /etc/*release
Enterprise Linux Enterprise Linux Server release 5.11 (Carthage)
Oracle Linux Server release 5.11
Red Hat Enterprise Linux Server release 5.11 (Tikanga)
[root@leo-10g-ogg-10g-ogg ~]# uname -a
Linux leo-10g-ogg-10g-ogg 2.6.39-400.215.10.el5uek #1 SMP Tue Sep 9 22:51:46 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux
1.2、用户与组
[root@leo-10g-ogg ~]# groupadd oinstall
[root@leo-10g-ogg ~]# groupadd dba
[root@leo-10g-ogg ~]# useradd -g oinstall -G dba oracle
[root@leo-10g-ogg ~]# echo oracle_4U | passwd --stdin oracle
1.3、安装目录
[root@leo-10g-ogg ~]# mkdir -p /u01/app/oracle/product/10.2.0/db_1
[root@leo-10g-ogg ~]# mkdir -p /u01/app/oraInventory
[root@leo-10g-ogg ~]# chown -R oracle:oinstall /u01/app/oracle
[root@leo-10g-ogg ~]# chown -R oracle:oinstall /u01/app/oraInventory
[root@leo-10g-ogg ~]# chmod -R 775 /u01
1.4、yum源
[root@leo-10g-ogg-10g-ogg ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 47G 2.5G 42G 6% /
/dev/sda1 996M 51M 894M 6% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
[root@leo-10g-ogg-10g-ogg ~]# mount /dev/sr0 /mnt
[root@leo-10g-ogg-10g-ogg ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 47G 2.5G 42G 6% /
/dev/sda1 996M 51M 894M 6% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sr0 4.0G 4.0G 0 100% /mnt
[root@leo-10g-ogg-10g-ogg ~]# mkdir -p /etc/yum.repos.d/bak
[root@leo-10g-ogg-10g-ogg ~]# mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak
[root@leo-10g-ogg yum.repos.d]# cat <<EOF>>/etc/yum.repos.d/oel5.repo
[oel5]
name=oel5
baseurl=file:///mnt/Server
enable=1
gpgcheck=0
gpgkey=file:///mnt/RPM-GPG-KEY-oracle
EOF
[root@leo-10g-ogg yum.repos.d]# yum makecache
1.5、依赖包
[root@leo-10g-ogg mnt]# yum -y install gcc make binutils openmotif setarch compat-db* compat-gcc* compat-gcc-c++ compat-libstdc++ yum-fastestmirror compat-libc* libXp.so.6 libc-* libaio* glibc-devel* libgcc* gnome-lib* libXp*
1.6、内存信息
[root@leo-10g-ogg yum.repos.d]# grep MemTotal /proc/meminfo
MemTotal: 4044048 kB
[root@leo-10g-ogg yum.repos.d]# grep SwapTotal /proc/meminfo
SwapTotal: 4192960 kB
1.7、kernel参数
[root@leo-10g-ogg mnt]# vi /etc/sysctl.conf
[root@leo-10g-ogg mnt]# cat /etc/sysctl.conf
说明:标注黄颜色的为系统默认启动的,手动注释掉
# Controls the maximum shared segment size, in bytes
#kernel.shmmax = 4294967295

# Controls the maximum number of shared memory segments, in pages
#kernel.shmall = 268435456

#user for oracle10g
kernel.shmall = 2097152
kernel.shmmax = 4294967296
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
说明:a、kernel.shmall需为2097152;b、需注释掉此前的shmmax与shmall值.
[root@leo-10g-ogg ~]# more /proc/sys/vm/hugetlb_shm_group
0
[root@leo-10g-ogg ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
[root@leo-10g-ogg ~]# vi /etc/sysctl.conf
添加如下内容.
vm.hugetlb_shm_group = 502
说明:502为dba组号.
[root@leo-10g-ogg ~]# /sbin/sysctl -p
1.8、系统限制
[root@leo-10g-ogg mnt]# cat <<EOF>>/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
1.9、登录文件
配置登录文件参数.
[root@leo-10g-ogg ~]# cat <<EOF>>/etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
EOF
1.10、profile文件
[root@leo-10g-ogg ~]# cat <<EOF>>/etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
EOF
[root@leo-10g-ogg ~]# source /etc/profile
1.11、SELinux
[root@leo-10g-ogg ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
说明:修改SELINUX=disabled,重启生效.
1.12、环境变量
[oracle@leo-10g-ogg ~]$ cat <<EOF>>/home/oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=orcl
export PATH=\$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib
EOF
[oracle@leo-10g-ogg ~]$ source .bash_profile
1.13、hosts文件
[root@leo-10g-ogg oraInventory]# cat <<EOF>>/etc/hosts
192.168.133.108 leo-10g-ogg
EOF
1.14、防火墙
[root@leo-10g-ogg ~]# service iptables status
Firewall is stopped.
1.15、系统版本
[root@leo-10g-ogg ~]# vi /etc/redhat-release
Red Hat Enterprise Linux Server release 5.11 (Tikanga)
说明:将5.11修改为4.
1.16、安装包处理
[root@leo-10g-ogg ~]# mkdir -p /u01/setup/db
sftp> cd /u01/setup/db
sftp> lcd F:\installmedium\10g\Linux
sftp> put 10201_database_linux_x86_64.cpio.gz
[root@leo-10g-ogg ~]# chown -R oracle:oinstall /u01/setup/
[root@leo-10g-ogg ~]# su - oracle
[oracle@leo-10g-ogg ~]$ cd /u01/setup/db
[oracle@leo-10g-ogg db]$ gunzip -q 10201_database_linux_x86_64.cpio.gz
[oracle@leo-10g-ogg db]$ cpio -idmv <10201_database_linux_x86_64.cpio
2、DB软件安装
[oracle@leo-10g-ogg database]$ pwd
/u01/setup/db/database
[oracle@leo-10g-ogg database]$ export DISPLAY=192.168.133.1:0.0
[oracle@leo-10g-ogg database]$ ./runInstaller

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1

OEL 5.11安装oracle 10.2.0.1_oel 5.11_02

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_03

OEL 5.11安装oracle 10.2.0.1_oel 5.11_04

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_05

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_06

OEL 5.11安装oracle 10.2.0.1_oel 5.11_07

OEL 5.11安装oracle 10.2.0.1_oel 5.11_08

说明:linux 6安装oracle 10.2.0.1进度条到83%时会出现告警,通常是ins_ctx.mk、ins_rdbms.mk、ins_sysman.mk、ins_emdb.mk的问题,linux 5不会.

OEL 5.11安装oracle 10.2.0.1_oel 5.11_09

[root@leo-10g-ogg ~]# /u01/app/oracle/oraInventory/orainstRoot.sh
[root@leo-10g-ogg ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh

OEL 5.11安装oracle 10.2.0.1_oel 5.11_10

3、DB实例安装
说明:监听在数据库软件安装时已自动创建,建库前启动监听.
[oracle@leo-10g-ogg database]$ lsnrctl start
[oracle@leo-10g-ogg database]$ dbca

OEL 5.11安装oracle 10.2.0.1_oel 5.11_11

OEL 5.11安装oracle 10.2.0.1_oel 5.11_12

OEL 5.11安装oracle 10.2.0.1_oel 5.11_13

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_14

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_15

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_16

OEL 5.11安装oracle 10.2.0.1_oel 5.11_17

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_18

OEL 5.11安装oracle 10.2.0.1_oel 5.11_19

OEL 5.11安装oracle 10.2.0.1_oel 5.11_20

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_21

OEL 5.11安装oracle 10.2.0.1_oel 5.11_22

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_23

OEL 5.11安装oracle 10.2.0.1_oel 5.11_24

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_25

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_26

OEL 5.11安装oracle 10.2.0.1_oel 5.11_27

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_28

OEL 5.11安装oracle 10.2.0.1_oracle 10.2.0.1_29

Oracle 10g软件安装与实例创建完成.
4、DB信息
[oracle@leo-10g-ogg database]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Dec 4 16:29:55 2022

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> col file_name for a45
SQL> set line 200
SQL> select 'datafile' file_type,file#,name FILE_NAME,status,enabled from v$datafile
2 union all
3 select 'tempfile',file#,name FILE_NAME,status,enabled from v$tempfile
4 union all
5 select 'logfile',group# file#,member FILE_NAME,status,'' from v$logfile
6 union all
7 select 'controlfile', to_number('') ,name FILE_NAME,status,'' from v$controlfile;

FILE_TYPE FILE# FILE_NAME STATUS ENABLED
----------- ---------- --------------------------------------------- ------- ----------
datafile 1 /u01/app/oracle/oradata/orcl/system01.dbf SYSTEM READ WRITE
datafile 2 /u01/app/oracle/oradata/orcl/undotbs01.dbf ONLINE READ WRITE
datafile 3 /u01/app/oracle/oradata/orcl/sysaux01.dbf ONLINE READ WRITE
datafile 4 /u01/app/oracle/oradata/orcl/users01.dbf ONLINE READ WRITE
tempfile 1 /u01/app/oracle/oradata/orcl/temp01.dbf ONLINE READ WRITE
logfile 3 /u01/app/oracle/oradata/orcl/redo03.log
logfile 2 /u01/app/oracle/oradata/orcl/redo02.log
logfile 1 /u01/app/oracle/oradata/orcl/redo01.log
controlfile /u01/app/oracle/oradata/orcl/control01.ctl
controlfile /u01/app/oracle/oradata/orcl/control02.ctl
controlfile /u01/app/oracle/oradata/orcl/control03.ctl

11 rows selected.
[oracle@leo-10g-ogg database]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 04-DEC-2022 16:07:18

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 04-DEC-2022 16:01:55
Uptime 0 days 0 hr. 5 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=leo-10g-ogg)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@leo-10g-ogg database]$ ps -ef|grep ora_smon
oracle 50825 1 0 16:05 ? 00:00:00 ora_smon_orcl
oracle 50922 4107 0 16:18 pts/1 00:00:00 grep ora_smon

标签:10.2,0.1,10g,leo,5.11,oracle,ogg,root,u01
From: https://blog.51cto.com/u_12991611/5910010

相关文章