oracle单机环境配置

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

linuxoracle11g安装单机版1.安装前准备1.1安装linux操作系统1.2挂在光驱#mkdir/cwy/cdrom#mount/dev/cdrom/cwy/cdrom(将光驱挂载到/cwy/cdrom文件下)1.3下载oracle软件包官网下载相应的oracle软件包。在安装之前确认好oracle是多少位数据库,否则安装的时候会出现错误:提示系统包没有安装上。注:linux6以上YUM需要付费,可使用rpm-ivh--nodeps装包.解压:unzip包rpm-ivh软件包_name--nodeps忽略依赖关系安装2.软件检查:2.1检查安装oracle所依赖的组件包是否安装上:#rpm–qa|grep软件包名称//检查软件包是否安装上1.binutils-2.17.50.0.62.compat-libstdc++-33-3.2.33.elfutils-libelf-0.1254.elfutils-libelf-devel-0.1255.elfutils-libelf-devel-static-0.1256.gcc-4.1.27.gcc-c++-4.1.28.glibc-2.5-249.glibc-common-2.510.glibc-devel-2.511.glibc-headers-2.512.kernel-headers-2.6.1813.pdksh-5.2.1414.libaio-0.3.10615.libaio-devel-0.3.10616.libgcc-4.1.217.libgomp-4.1.218.libstdc++-4.1.219.libstdc++-devel-4.1.220.make-3.8121.numactl-devel-0.9.8.i38622.sysstat-7.0.223.unixODBC-2.2.1124.unixODBC-devel-2.2.112.2安装缺少的软件包:#cd/cwy/cdrom#rpm–ivh软件包名称//使用本地光盘镜像安装软件包#yuminstall软件包名称//使用yum联网安装3.配置系统环境3.1修改内核参数:#vi/etc/sysctl.conffs.file-max=6815744fs.aio-max-nr=1048576net.ipv4.ip_local_port_range=900065500net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048576kernel.sem=25032000100128kernel.shmall=2097152(可以按照系统默认,不修改)kernel.shmmax=536870912(可以按照系统默认,不修改)#sysctl–p//让内核参数生效3.2修改进程数和最大会话数#vi/etc/security/limits.conforaclesoftnproc2047oraclehardnproc16384oraclesoftnofile1024oraclehardnofile655363.3关联设置#vi/etc/pam.d/loginsessionrequiredpam_limits.sosessionrequired/lib/security/pam_limits.so3.4修改/etc/profile#vi/etc/profile(在最后添加)if[$USER=oracle];thenif[$SHELL=/bin/ksh];thenulimit-p16384ulimit-n65536elseulimit-u16384-n65536fifi4.创建安装用户、组和目录4.1创建安装用户和组#groupaddoinstall//创建oinstall组#groupadddba//创建dba组#useradd-goinstall-Gdbaoracle//新建用户oracle,设定其主组为oinstall,副组为dba#idoracle//检查结果#passwdoracle//设置oracle用户密码4.2创建软件安装目录#mkdir-p/oracle_11g/app/oracle//创建安装根目录(mkdir-p/oracle/app/oracle11g)#chown-Roracle:oinstall/oracle_11g/app/oracle//安装根目录所属用户和组为oracle用户和oinstall组(#chown-Roracle:oinstall/oracle/app/oracle11g)#chmod-R755/oracle_11g/app/oracle//修改目录的访问权限为所属用户完全控制,所属组和其他用户可读和执行(#chmod-R755/oracle/app/oracle11g)#mkdir-p/oracle_11g/app/oracle/oradata(mkdir-p/oracle/app/oracle11g/oradata)#chown-Roracle:oinstall/oracle_11g/app/oracle/oradata(chown-Roracle:oinstall/oracle/app/oracle11g/oradata)#chmod-R755/oracle_11g/app/oracle/oradata(chmod-R755/oracle/app/oracle11g/oradata)#mkdir-p/oracle_11g/app/oraInventory(mkdir-p/oracle/app/oraInventory)#chown-Roracle:oinstall/oracle_11g/app/oraInventory(chown-Roracle:oinstall/oracle/app/oraInventory)#chmod-R755/oracle_11g/app/oraInventory(chmod-R755/oracle/app/oraInventory)设置ORACLE_HOME目录:#mkdir-p/oracle_11g/oracle/product/11.2.0/dbhome_1(mkdir-p/oracle/app/oracle11g/product/11.2.0/dbhome_1)#chown-Roracle:oinstall/oracle_11g/app/oracle/product/11.2.0/dbhome_1(chown-Roracle:oinstall/oracle/app/oracle11g/product/11.2.0/dbhome_1)#chmod-R755/oracle_11g/app/oracle/product/11.2.0/dbhome_1(chmod-R755/oracle/app/oracle11g/product/11.2.0/dbhome_1)4.3设置用户环境变量$vi/home/oracle/.bash_profileORACLE_BASE=/oracle_11g/app/oracleORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1ORACLE_SID=oadb02LD_LIBRARY_PATH=$ORACLE_HOME/libPATH=$PATH:$ORACLE_HOME/bin:$HOME/binexportORACLE_BASEORACLE_HOMEORACLE_SIDLD_LIBRARY_PATHPATH$source/home/oracle/.bash_profile//加载文件使配置生效#env|more//查看配置的环境变量是否正确开始安装:xmanager软件登录:(xmanager需要配置#vi/etc/inittab编辑内容:#x:5:respawn:/etc/X11/prefdm–nodaemonx:5:respawn:/usr/sbin/gdm#vi/usr/share/gdm/defaults.conf编辑内容[security]AllowRoot=trueAllowRemoteRoot=true[xdmcp]Enable=trueDisplaysPerHost=10Port=177#gdm-restart#netstat-nltpu|grep177)#chmod-R755/u01/app/oracle/5.解压oracle软件包5.1软件包解压方式linux常用的压缩命令有gzip和zip两种格式,zip压缩的后缀文件名是*.zip;而gzip压缩后的文件是*.gz。相应的解压命令则是gunzip和unzip#gunzip软件包.gz#unzip软件包.zip5.2安装oracle#su-oracle$cd/cwy/app/datadase(进入到oracle软件解压目录)$exportLANG=C$./runInstalleroraclePassw0rd

1 / 18
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功