Install Oracle 11gR1 x64 on CentOS


首先需要注意安装之前修改本地主机名。

  • 修改/etc/sysconfig/network文件中的HOSTNAME
  • 修改/etc/hosts中的127.0.0.1以及::1对应域名

修改完成后重启。原因是电信的DNS把localhost.localdomain指向了202.106.199.39,导致oracle em启动时不正常。

下面开始安装

创建Oracle用户及用户组

[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# useradd -m -g oinstall -G dba oracle
[root@localhost ~]# passwd oracle

修改系统参数

[root@localhost ~]# vim /etc/sysctl.conf
# Oracle Install
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576[root@localhost ~]# sysctl -p

创建Oracle目录

[root@localhost ~]# mkdir -p /opt/app/oracle
[root@localhost ~]# chown -R oracle:oinstall /opt/app
[root@localhost ~]# chmod -R 775 /opt/app

修改Shell限制

[root@localhost ~]# vim /etc/security/limits.conf
# Oracle Install.
oracle soft nproc  2047
oracle hard nproc  16384
oracle soft nofile 1024
oracle hard nofile 65536

安装必要的软件包,此处列出的软件包仅针对CentOS 2.6.18-238.12.1.el5

yum install gcc.x86_64 libaio-devel.x86_64 libstdc++-devel.x86_64 sysstat.x86_64 elfutils-libelf-devel.x86_64 glibc-devel.x86_64 glibc-devel.x86_64 glibc-devel gcc-c++ compat-libstdc++-33

设置ORACLE环境变量

vim /home/oracle/.bash_profile
ORACLE_BASE=/opt/app/oracle;export ORACLE_BASE
ORACLE_HOME=/opt/app/oracle/product/11.1.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl01;export ORACLE_SID
PATH=$PATH:$ORACLE_HOME/bin;export PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

修改oratab文件

[oracle@dev02 bin]$ vim /etc/oratab
orcl01:/opt/app/oracle/product/11.1.0/db_1:Y

设置ORACLE_HOME_LISTNER变量

[oracle@dev02 ~]$ vim /opt/app/oracle/product/11.1.0/db_1/bin/dbstart
[oracle@dev02 ~]$ vim /opt/app/oracle/product/11.1.0/db_1/bin/dbshut
两个文件的修改内容如下:
# First argument is used to bring up Oracle Net Listener
#ORACLE_HOME_LISTNER=$1
ORACLE_HOME_LISTNER=$ORACLE_HOME
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s