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

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

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

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

[img]http://dl.iteye.com/upload/picture/pic/133397/f9093ed4-4050-3dd2-b726-205565ee4fbd.png[/img]

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

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

# /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
# reboot
[latte@localhost ~]$ /usr/sbin/sestatus
SELinux status: disabled
# 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
# 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
#修改主机名称
# hostnamectl --static set-hostname dbserver.localdomain
reboot
简省方法
[code="vi"]bash-4.2$ su
密码:
# groupadd oinstall
# usermod -a -G oinstall latte
# chown -R latte:oinstall /home/latte/app
# vi /etc/selinux/config
# vi /etc/security/limits.conf
# vi .bash_profile
# hostnamectl --static set-hostname dbserver
# reboot[/code]
创建数据库实例
[latte@localhost samples]$ dbca

[img]http://dl.iteye.com/upload/picture/pic/133403/e58958b1-d4ad-38ca-a421-c98f57767400.png[/img]

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

[img]http://dl.iteye.com/upload/picture/pic/133411/64d61e1c-81a4-3d6d-ab12-467854fb26ed.png[/img]

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

你可能感兴趣的:(Linux)