您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 数据库 > oracle安装(linux)
ai在ubuntu8.04下安装Oracle11g共9步:Step1下载和安装Ubuntu8.04。Step2下载Oracle11g:DownloadOracle11gforLinux(x86,32-bit).现不要急着解压,一会我会告诉你解压在哪的。Step3修改Xserver的默认设置,点菜单的System-Administration-LoginWindow(系统-管理-登录窗口),选择“Security(安全)”选项卡,取消“DenyTCPconnectionstotheXserver(拒绝TCP连接到X服务器)”的勾,重启Xserver(或者重启系统)。然后在终端输入:user@rhsw:~$xhost+127.0.0.1127.0.0.1beingaddedtoaccesscontrollistStep4打开终端,转换为超级用户:(注意,这里用sudosu-而不是sudo-s是有原因的:sudosu-将用户转换为超级用户,并新起一个会话(空的会话),而不是像sudo-s那样将当前会话传递个新的超级用户,减少环境变量可能造成的影响和危害。user@rhsw:~$sudosu-[sudo]passwordforuser:root@rhsw:~#apt-getupdate...root@rhsw:~#apt-getdist-upgrade...root@rhsw:~#rebootStep5用apt安装一些必要的工具:user@rhsw:~$sudosu-[sudo]passwordforuser:安装JDKapt-getinstallsun-java6-jdkapt-getinstallopenssh-serverroot@rhsw:~#apt-getinstalltomcat5.5build-essentiallibaio1gawkkshlibmotif3alienlibtoollsb-rpmsysv-rc-conf...root@rhsw:~#Step6在装完那些工具以后,我们需要做的就是修改一些Ubuntu的/bin/sh的默认连接,千万不要略过这一步,否则安装的时候会出现很多错误。root@rhsw:~#cd/binroot@rhsw:/bin#ls-l/bin/shlrwxrwxrwx1rootroot42008-04-2819:59/bin/sh-dashroot@rhsw:/bin#ln-sfbash/bin/shroot@rhsw:/bin#ls-l/bin/shlrwxrwxrwx1rootroot42008-05-0122:51/bin/sh-bash如果你想知道为什么Ubuntu用bash作为默认的shell,看这个:adetailedexplanationofwhydashisthedefaultsystemshell。Step7增加用户和组,并修改一些配置。这一步很重要!如果不是很有把握,不要随便改。(为了便于解释,增加了行号):01root@rhsw:/bin#cd02root@rhsw:~#pwd/root04root@rhsw:~#addgroupoinstallAddinggroup`oinstall'(GID1001)...Done.07root@rhsw:~#addgroupdbaAddinggroup`dba'(GID1002)...Done.10root@rhsw:~#addgroupnobodyAddinggroup`nobody'(GID1003)...Done.13root@rhsw:~#usermod-gnobodynobody14root@rhsw:~#useradd-goinstall-Gdba-ppassword-d/home/oracle-s/bin/bashoracle17root@rhsw:~#mkdir/home/oracle18root@rhsw:~#chown-Roracle:dba/home/oracle19root@rhsw:~#ln-s/usr/bin/awk/bin/awk20root@rhsw:~#ln-s/usr/bin/rpm/bin/rpm21root@rhsw:~#ln-s/usr/bin/basename/bin/basename22root@rhsw:~#mkdir/etc/rc.d23root@rhsw:~#foriin0123456S;doln-s/etc/rc$i.d/etc/rc.d/rc$i.d;done24root@rhsw:~#mkdir-p/u01/app/oracle25root@rhsw:~#chown-Roracle:dba/u0126root@rhsw:~#Step8修改一些系统默认值。这些修改将会增加系统文件描述符的数量、增加共享内存大小和修改一些网络子系统参数。这些修改是否会对你的系统带来影响我就不得而知了。将下面这些增加到/etc/sysctl.conf文件的末尾:fs.file-max=65535kernel.shmall=2097152kernel.shmmax=2147483648kernel.shmmni=4096kernel.sem=25032000100128net.ipv4.ip_local_port_range=102465535net.core.rmem_default=1048576net.core.rmem_max=1048576net.core.wmem_default=262144net.core.wmem_max=262144再增加下面这些到/etc/security/limits.conf文件末尾:oraclesoftnproc2047oraclehardnproc16383oraclesoftnofile1023oraclehardnofile65535为了强制使用刚才我们增加的东西,我们再增加下面这些到/etc/pam.d/login文件末尾:sessionrequired/lib/security/pam_limits.sosessionrequiredpam_limits.so然后通过命令:sysctl-p让刚才增加的东西生效:root@rhsw:~#sysctl-pkernel.printk=4417kernel.maps_protect=1fs.inotify.max_user_watches=524288vm.mmap_min_addr=65536net.ipv4.conf.default.rp_filter=1net.ipv4.conf.all.rp_filter=1fs.file-max=65535kernel.shmall=2097152kernel.shmmax=2147483648kernel.shmmni=4096kernel.sem=25032000100128net.ipv4.ip_local_port_range=102465535net.core.rmem_default=1048576net.core.rmem_max=1048576net.core.wmem_default=262144net.core.wmem_max=262144root@rhsw:~#Step9现在我们将刚才下载的oracle11g的安装包解压到/home/oracle目录下。然后进入目录,设置DISPLAY参数,开始安装:解压:unziplinux_11gR1_database_1013.zip/*15root@rhsw:~#passwd-loraclePasswordchanged.*/passwdoracle修改密码root@rhsw:~#cd/home/oracleroot@rhsw:/home/oracle#chown-Roracle:dbadatabaseroot@rhsw:/home/oracle#su-oracleYouraccounthasexpired;pleasecontactyoursystemadministratorsu:Useraccounthasexpired(Ignored)oracle@rhsw:~$exportDISPLAY=127.0.0.1:0.0oracle@rhsw:~$pwd/home/oracleoracle@rhsw:~$ls-ltotal4drwxr-xr-x6oracledba40962007-09-1818:50installoracle@rhsw:~$cdinstalloracle@rhsw:~/install$ls-ltotal28drwxr-xr-x11oracledba40962007-08-0616:02docdrwxr-xr-x5oracledba40962007-08-0313:28installdrwxr-xr-x2oracledba40962007-09-1818:52response-rwxr-xr-x1oracledba29112007-08-0313:28runInstallerdrwxr-xr-x14oracledba40962007-08-0313:27stage-rw-r--r--1oracledba48352007-08-0618:19welcome.htmloracle@rhsw:~/install$./runInstaller–ignoreSysPrereqs输入完上面命令后,就进入了Oracle的同一安装程序了(OUI),不要急,继续按照本文一步一步的通过安装:注意:OUI安装完后,并不是真正完全安装完成,还需要就行最后的收尾工作(在最后有),而且这是必须做的工作!点(Next)下一步。修改“SpecifyOperatingSystemgroupname:”为:dba,然后点Next.按照上图设置,点下一步。选择EnterpriseEdition,然后下一步。安图设置,下一步。继续下一步。等待系统检查,不要担心有错误和警告。将检查到的所有非“Succeeded”的都打上勾,下一步。选CreateaDatabase来安装数据库。将所有组都设为:dba,下一步。现在可以点“Install”了:)这个过程会等很久,而且其中系统会变慢,所以你最好拿本书在旁边,喝杯咖啡。有时候系统会变得很慢,像是要死机了,这个不要管,等他慢慢装。到了这一步不要记着点“OK”,需要做下面操作:(另起一个终端,用sudosu-转为超级用户)root@rhsw:~#/u01/app/oraInventory/orainstRoot.shChangingpermissionsof/u01/app/oraInventoryto770.Changinggroupnameof/u01/app/oraInventorytodba.Theexecutionofthescriptiscompleteroot@rhsw:~#/u01/app/oracle/product/11.1.0/db_1/root.shRunningOracle11groot.shscript...Thefollowingenvironmentvariablesaresetas:ORACLE_OWNER=oracleORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1Enterthefullpathnameofthelocalbindirectory:[/usr/local/bin]:Copyingdbhometo/usr/local/bin...Copyingoraenvto/usr/local/bin...Copyingcoraenvto/usr/local/bin...Creating/etc/oratabfile...Entrieswillbeaddedtothe/etc/oratabfileasneededbyDatabaseConfigurationAssist
本文标题:oracle安装(linux)
链接地址:https://www.777doc.com/doc-11735 .html