oracle 11G安装图文

1. 依赖包
yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc- gcc-c++ libaio-devel libaio libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

2. 创建 oracle 用户和调整环境变量
groupadd -g 1001 dba
groupadd -g 1002 oinstall
useradd -u 1001 -g oinstall -G dba oracle
passwd oracle

3. oracle 用户环境变量配置( vim .bash_profile)
export PATH
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export DISPLAY=192.168.1.64:0.0
stty erase ^h

4. 系统调整
# vim /etc/security/limits.conf
* soft nofile 65535
* hard nofile 65535
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65535


# vim /etc/sysctl.conf
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
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 536870912
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

4.1 编辑/etc/pam.d/login,添加内容(黄色背景部分)

# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_loginuid.so
session required pam_limits.so
session optional pam_console.so

5 创建目录并授权,上传 oracle 软件包(linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip)
将Oracle软件包以 bin方式ftp到数据库服务器,建议放到/u01目录下,然后解包。
cd /u01
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
mkdir /u01/app
chown -R oracle:oinstall /u01/
chmod 755 -R /u01/

6. Xstart 设置
主机: oracle 服务器 ip
协议: SSH
用户名: 上面创建的用户
命令: /usr/bin/gnome-session --display $DISPLAY

oracle 11G安装图文

7. 开始安装 Oracle
7.1 Oracle 数据库软件安装

切换到 oracle 软件包目录, ./runInstaller 进行 oracle 数据库安装
$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB. Actual 10664 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8055 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-08-14_02-48-06PM. Please wait ...

oracle 11G安装图文

oracle 11G安装图文
这个警告没有任何意义,点【 YES】




语言选择

oracle 11G安装图文

oracle 11G安装图文
oracle 11G安装图文

oracle 11G安装图文

oracle 11G安装图文

oracle 11G安装图文


如果之前安装 yum 依赖包,还是提示没安装成功,就忽略把,勾选【 Ignore ALL】

oracle 11G安装图文

oracle 11G安装图文

oracle 11G安装图文

oracle 11G安装图文


弹出上图的对话框时,需在 root 管理员权限下执行上面两条脚本

oracle 11G安装图文

oracle 11G安装图文