CentOS 6.4上安装 Oracle 11g R2图文教程
“//”后是注释,“#”代表root用户下操作,“$”代表Oracle用户下操作。
#chkconfig iptables off //永久关闭防火墙或
#service iptabels stop //暂时关闭防火墙,重启系统后会自动打开
1.硬件检查:
1.1 内存要求:内存大于1G(使用虚拟机安装时内存要稍微大一些,否则安装检查不通过)
#cat /proc/meminfo //查看内存大小
1.2 交换分区要求:交换分区是内存的1.5倍,可根据实际情况调整
#grep SwapTotal /proc/meminfo //查看交换分区大小
1.3 硬盘空间要求硬盘空间要满足所需软件的大小,要求/tmp 分区不少于 400M ,安装目录应大于4G:
#df –h //查看磁盘空间使用情况
#du –ch //查看目录空间大小
2.软件检查: 2.1 检查安装oracle所依赖的组件包是否安装上:
#rpm–qa |grep 软件包名称 //检查软件包是否安装上
1.binutils-2.17.50.0.6
2.compat-libstdc++-33-3.2.3
3.elfutils-libelf-0.125
4.elfutils-libelf-devel-0.125
5.elfutils-libelf-devel-static-0.125
6.gcc-4.1.2
7.gcc-c++-4.1.2
8.glibc-2.5-24
9.glibc-common-2.5
10.glibc-devel-2.5
11.glibc-headers-2.5
12.kernel-headers-2.6.18
13.pdksh-5.2.14
14.libaio-0.3.106
15.libaio-devel-0.3.106
16.libgcc-4.1.2
17.libgomp-4.1.2
18.libstdc++-4.1.2
19.libstdc++-devel-4.1.2
20.make-3.81
21.numactl-devel-0.9.8.i386
22.sysstat-7.0.2
23.unixODBC-2.2.11
24.unixODBC-devel-2.2.11
2.2 安装缺少的软件包:
#rpm –ivh 软件包名称 //使用本地光盘镜像安装软件包
#yum install 软件包名称 //使用yum联网安装
3.配置系统环境 3.1修改内核参数:
#vi /etc/sysctl.conf
fs.file-max= 6815744
fs.aio-max-nr=1048576
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= 1048576
kernel.sem= 250 32000 100 128
kernel.shmall= 2097152(可以按照系统默认,不修改)
kernel.shmmax= 536870912(可以按照系统默认,不修改)
#sysctl –p //让内核参数生效
3.2修改进程数和最大会话数
#vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
3.3关联设置
#vi /etc/pam.d/login
session required pam_limits.so
3.4修改/etc/profile
#vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
4.创建安装用户、组和目录 4.1创建安装用户和组
#groupadd oinstall //创建oinstall组
#groupadd dba //创建dba组
#useradd -g oinstall -G dba oracle //新建用户oracle,设定其主组为oinstall,副组为dba
#id oracle //检查结果
#passwd oracle //设置oracle用户密码
4.2创建软件安装目
#mkdir -p /home/oracle_11/app/ //创建安装根目录
#chown -R oracle:oinstall /home/oracle_11/ //安装根目录所属用户和组为oracle用户和oinstall组
#chmod -R 755 /home/oracle_11/ //修改目录的访问权限为所属用户完全控制,所属组和其他用户可读和执行
4.3设置用户环境变量
#vi /home/oracle/.bash_profile
exportORACLE_BASE=/home/oracle_11/app //软件安装基目录
exportORACLE_SID=orcl //实例名
exportORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 //软件安装产品目录
exportPATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
#source /home/oracle/.bash_profile //加载文件使配置生效
#env|more //查看配置的环境变量是否正确

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Chinese version
Chinese version, very easy to use

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
