oracle 安装笔记
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle 安装笔记相关的知识,希望对你有一定的参考价值。
修改主机名
[[email protected] ~]# sed -i "s/HOSTNAME=localhost.localdomain/HOSTNAME=oracledb/" /etc/sysconfig/network
[[email protected] ~]# hostname oracledb
添加主机名与IP对应记录
[[email protected] ~]# vi /etc/hosts
192.168.1.160 oracledb
[[email protected] ~]# ping oracledb
关闭Selinux
[[email protected] ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
[[email protected] ~]# setenforce 0
关闭防火墙
[[email protected] ~]# chkconfig iptables off
[[email protected] ~]# service iptables stop
安装依赖包
[[email protected] ~]# yum -y install gcc gcc-c++ make binutilscompat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-commonglibc-devel libaio libaio-devel libgcclibstdc++ libstdc++-devel unixODBC unixODBC-devel
创建用户和组
[[email protected] ~]# groupadd oinstall
[[email protected] ~]# groupadd dba
[[email protected] ~]# useradd -g oinstall -G dba oracle
[[email protected] ~]# passwd oracle
修改内核参数
[[email protected] ~]# vi /etc/sysctl.conf # 文件中末尾添加
net.ipv4.ip_local_port_range= 9000 65500
fs.file-max = 6815744
kernel.shmall = 10523004
kernel.shmmax = 6465333657
kernel.shmmni = 4096
kernel.sem = 250 32000 100128
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576
fs.aio-max-nr = 1048576
[[email protected] ~]# sysctl -p
[[email protected] ~]# sysctl -a
修改oracle安装用户资源限制
[[email protected] ~]# vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
[[email protected] ~]# vi /etc/pam.d/login
session required pam_namespace.so #下面添加一条pam_limits.so
session required pam_limits.so
建目录改权限
[[email protected] ~]# mkdir -p /u01
[[email protected] ~]# chown -R oracle:oinstall /u01
[[email protected] ~]# chmod -R 775 /u01
使所有用户都能访问图形桌面
[[email protected] ~]# xhost +
设置oracle环境变量
[[email protected] ~]# su - oracle #切换到oracle用户
[[email protected] ~]$ vim ~/.bash_profile
export ORACLE_BASE=/u01/oracle
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/oracle/product/11.2.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$PATH:$HOME/bin:/u01/oracle/product/11.2.0/dbhome_1/bin
[email protected] ~]$ source .bash_profile #立即生效
安装Oralce
1 解压orcale 到 root/Documents/123 目录
[[email protected] 123]$ ./database/runInstaller
修改/etc/oratab 将N改为Y,允许dbstart 启动数据库
[[email protected] /]# vim /etc/oratab
修改/etc/rc.local 自启动Oracle
[[email protected] /]# vim /etc/rc.local
su - oracle -c ‘lsnrctl start‘
su - oracle -c ‘dbstart‘
su - oracle -c ‘emctl start dbconsole‘
本文出自 “12352241” 博客,请务必保留此出处http://12362241.blog.51cto.com/12352241/1878523
以上是关于oracle 安装笔记的主要内容,如果未能解决你的问题,请参考以下文章