CentOS 7 安装配置oracle 12c数据库

PC环境:
CentOS-7-x86_64-Everything-1503-01.iso
linuxamd64_12102_database_1of2.zip
linuxamd64_12102_database_2of2.zip

安装界面中文乱码参考: http://xiongjiajia.iteye.com/blog/2226155

注意事项:
1.路径和文件夹不要有空格!
2.注意.bash_profile文件的配置,每个人的路径不同 !
3.记录下给oracle装到哪个地方了,.bash_profile配置文件要用



界面安装完成之后进行下面配置
==============================================================================
[latte@localhost ~]$ su
密码:
[root@localhost latte]# groupadd dba
[root@localhost latte]# groupadd oinstall
[root@localhost latte]# cat /etc/group | grep dba
dba:x:1001:
[root@localhost latte]# cat /etc/group | grep oinstall
oinstall:x:1002:
#加入组#[root@localhost latte]# usermod -a -G oinstall latte
#如果不存在则新建用户#[root@localhost latte]# useradd -g oinstall -G dba latte
[root@localhost latte]# id latte
uid=1001(latte) gid=1002(oinstall) 组=1002(oinstall),1001(dba)
[root@localhost latte]# passwd latte
更改用户 latte 的密码 。
新的 密码:
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。
[root@localhost latte]# cd /
[root@localhost /]# mkdir -p opt/latte
[root@localhost /]#chown -R latte:oinstall /home/latte/app
[root@localhost /]# ls -lrt opt
总用量 0
drwxr-xr-x. 2 root   root      6 3月  26 21:22 rh
drwxr-xr-x. 3 root   root     21 7月  10 11:49 ORCLfmap
drwxr-xr-x. 2 latte oinstall  6 7月  10 16:36 latte
[root@localhost /]# service iptables status
Redirecting to /bin/systemctl status  iptables.service
iptables.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

[root@localhost /]# service ip6tables status
Redirecting to /bin/systemctl status  ip6tables.service
ip6tables.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

[root@localhost /]# /usr/sbin/sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
#SELINUXTYPE=targeted
:wq
[root@localhost /]# reboot
[latte@localhost ~]$ /usr/sbin/sestatus
SELinux status:                 disabled
[root@localhost latte]# vi /etc/security/limits.conf
latte soft nproc 2047
latte hard nproc 16384
latte soft nofile 1024
latte hard nofile 65536
latte soft stack 10240
latte hard stack 10240
:wq
[root@localhost latte]# su - latte
上一次登录:五 7月 10 17:11:07 CST 2015pts/1 上
[latte@localhost perl5]$ vi .bash_profile
===============================================================================
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=dbserver; export ORACLE_HOSTNAME
ORACLE_UNQNAME=ORADB; export ORACLE_UNQNAME
ORACLE_BASE=/home/latte/app/latte; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=ORADB; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
===============================================================================
:wq
[latte@localhost perl5]$ source .bash_profile
#修改主机名称
[root@localhost latte]# hostnamectl --static set-hostname dbserver.localdomain
reboot
简省方法
bash-4.2$ su
密码:
[root@localhost latte]# groupadd oinstall
[root@localhost latte]# usermod -a -G oinstall latte
[root@localhost latte]# chown -R latte:oinstall /home/latte/app
[root@localhost latte]# vi /etc/selinux/config
[root@localhost latte]# vi /etc/security/limits.conf 
[root@localhost latte]# vi .bash_profile
[root@localhost latte]# hostnamectl --static set-hostname dbserver
[root@localhost latte]# reboot

创建数据库实例
[latte@localhost samples]$ dbca



配置监听
[latte@tea ~]$ netca



Linux下如何启动、关闭Oracle以及打开关闭监听: http://xiongjiajia.iteye.com/blog/2228632

猜你喜欢

转载自xiongjiajia.iteye.com/blog/2226301