首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

CentOS装配Oracle11g(转)

2013-04-02 
CentOS安装Oracle11g(转)yum -y install compat-libstdc++-33 kshyum -y install libio.i686 glibc.i686 c

CentOS安装Oracle11g(转)

yum -y install compat-libstdc++-33 ksh

yum -y install libio.i686 glibc.i686 compat-libstdc++-33.i686 libaio-devel.i686 libgcc.i686 libstdc++.i686 unixODBC.i686 unixODBC-devel.i686

修改系统参数

step1:vi /etc/sysctl.conf,添加如下参数:

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1073741824
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
保存并使之生效
/sbin/sysctl -p

?

step2: vi /etc/security/limits.conf,添加:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

step3: vi /etc/pam.d/login,添加参数:

session required pam_limits.so

?

step4: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
step4: vi /etc/csh.login:
if( $USER == “oracle” ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif

step5: vi /etc/redhat-release,修改为如下值,成功安装数据库后在修改回来:

Red Hat Enterprise Linux Server release 5.0 (Tikanga)

step6: 添加相关用户及用户组:

groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle
echo “oracle”|passwd –stdin oracle?

step 7: 创建安装路径及修改权限:

mkdir -p /opt/oracle
chown -R oracle:oinstall /opt/oracle
chmod -R 775 /opt/oracle
mkdir -p /opt/oraInventory
chown -R oracle:oinstall /opt/oraInventory
chmod -R 775 /opt/oraInventory

step 8: vi /home/oracle/.bash_profile, 其中ORACLE_SID的值可以自己定,我的设为orcl

TMP=/tmp; export TMP
ORACLE_BASE=/opt/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
umask 022
使环境变量生效:
source ~/.bash_profile

step9:新开命令行窗口切换到root 执行xhost localhost。

step10:添加本机ip和本机主机名的映射

1.执行localhost,获取主机名,如测试服务器的:trs-centos

2.vi /etc/hosts,添加ip和本机主机名映射,如下图:

CentOS装配Oracle11g(转)

5.linux下oracle安装完后,默认是不随机启动的,手动启动方式如下:

?

启动监听程序:lsnrctl start
启动OEM:emctl start dbconsole

热点排行