oracle 12c install for linux


操作系统: rhel-server-6.4-x86_64-dvd.iso
数据库版本:linuxamd64_12c_database_1of2.zip;linuxamd64_12c_database_2of2.zip


参考文档:https://oracle-base.com/articles/12c/oracle-db-12cr1-installation-on-oracle-linux-6


上传安装包
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip




修改主机名
[root@localhost ~]# vi /etc/hosts


127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.200 ora12c.localdomain ora12c






--将依赖包挂载
--依赖包最好路径没有空格


[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              37G  2.5G   32G   8% /
tmpfs                 751M  100K  751M   1% /dev/shm
/dev/sda1             194M   26M  159M  14% /boot
/dev/sr0              3.2G  3.2G     0 100% /media/RHEL_6.0 x86_64 Disc 1




[root@localhost ~]# mkdir /opt/pkg
--拷贝过后比较慢,耐心等待
[root@localhost RHEL_6.0 x86_64 Disc 1]# cp -r /media/RHEL_6.0\ x86_64\ Disc\ 1/* /opt/pkg/




--查看yum是否配置成功


[root@localhost ~]# yum update
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Update Process
No Packages marked for Update


--yum.repos.d下没有yum配置文件
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls -ll
total 0


--自己创建一个或者修改存在的配置文件


[root@localhost yum.repos.d]# touch rhel-debuginfo.repo
[root@localhost yum.repos.d]# vi rhel-debuginfo.repo 




[oel6]


name = Enterprise Linux 6.0 DVD


baseurl=file:///opt/pkg/Server


gpgcheck=0


enabled=1


--再次执行update
[root@localhost yum.repos.d]# yum update
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
oel6                                                                                                                                                                                      | 3.7 kB     00:00 ...
oel6/primary_db                                                                                                                                                                           | 2.9 MB     00:00 ...
Setting up Update Process
No Packages marked for Update
[root@localhost yum.repos.d]#


执行时需要以一个的执行
yum install binutils -y;
yum install compat-libcap1 -y;
yum install compat-libstdc++-33 -y;
yum install compat-libstdc++-33.i686 -y;
yum install gcc -y;
yum install gcc-c++ -y;
yum install glibc -y;
yum install glibc.i686 -y;
yum install glibc-devel -y;
yum install glibc-devel.i686 -y;
yum install ksh -y;
yum install libgcc -y;
yum install libgcc.i686 -y;
yum install libstdc++ -y;
yum install libstdc++.i686 -y;
yum install libstdc++-devel -y;
yum install libstdc++-devel.i686 -y;
yum install libaio -y;
yum install libaio.i686 -y;
yum install libaio-devel -y;
yum install libaio-devel.i686 -y;
yum install libXext -y;
yum install libXext.i686 -y;
yum install libXtst -y;
yum install libXtst.i686 -y;
yum install libX11 -y;
yum install libX11.i686 -y;
yum install libXau -y;
yum install libXau.i686 -y;
yum install libxcb -y;
yum install libxcb.i686 -y;
yum install libXi -y;
yum install libXi.i686 -y;
yum install make -y;
yum install sysstat -y;
yum install unixODBC -y;
yum install unixODBC-devel -y;


[root@localhost /]# vi /etc/sysctl.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096yu
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500    


[root@localhost /]# /sbin/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
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
[root@localhost /]#


[root@localhost /]# vi /etc/security/limits.conf


oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768








[root@localhost /]#


groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin


useradd -u 54321 -g oinstall -G dba,oper oracle


[root@localhost /]# groupadd -g 54321 oinstall
[root@localhost /]# groupadd -g 54322 dba
[root@localhost /]# groupadd -g 54323 oper
[root@localhost /]# #groupadd -g 54324 backupdba
[root@localhost /]# #groupadd -g 54325 dgdba
[root@localhost /]# #groupadd -g 54326 kmdba
[root@localhost /]# #groupadd -g 54327 asmdba
[root@localhost /]# #groupadd -g 54328 asmoper
[root@localhost /]# #groupadd -g 54329 asmadmin
[root@localhost /]# useradd -u 54321 -g oinstall -G dba,oper oracle
[root@localhost /]# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost /]#


[root@localhost /]# vi /etc/security/limits.d/90-nproc.conf
# Change this
*          soft    nproc    1024


# To this
* - nproc 16384
# To this
* - nproc 16384


[root@localhost /]# vi /etc/selinux/config


SELINUX=disabled




setenforce Permissive
[root@localhost /]# service iptables stop
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]
[root@localhost /]# chkconfig iptables off




[root@localhost /]# mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
[root@localhost /]# chown -R oracle:oinstall /u01
[root@localhost /]# chmod -R 775 /u01




Add the following lines at the end of the "/home/oracle/.bash_profile" file.


# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP


export ORACLE_HOSTNAME=ol6-121.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=cdb1


export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH


export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib




后面出现图像化安装界面几乎和其他版本一致






上一篇:分区表 行移动


下一篇:merge into ORA-30926