在CentOS上配置Oracle数据库是一个复杂的过程,涉及多个步骤。以下是一个详细的指南,帮助你在CentOS 7上安装和配置Oracle 11g R2数据库:
gcc
、make
、libaio
等。sudo groupadd oinstall
sudo groupadd dba
sudo useradd -g oinstall -G dba oracle
sudo passwd oracle
/etc/hosts
文件,添加本机的IP和主机名。sudo vi /etc/selinux/config
将SELINUX=enforcing
修改为SELINUX=disabled
。/tmp
。unzip /path/to/oracle11g.zip -d /oracle/install
/etc/sysctl.conf
文件,增加或修改以下参数:fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1073741824
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
执行以下命令使配置生效:sudo sysctl -p
/etc/security/limits.conf
文件,添加以下内容:oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 102408
/etc/pam.d/login
文件,添加以下内容:session required pam_limits.so
/etc/profile
文件,添加以下内容:if [ USER = "oracle" ]; then
ulimit -u 16384 -n 65536
fi
source /etc/profile
sudo mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
sudo chown -R oracle:oinstall /u01/app/oracle
sudo su - oracle
cd /u01/app/oracle/product/11.2.0/dbhome_1
./runInstaller
ORACLE_HOME/network/admin/listener.ora
文件,添加监听器配置。ORACLE_HOME/bin/dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname orcl -sid orcl -responseFile NO_VALUE -characterSet AL32UTF8
sudo systemctl start oracle
使用SQLPlus等工具连接到Oracle数据库,执行一些简单的SQL语句来验证数据库安装是否成功。通过以上步骤,你可以在CentOS 7上成功安装和配置Oracle 11g R2数据库。请参考Oracle官方文档以获取更详细的安装指南和最新的安装说明。