[root@wallet01 ~]# yum -y install gcc gcc-c++ make sysstat ksh \
binutils elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static \
glibc glibc-common glibc-devel glibc-headers \
libaio libaio-devel libstdc++ libstdc++-devel unixODBC unixODBC-devel
[root@wallet01 ~]# yum -y install compat-libstdc++*
[root@wallet01 ~]# groupadd oinstall
[root@wallet01 ~]# groupadd dba
[root@wallet01 ~]# useradd -g oinstall -G dba oracle
[root@wallet01 ~]# echo oracle | passwd --stdin oracle
Changing password for user oracle.
passwd: all authentication tokens updated successfully.
[root@wallet01 ~]# cat >> /etc/sysctl.conf <<EOF
kernel.shmmni = 4096
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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
EOF
[root@wallet01 ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.shmmni = 4096
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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@wallet01 ~]# cat >> /etc/security/limits.conf <<EOF
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
EOF
[root@wallet01 ~]# cat >> /etc/pam.d/login <<EOF
session required pam_limits.so
EOF
[root@wallet01 ~]# cat >> /etc/profile <<EOF
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@wallet01 ~]# mkdir -p /u01/app/oracle
[root@wallet01 ~]# chown -R oracle:oinstall /u01/app
[root@wallet01 ~]# chmod -R 775 /u01/app
[root@wallet01 ~]# su - oracle
[oracle@wallet01 ~]$ vi .bash_profile
export ORACLE_SID=wallet
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export DISPLAY=192.168.1.99:0
stty erase ^H
[oracle@wallet01 ~]$ source .bash_profile
[oracle@wallet01 ~]$ unzip p13390677_112040_Linux-x86-64_1of7.zip
[oracle@wallet01 ~]$ unzip p13390677_112040_Linux-x86-64_2of7.zip
[oracle@wallet01 ~]$ cd database/stage/cvu/cv/admin
[oracle@wallet01 admin]$ vi cvu_config
change CV_ASSUME_DISTID=OEL4 to CV_ASSUME_DISTID=OEL6
[oracle@wallet01 ~]$ cd database
[oracle@wallet01 database]$ ./runInstaller
[root@wallet01 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@wallet01 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
[root@wallet01 ~]# su - oracle
[oracle@wallet01 ~]$ dbca
[oracle@wallet01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 28 16:08:21 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from dual;
DUM
---
X
转载于:https://blog.51cto.com/13598811/2083643