oracle的本地安装和PUTTY+XMING远程连接安装和oracle翻页功能

简介:
因为我也是一个初学者,所以可能有出错的地方,如果有希望大家告诉我QQ:7343696.大家公共学习,进步。
 
Oracle的安装
实验的环境是vmware server 1.06  rehl 5.2最小安装。
oracle安装的要求。
1   建议的内存1G10g)   9i中是512M   8i中要求是256M
2   空间 安装要1.5GB   如果要数据库  这个根据自己的需要 模版库是1.7GB
3   /tmp 分区要大于>=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产品的安装路径  权限 环境变量的定义
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用户下面执行刚才提示的那个两个命令就可以了。
[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的时候就要注意了。
我们这里使用的是puttyxming这个两个软件。
并且记得要用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%]
下面就是修改内核参数。
[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
现在我们用oracle来远程登陆linux
启动xming就可以了,
配置putty
open
[oracle@huang12 ~]$ cd /usr/src/database/
[oracle@huang12 database]$ ./runInstaller   就出现下面图片。
下面的步骤就跟上面一样啊。
执行脚本后点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的环境变量
[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 ,如需转载请自行联系原作者
相关文章
|
4月前
|
SQL Oracle 关系型数据库
Win10下安装Oracle 18c
Win10下安装Oracle 18c
|
5月前
|
SQL Oracle 关系型数据库
本机不安装Oracle客户端,使用PL/SQL Developer连接远程数据库
本机不安装Oracle客户端,使用PL/SQL Developer连接远程数据库
135 0
|
7月前
|
Oracle 关系型数据库 Java
云服务器安装oracle修改IP地址监听器报错问题
当在云服务器中安装oracle时,按照一般的安装步骤安装后,需要修改两个文件的iIP地址才可以在本机进行访问,修改注意点: 监听器部分不要改成服务器的公网IP,要改成服务器的计算机名字才可以,两个配置文件夹均要修改
70 0
|
7月前
|
Oracle 关系型数据库 数据库
contOS7下安装Oracle11g数据库(二)
contOS7下安装Oracle11g数据库(二)
119 0
|
1月前
|
Oracle 关系型数据库 数据库
如何利用 Docker 安装 Oracle 数据库
【2月更文挑战第14天】
90 0
|
4月前
|
Oracle 关系型数据库 数据库
docker下安装oracle11g(一次安装成功)
docker下安装oracle11g(一次安装成功)
85 0
|
5月前
|
Oracle 关系型数据库 数据安全/隐私保护
docker 下安装oracle
docker 下安装oracle
101 0
|
1月前
|
存储 Oracle 关系型数据库
手把手教你安装Oracle——以oracle 11g为例
手把手教你安装Oracle——以oracle 11g为例
手把手教你安装Oracle——以oracle 11g为例
|
6月前
|
Oracle 关系型数据库 数据库
Win11系统如何安装Oracle数据库(超级详细)
Win11系统如何安装Oracle数据库(超级详细)
208 0
|
2月前
|
Oracle 关系型数据库 数据安全/隐私保护
Docker安装oracle11g
Docker安装oracle11g步骤