Home Database Mysql Tutorial Oracle 10g release 2 for CentOS 5.5

Oracle 10g release 2 for CentOS 5.5

Jun 07, 2016 pm 05:02 PM

安装CentOS 5.5时,如果服务器只是运行Oracle数据库的话,在安装CentOs5.0 时一定要选择安装gnome,开发工具包,遗留开发包,其他

第一部分,环境配置

1.安装CentOS 5.5

安装CentOS 5.5时,如果服务器只是运行Oracle数据库的话,在安装CentOs5.0 时一定要选择安装gnome,开发工具包,遗留开发包,其他一些包可以不选择安装。 

2.查询所需安装包是否完整

rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel libaio 

可能还需要以下一些包,在安装的过程中根据包依赖的关系,,把所依赖的包安装上:

compat-libstdc++-33-3.2.3-61.i386.rpm    

libXp-devel-1.0.0-8.i386.rpm

openmotif-devel-2.3.0-0.3.el5.i386.rpm

openmotif22-2.2.3-18.i386.rpm

perl-libxml-perl-0.08-1.2.1.noarch.rpm 

3.kernel参数修改系统配置文件/etc/sysctl.conf,在行末添加以下内容,在CentOS5.5上会看到

kernel.shmmax = 4294967295

kernel.shmall = 268435456这些参数已经存在并且默认启用了,

需要将原kernel.shmmax与kernel.shmall参数注释掉。【 Linux公社  】并在文件末尾添加以下内容:

#use for Oracle10gR2

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=262144

net.core.rmem_max=262144

net.core.wmem_default=262144

net.core.wmem_max=262144 

另外在安装oracle数据库的时候要注意/etc/hosts与/etc/sysconfig/network文件主机名的一致性,否则会在后面运行netca和dbca可能出现错误提示。

[注:主机名设置时尽量不要用localhost.localdomain,因为在搭建RAC时会出现一系列问题。]

例如:/etc/hosts文件内容如下:

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1        localhost.localdomain localhost

::1        localhost6.localdomain6 localhost6

192.168.1.2 keiichi.ora.com 

/etc/sysconfig/network内容如下:

NETWORKING=yes

NETWORKING_IPV6=no

HOSTNAME=keiichi.ora.com 

4.修改限制配额文件/etc/security/limits.conf,在文件末尾添加以下内容

#use for oracle10g

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536 

5.修改pam模块登录文件/etc/pam.d/login,在行末添加以下内容

session    required     /lib/security/pam_limits.so

session    required     pam_limits.so 

6.修改SELINUX配置文件/etc/selinux/config,确保以下内容

SELINUX=disabled

关闭SELIINUX 

7.修改全局环境文件/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 

8.因为默认centos5.5不支持10.2.0,修改配置文件,使CentOS 5.5支持Oracle10gR2.

# cp /etc/RedHat-release  redhat-release.bak

备份要修改的文件。

直接修改/etc/redhat-release内容为redhat-4

再运行"sysctl -p"应用以上参数 

第二部分,Oracle用户及目录配置及安装

1.创建和配置用户

[root@localhost ~]# groupadd oinstall   //创建oracle数据库安装组

[root@localhost ~]# groupadd dba        //创建oracle数据库管理组

[root@localhost ~]# useradd -m -g oinstall -G dba oracle //创建oracle用户

[root@localhost ~]# id oracle

uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)

[root@localhost ~]# passwd oracle     //为Oracle用户设置密码:

Changing password for user oracle.

New UNIX password: 

BAD PASSWORD: it is based on a dictionary word

Retype new UNIX password: 

passwd: all authentication tokens updated successfully. 

2.创建安装目录

# mkdir -p /u01/oracle     //创建oracle的BASE 目录

# chown -R oracle:oinstall /u01/oracle  //修改BASE目录的属主和属组

# chmod -R 775 /u01/oracle

# mv /root/10201_database_linux32.zip /u01/mk

# unzip /u01/10201_database_linux32.zip 

3.修改 Oracle 用户环境配置文件 .bash_profile

# su - oracle

$ vi ~/.bash_profile

添加

export ORACLE_BASE=/u01/oracle

export ORACLE_HOME=$ORACLE_BASE/10g

export ORACLE_SID=keiichi    //数据库实例的SID,在图形界面安装过程中要求输入SID与这里保持相同

export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib 

开始安装

su - oralce

$ cd /u01/databases     //Oracle解压后产生的目录

$ export LANG=en_US    //设置临时环境变量,解决oracle图形界面显示乱码的问题

$ ./runInstaller       //可以加参数-ignoreSysPreReqs,跳过对系统安装前的检查 

一直下一步就可以了. 

如果安装过程中有提示缺少什么文件的话,可以切换到ROOT用户,安装好需要的文件并继续安装。

安装后期会提示需要用ROOT用户执行两个脚本,一个一个执行它。直到安装完毕退出。 

相关Oracle安装介绍请看以下网页:

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks 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)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1273
29
C# Tutorial
1253
24
MySQL's Role: Databases in Web Applications MySQL's Role: Databases in Web Applications Apr 17, 2025 am 12:23 AM

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

Explain the role of InnoDB redo logs and undo logs. Explain the role of InnoDB redo logs and undo logs. Apr 15, 2025 am 12:16 AM

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

MySQL's Place: Databases and Programming MySQL's Place: Databases and Programming Apr 13, 2025 am 12:18 AM

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

MySQL vs. Other Programming Languages: A Comparison MySQL vs. Other Programming Languages: A Comparison Apr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL: From Small Businesses to Large Enterprises MySQL: From Small Businesses to Large Enterprises Apr 13, 2025 am 12:17 AM

MySQL is suitable for small and large enterprises. 1) Small businesses can use MySQL for basic data management, such as storing customer information. 2) Large enterprises can use MySQL to process massive data and complex business logic to optimize query performance and transaction processing.

How does MySQL index cardinality affect query performance? How does MySQL index cardinality affect query performance? Apr 14, 2025 am 12:18 AM

MySQL index cardinality has a significant impact on query performance: 1. High cardinality index can more effectively narrow the data range and improve query efficiency; 2. Low cardinality index may lead to full table scanning and reduce query performance; 3. In joint index, high cardinality sequences should be placed in front to optimize query.

MySQL for Beginners: Getting Started with Database Management MySQL for Beginners: Getting Started with Database Management Apr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

MySQL vs. Other Databases: Comparing the Options MySQL vs. Other Databases: Comparing the Options Apr 15, 2025 am 12:08 AM

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

See all articles