RedHat6.4安装Oracle11g 11.2.0.4

[root@foglight ~]# vi /etc/hosts 
这里要把本机IP和主机名加入hosts文件中 

VMWare设置CD/DVD处勾选 已连接 并指定RedHat6的ISO安装包 
[root@foglight ~]#mkdir /mnt/cdrom 
[root@foglight ~]#mount -o loop /dev/cdrom /mnt/cdrom 
[root@foglight ~]#yum list|grep vsftpd 

[root@foglight software]# groupadd oinstall 
[root@foglight software]# groupadd dba 
[root@foglight software]# useradd -g oinstall -G dba oracle 
[root@foglight software]# passwd oracle 
Changing password for user oracle. 
New password: 
BAD PASSWORD: it is based on a dictionary word 
BAD PASSWORD: is too simple 
Retype new password: 
passwd: all authentication tokens updated successfully. 
[root@foglight software]# su - oracle 


[oracle@foglight /]$ cd /home 
[oracle@foglight home]$ ls 
lost+found  oracle  software 
[oracle@foglight home]$ ll 
total 24 
drwx------. 2 root   root 16384 Jul 20 09:26 lost+found 
drwx------  4 oracle dba   4096 Jul 20 17:45 oracle 
drwxr-xr-x  2 root   root  4096 Jul 20 17:40 software 

[oracle@foglight home]$ su - root 
Password: 
[root@foglight ~]# cd /etc 
[root@foglight etc]# 


[root@foglight etc]# vi sysctl.conf 
# Controls the maximum shared segment size, in bytes 
# kernel.shmmax = 68719476736 

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

kernel.shmmax = 2147483648 
kernel.shmmni = 4096 
kernel.shmall = 2097152 
kernel.sem = 250 32000 100 128 
fs.file-max = 6815744 
fs.aio-max-nr = 1048576 
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@foglight etc]# lsmod|grep bridge 
[root@foglight etc]# modprobe bridge 
[root@foglight etc]# lsmod|grep bridge 
bridge                 79078  0 
stp                     2218  2 bridge,garp 
llc                     5546  3 bridge,garp,stp 

[root@foglight etc]# 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 
net.bridge.bridge-nf-call-ip6tables = 0 
net.bridge.bridge-nf-call-iptables = 0 
net.bridge.bridge-nf-call-arptables = 0 
kernel.msgmnb = 65536 
kernel.msgmax = 65536 
kernel.shmmax = 2147483648 
kernel.shmmni = 4096 
kernel.shmall = 2097152 
kernel.sem = 250 32000 100 128 
fs.file-max = 6815744 
fs.aio-max-nr = 1048576 
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 


伦理电影 http://www.dotdy.com/
以上几个内核参数的大致含义如下――  
kernel.shmma:最大共享内存段,以字节为单位,物理内存*1024*1024*2,为物理内存的2倍。  
kernel.shmmni:共享内存段的最大数目。 
kernel.shmall:共享内存总量,以页为单位。  
kernel.sem:每个信号对象集的最大信号对象数;系统范围内最大信号对象数;每个信号对象支持的最大操作数;系统范围内最大信号对象集数。  
fs.file-max:文件句柄数,表示在Linux系统中可以打开的文件数量。 
net.ipv4.ip_local_port_range:应用程序可使用的IPv4端口范围。 

[root@foglight oracle]# su - oracle 
[oracle@foglight ~]$ cd /home/oracle/ 
[oracle@foglight ~]$ mkdir /home/oracle/product 
[oracle@foglight ~]$ mkdir /home/oracle/product/11gR2 
[oracle@foglight ~]$ su - root 
Password: 
[root@foglight ~]# 
[root@foglight ~]# chown -R oracle:dba //home/oracle/product 
[root@foglight ~]# chown -R 775 //home/oracle/product 


[oracle@foglight ~]$ rpm -q  binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static glibc glibc-common glibc-devel gcc- gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel | sort 

[oracle@foglight ~]$ su - root 
Password: 
[root@foglight ~]# 
[root@foglight software]# rpm -ivh elfutils-libelf-devel-static-0.152-1.el6.x86_64.rpm --nodeps 


[root@foglight software]# mv p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip D_PAO_Agent_70500_Linux_x64.bin /home/oracle/ 

[root@foglight oracle]# su - oracle 
[oracle@foglight ~]$ ls 
D_PAO_Agent_70500_Linux_x64.bin         p13390677_112040_Linux-x86-64_2of7.zip 
p13390677_112040_Linux-x86-64_1of7.zip  product 
[oracle@foglight ~]$ 
[oracle@foglight ~]$ unzip p13390677_112040_Linux-x86-64_1of7.zip 
[oracle@foglight ~]$ unzip p13390677_112040_Linux-x86-64_2of7.zip 


[oracle@foglight ~]$ cd database/ 
[oracle@foglight database]$ ls 
install  readme.html  response  rpm  runInstaller  sshsetup  stage  welcome.html 
[oracle@foglight database]$ 
[oracle@foglight database]$ su - root 
Password: 
[root@foglight ~]# xhost + 
access control disabled, clients can connect from any host 
[root@foglight ~]# cd /home 
[root@foglight home]# ls 
lost+found  oracle  software 
[root@foglight home]# cd oracle/ 
[root@foglight oracle]# ls 
database                         p13390677_112040_Linux-x86-64_1of7.zip  product 
D_PAO_Agent_70500_Linux_x64.bin  p13390677_112040_Linux-x86-64_2of7.zip 
[root@foglight oracle]# chown -R oracle:dba /home/oracle/product/ 
[root@foglight oracle]# ll 
total 2487216 
drwxr-xr-x 7 oracle oinstall       4096 Aug 27  2013 database 
-rwxr-xr-x 1 root   root              0 Jul 20 13:11 D_PAO_Agent_70500_Linux_x64.bin 
-rwxr-xr-x 1 root   root     1395582860 Jul 20 12:09 p13390677_112040_Linux-x86-64_1of7.zip 
-rwxr-xr-x 1 root   root     1151304589 Jul 20 12:42 p13390677_112040_Linux-x86-64_2of7.zip 
drwxr-xr-x 3 oracle dba            4096 Jul 20 18:08 product 
[root@foglight ~]# exit 


这个地方要退出root用户重新用oracle用户登录,不能在root用户下面直接su - oracle 
[oracle@foglight ~]$ cd database/ 
[oracle@foglight database]$ ls 
install  readme.html  response  rpm  runInstaller  sshsetup  stage  welcome.html 
[oracle@foglight database]$ export DISPLAY=192.168.10.14:0.0 
[oracle@foglight database]$ ./runInstaller 
RedHat6.4安装Oracle11g 11.2.0.4_第1张图片
RedHat6.4安装Oracle11g 11.2.0.4_第2张图片
RedHat6.4安装Oracle11g 11.2.0.4_第3张图片
RedHat6.4安装Oracle11g 11.2.0.4_第4张图片
RedHat6.4安装Oracle11g 11.2.0.4_第5张图片

RedHat6.4安装Oracle11g 11.2.0.4_第6张图片

RedHat6.4安装Oracle11g 11.2.0.4_第7张图片


RedHat6.4安装Oracle11g 11.2.0.4_第8张图片

RedHat6.4安装Oracle11g 11.2.0.4_第9张图片

RedHat6.4安装Oracle11g 11.2.0.4_第10张图片

RedHat6.4安装Oracle11g 11.2.0.4_第11张图片


RedHat6.4安装Oracle11g 11.2.0.4_第12张图片
RedHat6.4安装Oracle11g 11.2.0.4_第13张图片
RedHat6.4安装Oracle11g 11.2.0.4_第14张图片

】:上述步骤先不要急着单击OK按钮,要以root用户登录执行完Number1和2两个脚本后再单击OK按钮才可以。 


RedHat6.4安装Oracle11g 11.2.0.4_第15张图片
RedHat6.4安装Oracle11g 11.2.0.4_第16张图片
RedHat6.4安装Oracle11g 11.2.0.4_第17张图片

RedHat6.4安装Oracle11g 11.2.0.4_第18张图片
RedHat6.4安装Oracle11g 11.2.0.4_第19张图片
RedHat6.4安装Oracle11g 11.2.0.4_第20张图片
RedHat6.4安装Oracle11g 11.2.0.4_第21张图片
RedHat6.4安装Oracle11g 11.2.0.4_第22张图片
RedHat6.4安装Oracle11g 11.2.0.4_第23张图片

 
RedHat6.4安装Oracle11g 11.2.0.4_第24张图片  

[oracle@foglight ~]$ vi .bash_profile 
安装好的oracle的sid信息就保存在这个文件里 

[root@foglight ~]# su - oracle 
[oracle@foglight ~]$ vi .bash_profile 
export ORACLE_BASE=/home/oracle/app/oracle 
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 
export ORACLE_SID=paoracle 
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib 

# PATH=$PATH:$HOME/bin 
# export PATH 
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:. 
export LANG=en_US 
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK 

[oracle@foglight ~]$ source .bash_profile 
[oracle@foglight ~]$ which lsnrctl 
/usr/bin/which: no lsnrctl in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin:.)

[oracle@foglight ~]$ lsnrctl start 

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-JUL-2015 17:49:22 

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

TNS-01106: Listener using listener name LISTENER has already been started 


[root@foglight oraInventory]# ls 
ContentsXML  logs  oraInst.loc  orainstRoot.sh  oui 
[root@foglight oraInventory]# sh orainstRoot.sh 
Changing permissions of /home/oracle/app/oraInventory. 
Adding read,write permissions for group. 
Removing read,write,execute permissions for world. 

Changing groupname of /home/oracle/app/oraInventory to dba. 
The execution of the script is complete. 


[root@foglight dbhome_1]# pwd 
/home/oracle/app/oracle/product/11.2.0/dbhome_1 
[root@foglight dbhome_1]# sh root.sh 
Performing root user operation for Oracle 11g 

The following environment variables are set as: 
    ORACLE_OWNER= oracle 
    ORACLE_HOME=  /home/oracle/app/oracle/product/11.2.0/dbhome_1 

Enter the full pathname of the local bin directory: [/usr/local/bin]: 直接输入Enter 
   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. 



[oracle@foglight bin]$ pwd 
/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin 
[oracle@foglight bin]$ vi dbstart 
# ORACLE_HOME_LISTNER=$1 
ORACLE_HOME_LISTNER=$ORACLE_HOME 
[oracle@foglight bin]$ vi dbshut 
# ORACLE_HOME_LISTNER=$1 
ORACLE_HOME_LISTNER=$ORACLE_HOME 
[oracle@foglight bin]$ vi /etc/oratab 
# paoracle:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N 
paoracle:/home/oracle/app/oracle/product/11.2.0/dbhome_1:Y 


[oracle@foglight bin]$ su - root 
Password: 
[root@foglight ~]# vi /etc/rc.d/rc.local     在最下面添加如下两行 
su -oracle -c 'dbstart' 
su -oracle -c 'lsnrctl start' 



安装结束后如果没有配置Database Configuration Assistant,可以像下面这样操作: 
[oracle@foglight admin]$  dbca  
会出现图形界面配置实例 
[oracle@foglight admin]$  netca  
会出现配置Oracle Net Services Configuration的图形界面配置 



[oracle@foglight ~]$ system-config-      (加Tab键就会出现所有system-config-开头的命令,其中有一项是system-config-date) 
[oracle@foglight ~]$ system-config-date      (在xmanager下直接回车就可以验证是否可以调用图形界面了) 

你可能感兴趣的:(RedHat6.4安装Oracle11g 11.2.0.4)