一、安装CentOS7此处选择安装了KDE桌面centos7搭建文档.docx1.配置防火墙方法1:关闭防火墙(不推荐,不安全),从centos7开启关闭服务的方式和以往不同Systemctldisablefirewalld.service#关闭开机启动防火墙Systemctlstopfirewalld.service#关闭防火墙方法2:配置防火墙vi/etc/sysconfig/iptables#编辑防火墙配置文件,添加以下内容-ARH-Firewall-1-INPUT-mstate–stateNEW-mtcp-ptcp–dport1521-jACCEPT/etc/init.d/iptablesrestart#重启防火墙使配置生效2.关闭selinuxVim/etc/seliunx/configSELINUX=disable#修改为disable二、系统配置1.IP配置/2.hosts配置vi/etc/hosts3.网络配置NETWORKING=yesNETWORKING_IPV6=noHOSTNAME=healthmanager重启网卡servicenetworkrestart4.内核配置根据自身配置选择合适的内核参数,然后执行sysctl–p命令使配置生效,配置参数不要加入中文,容易报错!4G:net.ipv4.icmp_echo_ignore_broadcasts=1net.ipv4.conf.all.rp_filter=1fs.file-max=6815744#设置最大打开文件数fs.aio-max-nr=1048576kernel.shmall=1048576#共享内存的总量,8G内存设置:2097152*4k/1024/1024kernel.shmmax=2147483648#最大共享内存的段大小kernel.shmmni=4096#整个系统共享内存端的最大数kernel.sem=25032000100128net.ipv4.ip_local_port_range=900065500#可使用的IPv4端口范围net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=10485768G:net.ipv4.icmp_echo_ignore_broadcasts=1net.ipv4.conf.all.rp_filter=1fs.file-max=6815744#设置最大打开文件数fs.aio-max-nr=1048576kernel.shmall=2097152#共享内存的总量,8G内存设置:2097152*4k/1024/1024kernel.shmmax=4294967296#最大共享内存的段大小kernel.shmmni=4096#整个系统共享内存端的最大数kernel.sem=25032000100128net.ipv4.ip_local_port_range=900065500#可使用的IPv4端口范围net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=104857616G:net.ipv4.icmp_echo_ignore_broadcasts=1net.ipv4.conf.all.rp_filter=1fs.file-max=6815744#设置最大打开文件数fs.aio-max-nr=1048576kernel.shmall=4194304#共享内存的总量,8G内存设置:2097152*4k/1024/1024kernel.shmmax=8564768768#最大共享内存的段大小kernel.shmmni=4096#整个系统共享内存端的最大数kernel.sem=25032000100128net.ipv4.ip_local_port_range=900065500#可使用的IPv4端口范围net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=10485765.登陆认证vi/etc/pam.d/loginsessionrequired/lib/security/pam_limits.so6.进程会话配置vi/etc/security/limits.conforaclesoftnproc2047oraclehardnproc16384oraclesoftnofile1024oraclehardnofile655367.修改版本vi/etc/centos-releaseRedHatEnterpriseLinux68.可选参数(没找到)vi/etc/profile找到ulimit–S–c0/dev/null2&1改成ulimit-S-cunlimited/dev/null2&1在/etc/profile文件中添加下列内容(未添加)if[$USER=oracle];thenif[$SHELL=/bin/ksh];thenulimit-p16384ulimit-n65536elseulimit-u16384-n65536fifi三、数据库配置1.用户配置[root@localhost~]#groupadddba[root@localhost~]#groupaddoinstall[root@localhost~]#useraddoracle-goinstall-Gdba[root@localhost~]#passwdoracle2.路径配置mkdir-p/u01/app/oraclecp/etc/skel/.bash_profile/u01/app/oraclecp/etc/skel/.bashrc/u01/app/oraclecp/etc/skel/.bash_logout/u01/app/oraclemkdir-p/u01/app/oracle/product/11.2.0/db_1chown-Roracle:oinstall/u01chmod755-R/u013.环境变量配置切换到oracle用户下su–oraclevi.bash_profileexportORACLE_BASE=/u01/app/oracleexportORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1exportORACLE_SID=perfappexportLD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATHPATH=$PATH:$HOME/bin:$ORACLE_HOME/binexportTNS_ADMIN=$ORACLE_HOME/network/adminexportNLS_LANG=AMERICAN_AMERICA.ZHS16GBKexportORACLE_UNQNAME=$ORACLE_SIDsource.bash_profileenv|greporac4.安装包检查请浏览下面网页,根据下面各系统版本查看本系统安装ORACLE所需要的包检查命令格式:rpm-qa|grep名字以下包需检查:binutils-2.23.52.0.1-55.el7.x86_64compat-libcap1.x86_640:1.10-7.el7gcc-c++-4.8.5-4.el7.x86_64gcc-4.8.5-4.el7.x86_64glibc-2.17-105.el7.x86_64glibc-devel-2.17-105.el7.x86_64ksh-20120801-22.el7_1.2.x86_64libaio-0.3.109-13.el7.x86_64libaio-devel-0.3.109-13.el7.x86_64libgcc-4.8.5-4.el7.x86_64libstdc++-4.8.5-4.el7.x86_64libstdc++-devel-4.8.5-4.el7.x86_64libXi-1.7.4-2.el7.x86_64libXtst-1.2.2-2.1.el7.x86_64make-3.82-21.el7.x86_64sysstat-10.1.5-7.el7.x86_64用yum安装完yuminstallgcc*-yyuminstallglibc*-yyuminstallksh*-yyuminstalllibaio-*-yyuminstallelfutils-libelf*-yyuminstallcompat-libcap*-y5.安装包上传及解压mvoracle_112040_Linux-x86-64_*/u01/appunziporacle_112040_Linux-x86-64_1of7.zipunziporacle_112040_Linux-x86-64_2of7.zipchown–Roracle:oinstalldatabase/6.VNC配置CentOS7-VNC安装文档.docx7.安装cd/u01/app/database./runInstaller打开ins_emagent.mk文件,找到$(MK_EMAGENT_NMECTL)改成$(MK_EMAGENT_NMECTL)-lnnz11,点击重试8.改回/etc/centos_release四、常见问题:1.主机名不要加特殊字符比如下划线等,否则在安装过程中会提示主机名不符合规范2.RHEL7装Oracle11g问题出现agentnmhs解决办法打开ins_emagent.mk文件,找到$(MK_EMAGENT_NMECTL)改成$(MK_EMAGENT_NMECTL)-lnnz113.跳过未配置exportORACLE_UNQNAME=$ORACLE_SID4.交换空间不够用root用户登陆添加,命令如下:#ddif=/dev/zeroof=/home/swapbs=1024count=1600000(1.6G)#mkswap/home/swap#swapon/home/swap关闭#swapoff/home/swap五、参数详解oracle参数详解及其他.docx