在Linux系统上安装Oracle数据库是一个复杂的过程,涉及多个步骤和配置。以下是一个详细的安装步骤解析:
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
[root@localhost ~]# systemctl stop NetworkManager
[root@localhost ~]# systemctl disable NetworkManager
[root@localhost ~]# setenforce 0
[root@localhost ~]# sed -i "/^SELINUX=/s#enforcing#disabled#" /etc/selinux/config
[root@localhost ~]# cat >> /etc/hosts <<EOF
192.168.8.220 host_db
EOF
[root@localhost ~]# hostnamectl set-hostname host_db
[root@host-db ~]# groupadd dba
[root@host-db ~]# groupadd oper
[root@host-db ~]# useradd -g oinstall -G dba,oper oracle
[root@host-db ~]# echo "oracle" | passwd --stdin
[root@host-db ~]# mkdir -p /opt/oracle/app/oraInventory
[root@host-db ~]# mkdir -p /opt/oracle/app/oracle/product/19.3.0/dbhome_1
[root@host-db ~]# chown -R oracle:oinstall /opt/oracle
[root@host-db ~]# chmod -R 775 /opt/oracle
[oracle@host-db ~]$su - oracle
[oracle@host-db ~]$vi .bash_profile
export TMP=/tmpexport TMPDIR=$TMP
export ORACLE_HOSTNAME=host_db
export ORACLE_UNQNAME=orclexport ORACLE_BASE=/opt/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1
export ORACLE_SID=orclexport
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
[root@oracle ~]# yum list all
[root@oracle ~]# mount /dev/cdrom -o loop /mnt/
[root@oracle ~]# cd /etc/yum.repos.d/
[root@oracle ~]# vi server.repo
[root@oracle ~]# vi yum.sh
[root@oracle ~]# chmod 755 yum.sh
[root@oracle ~]# ./yum.sh
[root@oracle ~]# vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
[root@oracle ~]# sysctl -p
[root@oracle ~]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
[root@oracle ~]# vi /etc/pam.d/login
session required pam_limits.so
[root@oracle ~]# vi /etc/selinux/config
selinux=disabled
[root@oracle ~]# vi /etc/hosts
[root@oracle ~]# su - oracle
[oracle@oracle ~]# cd /tmp/database
[oracle@oracle ~]# ./runInstaller
[oracle@oracle ~]# sqlplus / as sysdba
SQL> create database ORCL
netca
和dbca
工具配置监听器和数据库实例。[oracle@oracle ~]# sqlplus / as sysdba
SQL> startup
[oracle@oracle ~]# sqlplus / as sysdba
SQL> shutdown
以上步骤涵盖了在Linux系统上安装Oracle数据库的主要流程。请注意,具体步骤可能会因Linux发行版和Oracle版本的不同而有所差异。建议参考Oracle官方文档以获取更详细的指导。