时间:2021-07-01 10:21:17 帮助过:22人阅读
本文将为您介绍如何在Fedora17 64bit系统上安装OracleDatabase 11g Release 2 64bit数据库,本文假设您已经安装了Fedora17 64bit
本文将为您介绍如何在Fedora17 64bit系统上安装OracleDatabase 11g Release 2 64bit数据库,本文假设您已经安装了Fedora17 64bit操作系统,交换分区为2G,Linux安全已经禁止,并安装了以下软件组:
按以下步聚安装:
1. 下载数据库软件压缩包:
· OracleDatabase 11g Release 2 (11.2) Software
解压压缩包:
unziplinux.x64_11gR2_database_1of2.zip
unziplinux.x64_11gR2_database_2of2.zip
两个压缩包会解压到同一个目录:database
2. 修改Hosts文件
打开/etc/hosts文件,加入服务器名称,如下:
例如:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4192.168.0.191 fedora17.localdomain fedora17
3. 设置内核参数:
Oracle推荐最低参数设置如下:
fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586可通过如下命令查看当前系统内核参数:
/sbin/sysctl -a | grep
打开”/etc/sysctl.conf”配置文件,增加或修改已有内核参数,详细如下:
fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048586如果您不想重启系统,可通过下面命令修改当前系统内核参数:
/sbin/sysctl –p
增加如下信息到”etc/security/limits.conf”文件
oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536如果在“/etc/pam.d/login”文件中不存在下面设置,,需增加。
session required pam_limits.so禁止linux安全需修改”/etc/selinux/config”文件,修改如下:
SELINUX=disabled.
如果在安装之后修改Linux安全,需要重启系统,建议在安装之前修改。
4. 配置
安装如下包:
#yum install binutils#yum install compat-libstdc++-33yum install compat-libstdc++-33.i686#yum install elfutils-libelfyum install elfutils-libelf-devel#yum install gcc#yum install gcc-c++#yum install glibc#yum install glibc.i686#yum install glibc-common#yum install glibc-devel#yum install glibc-headersyum install glibc-devel.i686yum install kshyum install libaioyum install libaio.i686yum install libaio-develyum install libaio-devel.i686#yum install libgcc#yum install libgcc.i686#yum install libstdc++yum install libstdc++.i686#yum install libstdc++-devel#yum install make#yum install numactlyum install numactl-develyum install sysstatyum install unixODBCyum install unixODBC.i686yum install unixODBC-develyum install unixODBC-devel.i686
创建新的用户组和用户,以供数据库安装。
groupadd oinstallgroupadd dbagroupadd opergroupadd asmadmin #此用户将不会用到 useradd -g oinstall -G dba,oper,asmadmin oraclepasswd oracle
根据情况创建安装目录:
mkdir -p /u01/app/oracle/product/11.2.0/db_1chown -R oracle:oinstall /u01chmod -R 775 /u01
用root登录,并执行下面命令:
xhost +
修改系统发行信息,Oracle只识别一些商业linux系统,以下改为RedHat5, 修改”/etc/redhat-release”文件,并替换”Fedora17…”等信息为:
redhat release 5使用oracle用户登录,并在.bash_profile中增加如下:
# Oracle SettingsTMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=fedora17.localdomain; export ORACLE_HOSTNAMEORACLE_UNQNAME=DB11G; export ORACLE_UNQNAMEORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOMEORACLE_SID=DB11G; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$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 fifi