Home Database Mysql Tutorial CentOS 6.4上安装 Oracle 11g R2图文教程

CentOS 6.4上安装 Oracle 11g R2图文教程

Jun 07, 2016 pm 05:36 PM

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 //查看配置的环境变量是否正确

linux

Statement of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How do you alter a table in MySQL using the ALTER TABLE statement? How do you alter a table in MySQL using the ALTER TABLE statement? Mar 19, 2025 pm 03:51 PM

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

Explain InnoDB Full-Text Search capabilities. Explain InnoDB Full-Text Search capabilities. Apr 02, 2025 pm 06:09 PM

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

How do I configure SSL/TLS encryption for MySQL connections? How do I configure SSL/TLS encryption for MySQL connections? Mar 18, 2025 pm 12:01 PM

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]

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? Mar 21, 2025 pm 06:28 PM

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

How do you handle large datasets in MySQL? How do you handle large datasets in MySQL? Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

How do you drop a table in MySQL using the DROP TABLE statement? How do you drop a table in MySQL using the DROP TABLE statement? Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

Difference between clustered index and non-clustered index (secondary index) in InnoDB. Difference between clustered index and non-clustered index (secondary index) in InnoDB. Apr 02, 2025 pm 06:25 PM

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values ​​and pointers to data rows, and is suitable for non-primary key column queries.

How do you create indexes on JSON columns? How do you create indexes on JSON columns? Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

See all articles