Home >Database >Mysql Tutorial >Oracle基础教程之安装Oracle 11g软件及示例方案

Oracle基础教程之安装Oracle 11g软件及示例方案

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:11:14847browse

前期准备安装好虚拟机(VMware Workstation 8.x版本或VMware Server 1.x版本)在虚拟机上安装好操作系统(CentOS 5.x或CentOS 4.

前期准备

安装好虚拟机(VMware Workstation 8.x版本或VMware Server 1.x版本)

在虚拟机上安装好操作系统(CentOS 5.x或CentOS 4.x)

建立好Oracle用户,并将Oracle软件拷贝到操作系统相关目录下

赋予了正确的用户权限

建议:希望大家拥有自己的笔记本,学习起来比较方便,内存最好是4G,最低2G吧,有40G,建议60G以上硬盘空间。

准备工作

groupadd oinstall

groupadd dba

useradd -g oinstall -G dba,wheel oracle

passwd oracle

mkdir -p /orasetup /u01/app/oracle/

chown -R oracle:oinstall /orasetup /u01/

chmod -R 770 /orasetup /u01/

环境变量

以oracle帐号登录,设置相应环境变量

[oracle@oracle ~]$ vi .bash_profile

Oracle私房菜之安装Oracle 11g软件及示例方案

为Oracle设置环境变量,如ORACLE_HOME、ORACLE_BASE、ORACLE_SID等,ORACLE_BASE为Oracle主目录,ORACLE_HOME为Oracle产品存放目录,ORACLE_SID为Oracle实例标识。

[oracle@oracle ~]$ source .bash_profile

提升权限

以root帐号登录,修改一些系统参数

[root@oracle ~]# vi /etc/profile

Oracle私房菜之安装Oracle 11g软件及示例方案

[root@oracle ~]# source /etc/profile

修改内核参数

[root@oracle ~]# vi /etc/sysctl.conf

Oracle私房菜之安装Oracle 11g软件及示例方案

对内核参数进行一些简单修改,包括共享内存段参数(SGA)、信号量参数、最大打开文件数参数、网络相关参数等

[root@oracle ~]# sysctl –p

权限与限制

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

nofile:操作系统用户可以同时打开的最大文件数

nproc:单个用户同时可以打开的进程数

[root@oracle ~]# vi /etc/pam.d/login

注意:如果是X86模式,类库使用lib即可,如果是X64模式,类库一定要使用lib64,否则会造成本地无法登录现象。

建议:rlwrap这个软件非常好用,可以在使用sqlplus工具时像Linux命令行一样使用上下方向键,安装方法非常简单(标准二进制码安装模式,需使用root帐号安装)。

通过root帐号,编译/etc/sudoers文件,增加一行oracle ALL=(ALL) NOPASSWD: ALL,可以使用sudo来相对安全的操作root帐号。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn