oracle的本地安装和PUTTY+XMING远程连接安装和oracle翻页功能
生活随笔
收集整理的這篇文章主要介紹了
oracle的本地安装和PUTTY+XMING远程连接安装和oracle翻页功能
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
因為我也是一個初學者,所以可能有出錯的地方,如果有希望大家告訴我QQ:7343696.大家公共學習,進步。 Oracle的安裝 實驗的環(huán)境是vmware?server?1.06??rehl?5.2最小安裝。 oracle安裝的要求。 1?建議的內存1G(10g)???9i中是512M???8i中要求是256M 2?空間?安裝要1.5GB???如果要數(shù)據(jù)庫??這個根據(jù)自己的需要?模版庫是1.7GB 3?/tmp?分區(qū)要大于>=400MB 4?linux??--->oracle可以讀/etc/redhat-release這個文件。????如果其他的linux建立這個文件就可以了 5?建立oracle相關的用戶和組?oinstall??dba??oper(可以建,可以不建) 建立一個用戶oracle????-g??oinstall?-G??dba,oper組 建立使用/bin/ksh??但是大家都用的/bin/bash,但是用那個沒有關系。 6?oracle產品的安裝路徑??權限?環(huán)境變量的定義 oracle??--->$ORACLE_BASE????$ORACLE_HOME???$PATH???$ORACLE_SID(這個是可選,oracle事列) [root@huang11?~]#?unzip?/mnt/yuanwenjian/10201_database_linux32.zip?-d?/usr/src [root@huang11?~]#?groupadd?-g?110?oinstall [root@huang11?~]#?groupadd?-g?111?dba [root@huang11?~]#?useradd?-g?110?-G?-u?110111?-d?/sof/oracle?oracle [root@huang11?~]#?passwd?oracle Changing?password?for?user?oracle. New?UNIX?password: BAD?PASSWORD:?it?is?based?on?a?dictionary?word Retype?new?UNIX?password: passwd:?all?authentication?tokens?updated?successfully. [root@huang11?~]#?tail?-6?/etc/sysctl.conf??添加下面的幾行。 kernel.sem?=?250????????32000???100?????128 net.ipv4.ip_local_port_range?=?1024?????65000 net.core.rmem_default?=?262144 net.core.rmem_max?=?262144 net.core.wmem_max?=?262144 net.core.wmem_default?=?262144 [root@huang11?~]#?sysctl?-p 本試驗oracle的安裝的家目錄是/sof/oracle。 [root@huang11?~]#?su?-?oracle [oracle@huang11?~]$?vim?.bash_profile [oracle@huang11?~]$?more?.bash_profile #?.bash_profile #?Get?the?aliases?and?functions if?[?-f?~/.bashrc?];?then ????????.?~/.bashrc fi #?User?specific?environment?and?startup?programs export?ORACLE_BASE=/sof/oracle export?ORACLE_HOME=/sof/oracle/10g export?ORACLE_SID=orcl PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin export?PATH [oracle@huang11?~]$?source?~/.bash_profile [oracle@huang11?~]$?cd?/usr/src/database/ [oracle@huang11?database]$?ls doc??install??response??runInstaller??stage??welcome.html ava.lang.UnsatisfiedLinkError:?/tmp/OraInstall2009-12-22_09-58-18AM/jre/1.4.2/lib/i386/libawt.so:?libXp.so.6:?cannot?open?shared?object?file:?No?such?file?or?directory ????????at?java.lang.ClassLoader$NativeLibrary.load(Native?Method) ????????at?java.lang.ClassLoader.loadLibrary0(Unknown?Source) ????????at?java.lang.ClassLoader.loadLibrary(Unknown?Source) ????????at?java.lang.Runtime.loadLibrary0(Unknown?Source) ????????at?java.lang.System.loadLibrary(Unknown?Source) ????????at?sun.security.action.LoadLibraryAction.run(Unknown?Source) ????????at?java.security.AccessController.doPrivileged(Native?Method) ????????at?sun.awt.NativeLibLoader.loadLibraries(Unknown?Source) ????????at?sun.awt.DebugHelper.<clinit>(Unknown?Source) ????????at?java.awt.Component.<clinit>(Unknown?Source) 上面原因是因為我們沒有安裝libXp這個軟件包的原因。 [root@huang11?~]#?yum?install?libXp [oracle@huang11?database]$?./runInstaller 我們在root用戶下面執(zhí)行剛才提示的那個兩個命令就可以了。 [root@huang11?~]#?/sof/oracle/10g/root.sh Running?Oracle10?root.sh?script... The?following?environment?variables?are?set?as: ????ORACLE_OWNER=?oracle ????ORACLE_HOME=??/sof/oracle/10g Enter?the?full?pathname?of?the?local?bin?directory:?[/usr/local/bin]: ???Copying?dbhome?to?/usr/local/bin?... ???Copying?oraenv?to?/usr/local/bin?... ???Copying?coraenv?to?/usr/local/bin?... Creating?/etc/oratab?file... Entries?will?be?added?to?the?/etc/oratab?file?as?needed?by Database?Configuration?Assistant?when?a?database?is?created Finished?running?generic?part?of?root.sh?script. Now?product-specific?root?actions?will?be?performed. 上面就成功的安裝好了oracle. 如果是在win在下面ssh連接linux安裝oracle的時候就要注意了。 我們這里使用的是putty和xming這個兩個軟件。 并且記得要用oracle用戶登陸哦。不要用root用戶登陸再來su?-?oracle,這樣是不能安裝成功的。 [root@huang12?~]#?groupadd?-g?110?oinstall [root@huang12?~]#?groupadd?-g?111?dba [root@huang12?~]#?useradd?-g?110?-G?111?-u?110?-d?/oracle?oracle [root@huang12?~]#?passwd?oracle Changing?password?for?user?oracle. New?UNIX?password: BAD?PASSWORD:?it?is?based?on?a?dictionary?word Retype?new?UNIX?password: passwd:?all?authentication?tokens?updated?successfully. [root@huang12?~]#?rpm?-ivh?/iso/Server/libXp-1.0.0-8.1.el5.i386.rpm Preparing...????????????????###########################################?[100%] ???1:libXp??????????????????###########################################?[100%] 下面就是修改內核參數(shù)。 [root@huang12?~]#?sysctl?-a|grep?sem kernel.sem?=?250????????32000???32??????128 [root@huang12?~]#?sysctl?-a|grep?sem|sed?'s/32/100/2' kernel.sem?=?250????????32000???100?????128 [root@huang12?~]#?sysctl?-a|grep?sem|sed?'s/32/100/2'>>/etc/sysctl.conf [root@huang12?~]#?sysctl?-a|grep?file-m fs.file-max?=?42166 [root@huang12?~]#?sysctl?-a|grep?file-m|sed?'s/42166/65535/' fs.file-max?=?65535 [root@huang12?~]#?sysctl?-a|grep?file-m|sed?'s/42166/65535/'>>/etc/sysctl.conf [root@huang12?~]#?sysctl?-a|grep?ip_l net.ipv4.ip_local_port_range?=?32768????61000 [root@huang12?~]#?sysctl?-a|grep?ip_l|sed?-e?'s/32768/1024/'?-e?'s/61000/65535/' net.ipv4.ip_local_port_range?=?1024?????65535 [root@huang12?~]#?sysctl?-a|grep?ip_l|sed?-e?'s/32768/1024/'?-e?'s/61000/65535/'>>/etc/sysctl.conf [root@huang12?~]#?sysctl?-a|grep?wmem_ma net.core.wmem_max?=?109568 [root@huang12?~]#?sysctl?-a|grep?wmem_ma|sed?'s/109568/262144/' net.core.wmem_max?=?262144 [root@huang12?~]#?sysctl?-a|grep?wmem_ma|sed?'s/109568/262144/'>>/etc/sysctl.conf [root@huang12?~]#?sysctl?-a|grep?wmem_defa net.core.wmem_default?=?109568 [root@huang12?~]#?sysctl?-a|grep?wmem_defa|sed?'s/109568/262144/' net.core.wmem_default?=?262144 [root@huang12?~]#?sysctl?-a|grep?wmem_defa|sed?'s/109568/262144/'>>/etc/sysctl.conf [root@huang12?~]#?sysctl?-a|grep?rmem_defa|sed?'s/109568/262144/'>>/etc/sysctl.conf [root@huang12?~]#?sysctl?-a|grep?rmem_ma|sed?'s/109568/262144/'>>/etc/sysctl.conf [root@huang12?~]#?tail?-7?/etc/sysctl.conf kernel.sem?=?250????????32000???100?????128 fs.file-max?=?65535 net.ipv4.ip_local_port_range?=?1024?????65535 net.core.wmem_max?=?262144 net.core.wmem_default?=?262144 net.core.rmem_default?=?262144 net.core.rmem_max?=?262144 [root@huang12?~]#?sysctl?-p net.ipv4.ip_forward?=?0 net.ipv4.conf.default.rp_filter?=?1 net.ipv4.conf.default.accept_source_route?=?0 kernel.sysrq?=?0 kernel.core_uses_pid?=?1 net.ipv4.tcp_syncookies?=?1 kernel.msgmnb?=?65536 kernel.msgmax?=?65536 kernel.shmmax?=?4294967295 kernel.shmall?=?268435456 kernel.sem?=?250????????32000???100?????128 fs.file-max?=?65535 net.ipv4.ip_local_port_range?=?1024?????65535 net.core.wmem_max?=?262144 net.core.wmem_default?=?262144 net.core.rmem_default?=?262144 net.core.rmem_max?=?262144 [root@huang12?~]#?unzip?/mnt/yuanwenjian/10201_database_linux32.zip?-d?/usr/src [root@huang12?~]#?su?-?oracle [oracle@huang12?~]$?more?.bash_profile #?.bash_profile #?Get?the?aliases?and?functions if?[?-f?~/.bashrc?];?then ????????.?~/.bashrc fi #?User?specific?environment?and?startup?programs export?ORACLE_BASE=/oracle export?ORACLE_HOME=/oracle/10g export?ORACLE_SID=orcl PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin export?PATH 現(xiàn)在我們用oracle來遠程登陸linux 啟動xming就可以了, 配置putty 點open [oracle@huang12?~]$?cd?/usr/src/database/ [oracle@huang12?database]$?./runInstaller???就出現(xiàn)下面圖片。 下面的步驟就跟上面一樣啊。 執(zhí)行腳本后點OK就可以了。 上面就是oracle的安裝 下面就是讓oracle支持翻頁的功能。 我們要安裝下面三個軟件 [root@huang11?~]#?ls?/mnt/yuanwenjian/IO-Tty-1.08.tar.gz? /mnt/yuanwenjian/IO-Tty-1.08.tar.gz [root@huang11?~]#?ls?/mnt/yuanwenjian/Term-ReadLine-Gnu-1.19.tar.gz? /mnt/yuanwenjian/Term-ReadLine-Gnu-1.19.tar.gz [root@huang11?~]#?ls?/mnt/yuanwenjian/uniread-1.01.tar.gz? /mnt/yuanwenjian/uniread-1.01.tar.gz 前兩個的下載地址在http://search.cpan.org后一個下載地址在www.sf.net [root@huang11?~]#?tar?zxvf?/mnt/yuanwenjian/uniread-1.01.tar.gz??-C?/usr/src uniread-1.01/ uniread-1.01/CHANGES uniread-1.01/COPYING uniread-1.01/Makefile.PL uniread-1.01/MANIFEST uniread-1.01/README uniread-1.01/uniread [root@huang11?~]#?cd?/usr/src/uniread-1.01/ [root@huang11?uniread-1.01]#?perl?Makefile.PL? Detecting?Term::ReadLine?implementation... Found?Term::ReadLine::Stub.?uniread?requires?Term::ReadLine::Gnu. Checking?if?your?kit?is?complete... Looks?good Warning:?prerequisite?IO::Tty?1.02?not?found. Warning:?prerequisite?Term::ReadLine::Gnu?1.14?not?found. Writing?Makefile?for?uniread [root@huang11?uniread-1.01]#?make cp?uniread?blib/script/uniread /usr/bin/perl?"-MExtUtils::MY"?-e?"MY->fixin(shift)"?blib/script/uniread Manifying?blib/man1/uniread.1 [root@huang11?uniread-1.01]#?make?install Installing?/usr/share/man/man1/uniread.1 Installing?/usr/bin/uniread Writing?/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/uniread/.packlist Appending?installation?info?to?/usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod 其它兩個的方法是一樣的安裝。 安裝我們修改oracle的環(huán)境變量 [oracle@huang11?~]$?more?~/.bash_profile #?.bash_profile #?Get?the?aliases?and?functions if?[?-f?~/.bashrc?];?then ????????.?~/.bashrc fi #?User?specific?environment?and?startup?programs export?ORACLE_BASE=/sof/oracle export?ORACLE_HOME=/sof/oracle/10g export?ORACLE_SID=orcl alias??sqlplus="uniread?sqlplus" PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin export?PATH [oracle@huang11?~]$?source?.bash_profile 下面就說明了可以翻頁了。 [oracle@huang11?~]$?sqlplus?"/as?sysdba" [uniread]?Loaded?history?(0?lines) SQL*Plus:?Release?10.2.0.1.0?-?Production?on?Thu?Dec?24?18:35:20?2009 Copyright?(c)?1982,?2005,?Oracle.??All?rights?reserved. Connected?to: Oracle?Database?10g?Enterprise?Edition?Release?10.2.0.1.0?-?Production With?the?Partitioning,?OLAP?and?Data?Mining?options SQL>?conn?scott/oracle; Connected. SQL>?select?*?from?tab; TNAME??????????????????????????TABTYPE??CLUSTERID ------------------------------?-------?---------- DEPT???????????????????????????TABLE EMP????????????????????????????TABLE BONUS??????????????????????????TABLE SALGRADE???????????????????????TABLE SQL>?select?*?from?tab;
? 本文轉自7343696 51CTO博客,原文鏈接:http://blog.51cto.com/luoping/249392,如需轉載請自行聯(lián)系原作者
? 本文轉自7343696 51CTO博客,原文鏈接:http://blog.51cto.com/luoping/249392,如需轉載請自行聯(lián)系原作者
總結
以上是生活随笔為你收集整理的oracle的本地安装和PUTTY+XMING远程连接安装和oracle翻页功能的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 避免活跃性危险(第十章)
- 下一篇: 清北·NOIP2017济南考前冲刺班 D