700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > rad linux下安装mysql_Rad Hat Enterprise Linux 5.5上安装Oracle 11g R2

rad linux下安装mysql_Rad Hat Enterprise Linux 5.5上安装Oracle 11g R2

时间:2021-05-17 20:46:00

相关推荐

rad linux下安装mysql_Rad Hat Enterprise Linux 5.5上安装Oracle 11g R2

学习的进度有点慢,终于在虚拟机上Red Hat Enterprise Linux 5.5系统下安装Oracle 11g R2版本数据库成功了,在这里把安装的经验和大家分享一下!当然,水平有限,请各路大虾们多包涵,多指教!!

我用的软件版本是linux_11gR2_database_32bit,可以到oracle官网上下载。

之前查过oracle的官方安装文档,上面有介绍,对一些硬件环境和软件包等的要求。这里暂时罗列我这次用到的相关信息。希望对大家有所帮助。

Oracle 11g R2数据库安装硬件配置要求:

最小内存 1 GB of RAM

虚拟内存容量

Available RAMSwap SpaceRequired

Between 1 GB and 2 GB1.5times the size of RAM

Between 2 GB and 16 GB Equal to the size of RAM

More than 16 GB 16 GB

硬盘空间要求

Installation Type Requirement for Software Files (GB)

Enterprise Edition 3.95

Standard Edition 3.88

Oracle 11g R2数据库支持的操作系统

Oracle Database 11g Release 2 (11.2) forLinux x86:

Asianux 2.0

Asianux 3.0

Oracle Enterprise Linux 4.0 Update 7 orlater

Oracle Enterprise Linux 5.0

Red Hat Enterprise Linux 4.0 Update 7 orlater

Red Hat Enterprise Linux 5.0

SUSE Linux Enterprise Server 10.0

SUSELinux Enterprise Server 11.0

需要的软件包支持:

这里只列出Asianux 3, Oracle Enterprise Linux 5.0, and Red Hat Enterprise Linux5.0等系统对软件包的要求系统是否安装过这些包。

binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3 (32 bit)

elfutils-libelf-0.125

elfutils-libelf-devel-0.125

gcc-4.1.2

gcc-c++-4.1.2

glibc-2.5-24

glibc-2.5-24 (32 bit)

glibc-common-2.5

glibc-devel-2.5

glibc-devel-2.5 (32 bit)

glibc-headers-2.5

ksh-0214

libaio-0.3.106

libaio-0.3.106 (32 bit)

libaio-devel-0.3.106

libaio-devel-0.3.106 (32 bit)

libgcc-4.1.2

libgcc-4.1.2 (32 bit)

libstdc++-4.1.2

libstdc++-4.1.2 (32 bit)

libstdc++-devel 4.1.2

make-3.81

numactl-devel-0.9.8.x86_64

sysstat-7.0.2

unixODBC-2.2.11 (32-bit) or later

unixODBC-devel-2.2.11 (64-bit) or later

unixODBC-2.2.11 (64-bit) or later

下面开始正式的安装过程:

1、安装前准备工作、软件包检查、配置环境变量

将oralce的安装包上传到主机上,推荐一个工具SSH Secure Shell Client,很好用。如下我上传到了root用户的桌面上并解压:

[root@oraclehost ~]# ls

linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip

[root@oraclehost ~]# unzip linux_11gR2_database_1of2.zip

[root@oraclehost ~]# unzip linux_11gR2_database_2of2.zip

[root@oraclehost ~]# ls

database linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip

1.1 检查所需软件包是否已安装

根据上面所罗列的在rhel5下安装oracle所需的软件包,一一检查是否已安装,命令为:

rpm–qa | grep package_name

如果已安装,命令输出会打印出已安装的软件包的名称;如果没有输出,则证明此包没有安装,可从RedHat的安装盘或者镜像中获取,然后使用如下命令安装:

rpm -ivh package_name

1.2 创建oracle用户

根据oracle官方文档所述,需要创建oinstall、dba、oper(可选)用户组和oralce用户,下面是我的创建过程,不过我并没有创建oper组:

[root@oraclehost ~]#/usr/sbin/groupadd oinstall

[root@oraclehost ~]#/usr/sbin/groupadd dba

[root@oraclehost ~]#/usr/sbin/useradd -g oinstall -G dbaoracle

[root@oraclehost ~]#passwd oracle

Changing password for user oracle.

New UNIX password:

BAD PASSWORD: it is too simplistic/systematic

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

[root@oraclehost ~]#

1.3 修改系统相关参数

1.3.1 修改内核参数

修改 /etc/sysctl.conf文件,加上如下参数

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

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

配置完后,执行下面命令将参数写入内核应用

[root@oraclehost ~]#/sbin/sysctl -p

1.3.2 修改用户的限制和验证等配置文件

修改 /etc/security/limits.conf文件,加上下面的参数

oraclesoft nproc 2047

oraclehard nproc 16384

oraclesoft nofile 1024

oraclehard nofile 65536

oraclesoft stack 10240

修改用户验证选项

修改/etc/pam.d/login文件加上如下参数

session required pam_limits.so

修改/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

1.3.3 设置oracle的安装路径配置

[root@oraclehost ~]# mkdir -p /u01/

[root@oraclehost ~]# mv /root/Desktop/database /u01/

[root@oraclehost ~]# chown -R oracle:oinstall /u01/

[root@oraclehost ~]# chmod -R 775 /u01

1.3.4 修改环境变量

切换到oracle用户,修改用户bash shell

[root@oraclehost ~]# su - oracle

[oracle@oraclehost ~]$ vi .bash_profile

增加如下内容:

export ORACLE_BASE=/u01/app

export ORACLE_HOME=$ORACLE_BASE/oracle

export ORACLE_SID=dmb2 //*数据库的SID,根据自己的需要和习惯命名*

exportPATH=$ORACLE_HOME/bin:$PATH:$HOME/bib

至此系统环境配置和准备工作都已经做完了,必要的话可以重启一下系统,因为改变了很多的系统配置。

2、执行图形界面安装(使用oracle用户)

[root@oraclehost ~]# su - oracle

[oracle@oraclehost ~]$ cd /u01/database/

[oracle@oraclehost ~]$ ./runInstaller

Starting Oracle Universal Installer...

Checking Temp space: must be greater than80 MB. Actual 27515 MB Passed

Checking swap space: must be greater than150 MB. Actual 4094 MB Passed

Checking monitor: must be configured todisplay at least 256 colors. Actual16777216 Passed

Preparingto launch Oracle Universal Installer from /tmp/OraInstall-07-17_07-18-53PM.Please wait ...

可以不填写,弹出提示框,直接点击yes。

选择install datebase software only,直接安装软件,稍后建库。下一步

选择安装server类型,选single,如果需要集群则安装另外一种

选择语种,

选择要安装的软件版本,这里我选择的是企业版,下一步

选择软件安装路径,之前在环境变量中已经设置过,这里软件自动检测到,默认即可,单击下一步

选择oracle所需用户组,自动检测到,默认即可。

然后软件安装程序开始检测硬件环境,所需软件包等配置是否正确,如下图:

检测结果如下图,物理内存和交换分区大小都达不到要求,我是在虚拟机中安装的,虽然内存设置的1G,实际上确实差了点,所以检测失败,不过这个不影响安装,勾选ignore all ,下一步即可

下面是配置总揽,如无错误,点击finish,开始安装。

快安装完毕会提示以root用户的身份执行两个脚本,orainstRoot.sh和root.sh。具体路径根据你开始设置的路径而定,安装程序会提示。下面是我安装过程中,执行脚本的过程:

[root@oraclehost database]#/u01/oraInventory/orainstRoot.sh

Changing permissions of /u01/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions forworld.

Changing groupname of /u01/oraInventory tooinstall.

The execution of the script is complete.

[root@oraclehost database]#/u01/app/oracle/root.sh

Running Oracle 11g root.sh script...

The following environment variables are setas:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/oracle

Enter the full pathname of the local bindirectory: [/usr/local/bin]:

Copying dbhome to /usr/local/bin ...

Copying oraenv to /usr/local/bin ...

Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...

Entries will be added to the /etc/oratabfile as needed by

Database Configuration Assistant when adatabase is created

Finished running generic part of root.sh script.

Now product-specific root actions will beperformed.

Finished product-specific root actions.

至此,oracle 11g安装完毕。

接下来,还有很重要的工作,就是建库和监听以及建立oracle与监听的自启动。这些内容将在下篇文章中分享给大家,如有兴趣,请继续关注! 见 /Linux/-07/87600p2.htm

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。