search
HomeDatabaseMysql TutorialOracle 10g release 2 for CentOS 5.5

安装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
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
MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

MySQL: String Data Types and ENUMs?MySQL: String Data Types and ENUMs?May 13, 2025 am 12:05 AM

MySQloffersechar, Varchar, text, Anddenumforstringdata.usecharforfixed-Lengthstrings, VarcharerForvariable-Length, text forlarger text, AndenumforenforcingdataAntegritywithaetofvalues.

MySQL BLOB: how to optimize BLOBs requestsMySQL BLOB: how to optimize BLOBs requestsMay 13, 2025 am 12:03 AM

Optimizing MySQLBLOB requests can be done through the following strategies: 1. Reduce the frequency of BLOB query, use independent requests or delay loading; 2. Select the appropriate BLOB type (such as TINYBLOB); 3. Separate the BLOB data into separate tables; 4. Compress the BLOB data at the application layer; 5. Index the BLOB metadata. These methods can effectively improve performance by combining monitoring, caching and data sharding in actual applications.

Adding Users to MySQL: The Complete TutorialAdding Users to MySQL: The Complete TutorialMay 12, 2025 am 12:14 AM

Mastering the method of adding MySQL users is crucial for database administrators and developers because it ensures the security and access control of the database. 1) Create a new user using the CREATEUSER command, 2) Assign permissions through the GRANT command, 3) Use FLUSHPRIVILEGES to ensure permissions take effect, 4) Regularly audit and clean user accounts to maintain performance and security.

Mastering MySQL String Data Types: VARCHAR vs. TEXT vs. CHARMastering MySQL String Data Types: VARCHAR vs. TEXT vs. CHARMay 12, 2025 am 12:12 AM

ChooseCHARforfixed-lengthdata,VARCHARforvariable-lengthdata,andTEXTforlargetextfields.1)CHARisefficientforconsistent-lengthdatalikecodes.2)VARCHARsuitsvariable-lengthdatalikenames,balancingflexibilityandperformance.3)TEXTisidealforlargetextslikeartic

MySQL: String Data Types and Indexing: Best PracticesMySQL: String Data Types and Indexing: Best PracticesMay 12, 2025 am 12:11 AM

Best practices for handling string data types and indexes in MySQL include: 1) Selecting the appropriate string type, such as CHAR for fixed length, VARCHAR for variable length, and TEXT for large text; 2) Be cautious in indexing, avoid over-indexing, and create indexes for common queries; 3) Use prefix indexes and full-text indexes to optimize long string searches; 4) Regularly monitor and optimize indexes to keep indexes small and efficient. Through these methods, we can balance read and write performance and improve database efficiency.

See all articles

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

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.