RedHat6.4安装Oracle12c 12.1.0.2.0

# vi /etc/hosts
这里要把本机IP和主机名加入hosts文件中

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

# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba oracle
# 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.


# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle
# mkdir -p /u01/app/oraInventory
# chown -R oracle:oinstall /u01/app/oraInventory
# chmod -R 775 /u01/app/oraInventory


# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

# vi /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so

# vi /etc/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


# lsmod|grep bridge
# modprobe bridge
# lsmod|grep bridge
bridge 79078 0
stp 2218 1 bridge
llc 5546 2 bridge,stp

# 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


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


rpm -q binutils compat-libstdc++-33 compat-libcap1-1.10 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel
rpm -q glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make numactl-devel sysstat
rpm -q unixODBC unixODBC-devel
yum -y install binutils compat-libstdc++-33 compat-libcap1-1.10 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel
yum -y install glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make numactl-devel sysstat
yum -y install unixODBC unixODBC-devel

rpm -ivh elfutils-libelf-devel-static-0.152-1.el6.x86_64.rpm --nodeps
rpm -ivh pdksh-5.2.14-37.el5_8.1.x86_64.rpm --nodeps

rpm -q binutils compat-libstdc++-33 compat-libcap1-1.10 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


# exit


这个地方要退出root用户重新用oracle用户登录,不能在root用户下面直接su - oracle
[oracle@pacollector ~]$ unzip p17694377_121020_Linux-x86-64_1of8.zip
[oracle@pacollector ~]$ unzip p17694377_121020_Linux-x86-64_2of8.zip
[oracle@pacollector ~]$ cd database/
[oracle@pacollector database]$ ls
install readme.html response rpm runInstaller sshsetup stage welcome.html
[oracle@pacollector database]$ export DISPLAY=192.168.10.16:0.0
[oracle@pacollector database]$ ./runInstaller
[img]http://dl2.iteye.com/upload/attachment/0113/5987/8e2ce193-2047-32cd-b770-99d257c95bf2.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/5990/efea4877-d661-3011-a932-c7d1ee17ede1.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/5993/1c08aeb9-8b1b-3f4f-ba37-c80f382dbc90.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/5995/ffc770de-ed0a-366e-804e-f9663adfc4ba.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/5997/9858471b-dc8f-355a-917b-f7fe76a34c4c.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/5999/7e291397-e59e-358d-8bca-a00851130f7d.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6003/08fa719a-97af-345a-a447-59aaba3848cd.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6005/70492000-572e-33d8-81a5-226e9ab6f70c.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6007/ed7773c5-57f1-3a15-9e9e-edc77833850f.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6009/b571a02a-4010-35cb-9148-1a694e05e796.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6013/6dd9676d-8a06-38df-a6b2-c5c97b197c74.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6015/83c94646-f684-32af-9a02-a0c8d0aaa6a5.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6017/ebd25e04-ecee-3253-8bc4-95a8af8db38d.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6019/e1ce84c6-1982-3557-83cf-4026f4e63463.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6023/a2a4854b-dbf0-3d1b-b54d-df23d300c482.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6029/e1f6661d-c798-306f-8931-42327a08d784.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6031/f31a3a22-c160-390c-8640-5051f7c0527a.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6033/73d88c3c-829d-3da5-8b73-a4ae3d188d14.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6037/96c880ff-1df0-3707-b0d7-b502cd0e8cc2.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6039/33897368-5fb1-3ef8-b1be-8627e320311b.jpg[/img]
[color=red]这个地方不要急着单击OK按钮,要换成root用户登录后执行Number1和Number2两个脚本。[/color]
# /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.

# /u01/app/oracle/product/12.1.0/dbhome_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/12.1.0/dbhome_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.
#

[img]http://dl2.iteye.com/upload/attachment/0113/6047/15818c95-af7e-32ef-8232-684ab8b987a1.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/6051/0f3dc5fb-b238-39fe-859c-60a9015f2a3a.jpg[/img]
在图形界面单击close按钮完成安装。


[oracle@pacollector ~]$ vi .bash_profile
# PATH=$PATH:$HOME/bin
# export PATH

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export ORACLE_SID=pacollorcl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:.
export LANG=en_US
# export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

[oracle@pacollector ~]$ source .bash_profile
[oracle@pacollector ~]$ which lsnrctl
/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl

[oracle@pacollector ~]$ cd /u01/app/oracle/product/12.1.0/dbhome_1/bin
[oracle@pacollector bin]$ pwd
/u01/app/oracle/product/12.1.0/dbhome_1/bin

[oracle@pacollector bin]$ vi dbstart
# ORACLE_HOME_LISTNER=$1
ORACLE_HOME_LISTNER=$ORACLE_HOME
[oracle@pacollector bin]$ vi dbshut
# ORACLE_HOME_LISTNER=$1
ORACLE_HOME_LISTNER=$ORACLE_HOME

[oracle@pacollector bin]$ vi /etc/oratab
# pacollorcl:/u01/app/oracle/product/12.1.0/dbhome_1:N
pacollorcl:/u01/app/oracle/product/12.1.0/dbhome_1:Y

$ vi /etc/rc.d/rc.local
su -oracle -c 'dbstart'
su -oracle -c 'lsnrctl start'


[oracle@pacollector ~]$ lsnrctl status
[oracle@pacollector ~]$ lsnrctl start
[oracle@pacollector ~]$ lsnrctl stop

[oracle@pacollector ~]$ sqlplus /nolog
SQL> conn /as sysdba
SQL> startup --"启动数据库实例"
SQL> shutdown immediate --"关闭数据库实例"
或者
[oracle@pacollector ~]$ sqlplus / as sysdba
SQL> startup --"启动数据库实例"
SQL> shutdown immediate --"关闭数据库实例"

$ sudo service iptables stop
$ sudo service iptables start
$ sudo chkconfig iptables off
$ sudo chkconfig iptables on
$ sudo vi /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 1521 -j ACCEPT


[oracle@pacollector ~]$ echo $ORACLE_SID --查看Oracle实例名
[oracle@pacollector ~]$ ps -ef|grep smon --查看已经启动了的实例名


[oracle@pacollector ~]$ dbca
会出现图形界面配置实例
[oracle@pacollector ~]$ netca
会出现配置Oracle Net Services Configuration的图形界面配置
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值