1
|
[root@oracledb ~]
# yum -y install gcc gcc-c++ make binutils compat-libstdc++-33 glibc glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel unixODBC unixODBC-devel sysstat ksh
|
1
2
3
4
|
[root@oracledb ~]
# groupadd -g 200 oinstall
[root@oracledb ~]
# groupadd -g 201 dba
[root@oracledb ~]
# useradd -u 440 -g oinstall -G dba oracle
[root@oracledb ~]
# passwd oracle
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
[root@oracledb ~]
# vi /etc/sysctl.conf #末尾添加如下
fs.aio-max-nr = 1048576
fs.
file
-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
#一般设置物理内存的一半以上
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@oracledb ~]
# sysctl -p
|
1
2
3
4
5
|
[root@oracledb ~]
# vi /etc/security/limits.conf #末尾添加如下
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
|
1
2
|
[root@oracledb ~]
# vi /etc/pam.d/login #下面添加一条pam_limits.so
session required pam_limits.so
|
1
2
3
4
5
|
[root@oracledb ~]
# mkdir /opt/oracle/app/
[root@oracledb ~]
# mkdir /opt/oracle/oradata/
[root@oracledb ~]
# chmod 755 /opt/oracle/
[root@oracledb ~]
# chmod 775 /opt/oracle/app/
[root@oracledb ~]
# chown oracle.oinstall -R /opt/oracle/
|
1
2
3
4
5
6
|
[oracle@oracledb ~]$
vi
~/.bash_profile
export
ORACLE_BASE=
/opt/oracle/app
export
ORACLE_HOME=$ORACLE_BASE
/product/11
.2.0
/dbhome_1
export
PATH=$PATH:$ORACLE_HOME
/bin
export
ORACLE_SID=orcl
#数据库名字
[oracle@oracledb ~]$
source
.bash_profile
#立即生效
|
1
2
3
4
5
|
[root@oracledb~]
# unzip /media/linux.x64_11gR2_database_1of2.zip
[root@oracledb~]
# unzip /media/linux.x64_11gR2_database_2of2.zip
[root@oracledb~]
# xhost + #使所有用户都能访问图形桌面
[root@oracledb~]
# su –oracle
[oracle@oracle~]
#./media/database/runInstaller
|