--silent linux
2016-12-06 10:22:34 jiangnan8710 阅读数 171
前言:当远程连接的linux服务器未安装vnc服务时,无法打开图形界面,为了解决这种问题,我们可以采用silent mode来进行安装。

安装前准备

  1、创建oracle用户组和weblogic用户

    命令:groupadd oralce //创建oracle用户组

       useradd -g oracle weblogic  //创建weblogic用户并加入到oracle用户组

  2、修改weblogic用户密码

    命令:passwd weblogic

 

  3、创建初始化文件(invPtrLoc) 和响应文件 (response),文件的存放路径自定义

    本人的文件存放路径

    

    3.1、创建初始化文件 oraInst.loc

      注:(该文件用于配置oracle软件的产品清单和安装用的组名,第一次安装oracle软件时需要创建该文件,非第一次安装只需要找到该文件加入对应的软件清单和对应的用户组)

      命令:vi oraInst.loc

      文件加入内容:

       #oracle product inventory

       inventory_loc=/home/weblogic/oraInventory1  

       #oracle product install group  

       inst_group=oracle

    

    3.2、创建响应文件 (wls.rsp)

      命令:vi wls.rsp

      文件加入内容:

      [ENGINE]

      #DO NOT CHANGE THIS.

      Response File Version=1.0.0.0.0  //此处固定写法 不做改动

      [GENERIC]

      #weblogic install path

      ORACLE_HOME=/home/weblogic/Oracle/Middleware     //根据自己想要安装的路径进行修改,安装用户必须要具有该安装目录的写权限,否则会报错无法创建安装目录

      #Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples.

      INSTALL_TYPE=WebLogic Server    //配置需要安装weblogic的服务,此处选择最基本的服务,可以根据自己的需要进行修改

 

  4、执行安装命令:

    命令:java -jar [软件安装包] -silent -response [响应文件路径] -invPtrLoc [初始化文件路径]

    示例:java -jar wls1036_generic.jar -silent -response /usr/weblogicFile/wls.rsp -invPtrLoc /usr/weblogicFile/oraInst.loc

 

  5、等待安装完成。

 

      

2018-11-28 12:39:36 physuleo 阅读数 122

最近因为开发的需要,需要在Linux服务器上安装Matlab,但因为服务器上并没有交互界面,所以只好采用静默安装的方式(-mode silent)。

一开始也是全无头脑,在看了很多安装方法之后,总结出以下几点供各位同学参考。

1.linux中,加载iso文件时:mount -t auto R2015b_glnxa64.iso ./Matlab  (注意Matlab前是 ./ ,斜杠前的点不要忘了)

加载出来的文件是只读的,不可以写,也就是不可以修改。详情见下图:

注意后面的:mouting read-only  看到有些方法中说可以修改activate.ini 来进行安装,这方法行不通。命令行输入:ls -l

可见:

也证明,此文件根本不可以修改

2.安装

到解压的Matlab文件夹里 输入:./install

出现:

因为无法打开交互界面,所以我们选择静默安装。

在搜索了好多方法之后,找到的靠谱方法如下

https://www.jianshu.com/p/322966f324fe 在无界面的centos 7.3安装matlab 2015b 附下载连接

感谢这位同学的分享和讲解,真是太棒了!具体可以参看他的操作过程。

我的输入命令是:./install -fileInstallationKey 09806-07443-53955-64350-21751-41297 -agreeToLicense yes -mode silent -activationPropertiesFile /home/lhy/Crack/2015b/license_standalone.lic

这个命令解释如下: sudo(如果是root,就不用sudo了) ./install -destinationFolder 安装位置(这个安装位置可以自己指定,也可以不填,则安装到默认位置/usr/local/MATLAB/R2015b) -fileInstallationKey 秘钥(如果版本一样可以使用我的这个,如果不一样看看你破解文件中的readme.txt) -agreeToLicense yes -mode silent -activationPropertiesFile (破解文件中license_standalone.lic的位置)

按照这样设定就可以了。

然后开始安装,显示如下:

安装成功后显示:

然后就是按照 https://www.jianshu.com/p/322966f324fe 在无界面的centos 7.3安装matlab 2015b 附下载连接 所说的进行破解就可以了。

 

 

2012-07-13 13:06:51 andy20050125 阅读数 445

本文出自网络,出处已遗失,如作者看到,请加以告知,以修改版权。


本文以 Red Hat Enterprise Linux AS 4 为例 


Oracle 10g对硬件环境的要求
物理内存
基本 - 512MB
推荐 - 1024MB
内存交换分区相对于物理内存的比例
物理内存1024MB~2048MB - 150%
物理内存2049MB~8192MB - 100%
物理内存大于8192MB - 75%
磁盘空间
/tmp目录所在的分区至少要有400MB空闲磁盘空间。
根据安装类型,安装Oracle服务器软件的分区至少要有1.5GB到3.5GB的空闲磁盘空间。1.2GB磁盘空间用于数据库预配置文件系统存储(可选)
 
相关软件包 (依耐包应具体的Linux版本有些差异,可参考官方文档的)
X11相关的库 (软件包名视操作系统而定,故不一一列出)

binutils-2.17.50.0.6 
compat-libstdc++-33-3.2.3 
compat-libstdc++-33-3.2.3 (32 bit) 
elfutils-libelf-0.125 
elfutils-libelf-devel-0.125 
gcc-4.1.1 
gcc-c++-4.1.1 
glibc-2.5-12 
glibc-2.5-12 (32 bit) 
glibc-common-2.5 
glibc-devel-2.5 
glibc-devel-2.5-12 (32 bit) 
libaio-0.3.106 
libaio-0.3.106 (32 bit) 
libaio-devel-0.3.106 
libgcc-4.1.1 
libgcc-4.1.1 (32 bit) 
libstdc++-4.1.1 
libstdc++-4.1.1 (32 bit) 
libstdc++-devel 4.1.1 
make-3.81 
sysstat-7.0.0 

 
1、检查Oracle依耐软件包:

rpm -q --qf '%{name}-%{version}-%{release} (%{arch})\n' binutils compat-db gcc gcc-c++ glibc glibc-common libstdc++ libstdc++-devel make sysstat libaio

(如果是在64位的环境下安装64位的oracle,则需要注意: glibc, libstdc++-, libstdc++-devel, libaio这4个包,是32位和64位的包都需要安装)
 
2、修改内核参数
在 /etc/sysctl.conf 文件中添加下述参数设定:

kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_max = 16777216
net.core.wmem_default = 266960

修改后执行下列命令使得内核改变生效:
sysctl -p


在 /etc/security/limits.conf中,添加

oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
 
3、创建用户并且配置环境变量
groupadd oinstall
groupadd dba
useradd -g dba -G oinstall -d /home/oracle -s /bin/bash oracle
passwd oracle
#修改oracle目录的属主
mkdir /home/oracle
chown -R oracle:dba /home/oracle
 
修改Oracle 用户的.bash_profile文件,添加下列内容:
#.bash_profile

TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/home/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/orcl; export ORACLE_HOME
ORACLE_SID=CRS; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
#LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

执行该命令,使环境变量立即生效:

source .bash_profile 
 
4、编辑安装需要的应答文件
静默模式(Silent)安装必须指定一个应答文件来完成安装过程所须的各类参数。
在Oracle安装目录的response子目录里有enterprise.rsp有enterprise.rsp、standard.rsp和custom.rsp三个应答文件,分别对应企业版、标准版和定制的安装。
以enterprise.rsp为例,用任意的文本编辑器打它,修改以下这些项目的值。

ORACLE_HOME=/db/oracle/product/10.2.0/db_1
#用于描述 ORACLE_HOME 的名字
ORACLE_HOME_NAME="TestDB2Home"
COMPONENT_LANGUAGES={"en"}
#安装类型,企业版
INSTALL_TYPE="EE"
#dba的用户组
s_nameForDBAGrp=dba
#operator 的用户组
s_nameForOPERGrp=dba
#安装类型配置
n_configurationOption=1
#安装类型配置
n_dbType=1
#全局数据库名
s_globalDBName="Test DB 2"
#实例名
s_dbSid=orcl
#数据库编码
s_dbRetChar="Unicode standard UTF-8 AL32UTF8"
#sys, system, sysman 等账号密码是否相同
b_useSamePassword=true
#密码
s_superAdminSamePasswd=test
#重复密码
s_superAdminSamePasswdAgain=test

其它项目用默认值即可,也可以根据自己的须要进行修改。
注:如果Oracle从光盘安装,必须先将应答文件复制到硬盘上,才能修改。
 
5、静默安装
./runInstaller -ignoreSysPrereqs -silent -responseFile /oracle/response/enterprise.rsp

完成后用Root 用户 根据提示执行以下 orainstRoot.sh 与 root.sh 文件
Please run the script '/home/oracle/oraInventory/orainstRoot.sh' with root privileges
The following configuration scripts /home/oracle/10g/root.sh need to be executed as root for configuring the system


6、卸载

如果要卸载Oracle,只须运行

$./runInstaller -silent -deinstall -removeallfiles -removeAllPatches "REMOVE_HOMES={$ORACLE_HOME}" -responseFile /oracle/response/enterprise.rsp


2014-06-16 14:26:42 LHDZ_BJ 阅读数 1054
su - root
#groupadd oinstall
#useradd -g oinstall oracle
#passwd oracle
#mkdir -p /u01/app/oracle
#chown -R oracle:oinstall /u01/app/oracle

$su -
#rm -f /etc/oraInst.loc
#touch oraInst.loc
cat >> oraInst.loc << EOF
inventory_loc=${ORACLE_BASE}/oraInventory
inst_group=oinstall
EOF

su - oracle
vi .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2/client
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LC_ALL="en_US"
export LANG="en_US"
export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK" #SIMPLIFIED CHINESE_CHINA.ZHS16GBK

export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"

unzip linux.x64_11gR2_client.zip


cd client/response

vi client_install.rsp
ORACLE_HOSTNAME=hostname
UNIX_GROUP_NAME='oinstall'
INVENTORY_LOCATION='/u01/app/Inventory'
ORACLE_BASE='/u01/app/oracle'
ORACLE_HOME='/u01/app/oracle/product/11.2/client'
oracle.install.client.installType=Custom

./runInstaller -silent -noconfig -ignoreSyspreReqs -responseFile /home/postgres/client/response/client_install.rsp

注意:
1、/etc/hosts中正确配置ip地址;
2、Inventory最好位于ORACLE_BASE之外;
3、如果报环境不能满足最低要求,试试用CRT等工具不直接登录oracle用户,而是登录其他用户,然后切换到oracle用户;
 
2013-05-07 15:21:37 xujinyang 阅读数 2694

Oracle 10g for linux X86的SILENT安装

Red Hat Enterprise Linux Server release 5.1 (Tikanga)



1、首先是检查系统硬件情况:

代码:

[root@enterprice64 ~]# grep MemTotal /proc/meminfo

MemTotal: 8178836 kB

[root@enterprice64 ~]# grep SwapTotal /proc/meminfo

SwapTotal: 8385888 kB

[root@enterprice64 ~]# free

total used free shared buffers cached

Mem: 8178836 5297744 2881092 0 122512 4773424

-/+ buffers/cache: 401808 7777028

Swap: 8385888 0 8385888

[root@enterprice64 ~]# df -k /dev/shm

Filesystem 1K-blocks Used Available Use% Mounted on

tmpfs 4089416 0 4089416 0% /dev/shm

[root@enterprice64 ~]# df -k /tmp

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/sda7 10153988 428132 9201740 5% /

[root@enterprice64 ~]# df -k /data

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/sda9 207275064 3933228 192642952 3% /data

 

要求内存不小于1G,在内存小于2G,SWAP应该是内存的1.5倍,内存2到8G,

SWAP和内存相同大小即可,内存超过8G,SWAP是内存的0.75倍。

由于10g对于共享内存要求变大,因此系统共享内存应该大于512*进程数,

如果共享内存不足的话,会造成ORA-845或ORA-1078错误。

要求临时表空间不少于200M,安装目录应大于4G。

 

2、下面检查系统软件情况:

代码:

[root@enterprice64 ~]# cat /proc/version

Linux version 2.6.18-8.el5 (mockbuild@ca-build14)

(gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1

SMP Tue Jun 5 23:25:19 EDT 2007

[root@enterprice64 ~]# uname -a

Linux enterprice64 2.6.18-8.el5 #1 SMP Tue Jun 5

23:25:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

[root@enterprice64 ~]# more /etc/issue

Enterprise Linux Enterprise Linux Server release 5 (Carthage)

Kernel r on an m

对操作系统要求:

Asianux 2.0

Asianux 3.0

Oracle Enterprise Linux 4.0

Oracle Enterprise Linux 5.0

Red Hat Enterprise Linux 4.0

Red Hat Enterprise Linux 5.0

SUSE Enterprise Linux 10.0

系统内核为2.6.9(Asianux 2.0、Oracle Enterprise Linux

4.0、Red Hat Enterprise Linux 4.0),2.6.18

(Asianux 3.0、Oracle Enterprise Linux 5.0、

Red Hat Enterprise Linux 5.0),或2.6.16.21(SUSE Enterprise Linux 10.0)。

对于ES4,oracle需要一下包:

binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3 (32 bit)

elfutils-libelf-0.125

elfutils-libelf-devel-0.125

gcc-4.1.1

gcc-c++-4.1.1

glibc-2.5-12

glibc-2.5-12 (32 bit)

glibc-common-2.5

glibc-devel-2.5

glibc-devel-2.5-12 (32 bit)

libaio-0.3.106

libaio-0.3.106 (32 bit)

libaio-devel-0.3.106

libgcc-4.1.1

libgcc-4.1.1 (32 bit)

libstdc++-4.1.1

libstdc++-4.1.1 (32 bit)

libstdc++-devel 4.1.1

make-3.81

sysstat-7.0.0

通过rpm –qa查询是否所有需要的包都以及安装,如果没有安装的通过

rpm –ivh命令进行安装。

 

3、检查网络情况:

代码:

[root@enterprice64 ~]# cat /etc/nsswitch.conf|grep hosts

#hosts: db files nisplus nis dns

hosts: files dns

[root@enterprice64 ~]# hostname

enterprice64

[root@enterprice64 ~]# domainname

(none)

[root@enterprice64 ~]# more /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 enterprice64 localhost.localdomain localhost

172.25.13.195 enterprice64

 

4、建立Oracle用户和dba组:

代码:

[root@enterprice64 ~]# groupadd oinstall

[root@enterprice64 ~]# groupadd dba

[root@enterprice64 ~]# groupadd asadmin

[root@enterprice64 ~]# useradd -g oinstall -G dba,asadmin oracle

[root@enterprice64 ~]# 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@enterprice64 ~]# id nobody

uid=99(nobody) gid=99(nobody) groups=99(nobody) context=root:system_r:unconfined_t:SystemLow-SystemHigh

 

建立oinstall、dba和asadmin组。创建好用户后,检查nobody用户是否存在。

不存在的话,建立该用户。

 

5、检测并修改系统的核心参数,编辑/etc/sysctl.conf文件,添加下面的配置,

保存后重启系统。注意,如果系统默认的配置比这里给出的值大,不要修改原有配置。

fs.file-max = 512 * PROCESSES (128):65536

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default = 4194304

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 262144

 

6、配置oracle用户环境变量和shell限制,编辑/etc/security/limits.conf,添加下面的内容:

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

编辑/etc/pam.d/login文件,添加下面的内容:

session required /lib/security/pam_limits.so

session required pam_limits.so

 

7、编辑oracle用户目录下的.bashrc文件,添加下列环境变量:

umask 022

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

 

export TMP=/tmp

export TMPDIR=/tmp

export ORACLE_BASE=/data/oracle

export ORACLE_SID=ora10g

export ORACLE_HOME=/data/oracle/product/10.2.0/db_1

 

 

8、置Oracle10g支持RHEL5的参数

因为在官方的Oracle10g是不支持RHEL5的,所以需要改变相关的参数,不然在Oracle10g安装前不能通过检测!

网上有两种更改的方法:(本人按照第一种方法安装成功,第二种安装不能成功)

 第一种:所以要修改版本说明,编辑文件 /etc/redhat-release Red Hat Enterprise Linux

Server release 5 (Tikanga) 改成版本4:

redhat-4

第二种:更改10201_database_linux32.zip解压后的/database/install/oraparam.ini文件。本人比较倾向于第一种,因为这种修改,在Oracle安装时第一次检测可以通过,但安装到一般时,再次检测无法通过,导致安装不成功!(个人观点)

### #[Certified Versions]

Linux=redhat-3,SuSE-9,redhat-4,redhat-5,UnitedLinux-1.0,asianux-1,asianux-2]

再添加

[Linux-redhat-5.0-optional]

TEMP_SPACE=80

SWAP_SPACE=150

MIN_DISPLAY_COLORS=256

 

9、建立安装Oracle所需的目录结构。

代码:

[root@enterprice64 ~]# mkdir -p /data/oracle/product/10.2.0/db_1

[root@enterprice64 ~]# chown -R oracle.oinstall /data

 

10、准备工作做完了下面开始进行Silent方式的安装。

10.1、设置oraInst.loc文件:

[root@enterprice64 ~]# ls -l /etc/oraInst.loc

-rw-rw-r-- 1 oracle dba 61 Oct 19 17:25 /etc/oraInst.loc

[root@enterprice64 ~]# more /etc/oraInst.loc

inventory_loc=/data/oracle/oraInventory(注意这个目录Oracle用户要有读写权限,否则检查不能通过)

inst_group=oinstall

确保/etc/oraInst.loc中包含上面的信息,且Oracle包含访问权限。

 

 

10.2、根据希望安装的数据库类型选择Silent的response_file文件的类似,

比如:enterprise.rspstandard.rsp还是custom.rsp

这里选择enterpise.rsp类型,

安装盘中的database/response目录下对应的response文件拷贝出来,

根据文件里面的提示对输入值进行修改。

比如这个例子中对如下的参数进行设置:

UNIX_GROUP_NAME="oinstall"

FROM_LOCATION="/data/database/stage/products.xml"

ORACLE_BASE="/data/oracle"

ORACLE_HOME="/data/oracle/product/10.2.0/db_1"

ORACLE_HOME_NAME="ORADBHOME10"

SHOW_ROOTSH_CONFIRMATION=false

RESTART_SYSTEM=false

RESTART_REMOTE_SYSTEM=false

COMPONENT_LANGUAGES={"zh_CN"}

s_nameForDBAGrp="dba"

s_nameForOPERGrp="oinstall"

s_nameForASMGrp="asadmin"

n_configurationOption=3

s_ASMSYSPassword="asm"

s_ASMSYSPasswordAgain="asm"

 

注意,所有的字符串需要放在双引号中,注意大小写。数字和布尔变量直接写就可以。

由于这里没有选择建立数据库而只安装软件,因此没有设置数据库相关的配置参数。

[oracle@enterprice64 data]$ chmod 700 enterprise.rsp

 

10.3、下面可以开始SILENT安装了:

注意,响应文件需要使用绝对路径。

代码:

[oracle@enterprice64 database]$ ./runInstaller -silent -noconfig -IgnoreSysPreReqs -responseFile /data/database/enterprise.rsp

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.

Actual 8886 MB Passed

Checking swap space: must be greater than 150 MB.

Actual 8189 MB Passed

Preparing to launch Oracle Universal

Installer from /tmp/OraInstall2007-10-19_06-40-04PM.

Please wait ...[oracle@enterprice64 database]$

Oracle Universal Installer, Version 10.2.0.6.0 Production

Copyright (C) 1999, 2007, Oracle. All rights reserved.

You can find the log of this install session at:

/data/oracle/oraInventory/logs/installActions2007-10-19_06-40-04PM.log

............................................................ 100% Done.

Loading Product Information

..........................................................100% Done.

Starting execution of Prerequisites...

Total No of checks: 14

Performing check for CertifiedVersions

Checking operating system requirements ...

Expected result: One of enterprise-4,enterprise-5,redhat-4,

redhat-5,SuSE-10,asianux-2,asianux-3

Actual Result: enterprise-5

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

Performing check for Packages

Checking operating system package requirements ...

Checking for make-3.81; found make-1:3.81-1.1-x86_64. Passed

Checking for binutils-2.17.50.0.6;

found binutils-2.17.50.0.6-2.el5-x86_64. Passed

Checking for gcc-4.1.1; found gcc-4.1.1-52.el5-x86_64. Passed

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

Performing check for Kernel

Checking kernel parameters

Checking for semmsl=250; found semmsl=250. Passed

Checking for wmem_max=262144; found wmem_max=262144. Passed

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

Performing check for GLIBC

Checking Recommended glibc version

Expected result: ATLEAST=2.5-12

Actual Result: 2.5-12

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

Performing check for TotalMemory

Checking physical memory requirements ...

Expected result: 922MB

Actual Result: 7984MB

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

Performing check for SwapSpace

Checking available swap space requirements ...

Expected result: 7984MB

Actual Result: 8189MB

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

Performing check for DetectIfDHCPAssignedIP

Checking Network Configuration requirements ...

Check complete. The overall result of this check is: Not executed <<<<

Check complete: Not executed <<<<

Recommendation: Oracle supports installations on systems with

DHCP-assigned public IP addresses. However, the primary

network interface on the system should be configured with

a static IP address in order for the Oracle Software to

function properly. See the Installation Guide for more

details on installing the software on systems configured with DHCP.

========================================================

Performing check for CheckPathForOtherOracleHomes

Checking PATH environment variable...

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

Performing check for CheckTempDiskSpace

Checking for sufficient diskspace in TEMP location...

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

 

Performing check for CheckLdLibraryPath

Checking LD_LIBRARY_PATH environment variable...

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

 

Performing check for OracleBase

Validating ORACLE_BASE location (if set) ...

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

 

Performing check for OracleHomeSpace

Checking Oracle Home path for spaces...

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

 

Performing check for DetectAnyInvalidASMHome

Checking for proper system clean-up....

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

 

Performing check for CompatibilityChecks_DB

Checking for Oracle Home incompatibilities ....

Actual Result: NEW_HOME

Check complete. The overall result of this check is: Passed

Check complete: Passed

========================================================

PrereqChecks complete

Analyzing dependencies

.....................................................100% Done.

--------------------------------------------------------------

Summary

Global Settings

Source: /data/database/stage/products.xml

Oracle Base: /data/oracle

Oracle Home: /data/oracle/product/10.2.0/db_1 (ORADBHOME11)

Installation Type: Enterprise Edition

Product Languages

Simplified Chinese

English

Space Requirements

/ Required 226MB (only as temporary space) : Available 8.56GB

/data/ Required 3.63GB : Available 181.86GB

New Installations (126 products)

Oracle Database 10g 10.2.0.6.0

Enterprise Edition Options 10.2.0.6.0

Oracle Partitioning 10.2.0.6.0

Oracle Universal Installer 10.2.0.6.0

Oracle One-Off Patch Installer 10.2.0.6.0

Installer SDK Component 10.2.0.6.0

Sun JDK 1.5.0.11.0

----------------------------------------------------------

Installation in progress (Fri Oct 19 18:40:20 CST 2007)

............................................................... 6% Done.

............................................................... 12% Done.

............................................................... 19% Done.

............................................................... 25% Done.

............................................................... 31% Done.

............................................................... 38% Done.

............................................................... 44% Done.

............................................................... 50% Done.

............................................................... 57% Done.

............................................................... 63% Done.

............................................................... 69% Done.

............................................................... 76% Done.

................................................. 81% Done.

Install successful

Linking in progress (Fri Oct 19 18:42:27 CST 2007)

.. 81% Done.

Link successful

Setup in progress (Fri Oct 19 18:43:33 CST 2007)

................................... 100% Done.

Setup successful

End of install phases.(Fri Oct 19 18:43:36 CST 2007)

WARNING:

The following configuration scripts need to be executed as the "root" user.

#!/bin/sh

#Root script to run

/data/oracle/product/10.2.0/db_1/root.sh

To execute the configuration scripts:

1. Open a terminal window

2. Log in as "root"

3. Run the scripts

The installation of Oracle Database 10g was successful.

Please check '/data/oracle/oraInventory/logs/

silentInstall2007-10-19_06-40-04PM.log' for more details.

 

10.4、最后使用root执行一下$ORACLE_HOME/root.sh脚本就可以了。

不过这里Oracle存在一个bug,在root.sh脚本中,自动将OUI_SILENT参数设置为TRUE

而后的检查中,如果发现这个值为TRUE,那么这个脚本运行会自动退出了。

这里需要手工将其修改为FALSE,然后使用root执行:

 

[root@enterprice64 10.2]# ./root.sh

Running Oracle 10g root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /data/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying dbhome to /usr/local/bin ...

The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying oraenv to /usr/local/bin ...

The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying coraenv to /usr/local/bin ...

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.

Finished product-specific root actions.

 

 

对于root.sh的执行不要使用. root.sh的方式,这种方式可能造成脚本陷入死循环。

至此,数据库软件的安装已经完成,

 

[oracle@enterprice64 ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.6.0 - Production on Mon Oct 22 14:07:28 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to an idle instance.

SQL>

 

 

10.5、这篇继续介绍SILENT模式下的数据库建立过程(dbca.rsp)。

 

通过SILENT模式安装数据库之后,下面继续使用SILENT模式进行数据库的建立,仍然是拷贝安装目录下的/database/reponse/dbca.rsp到安装目录,并进行编译,根据数据库建立方式的不同编辑不同的数据库库选项。

 

比如在本次安装过程中设置了下列参数:

 

RESPONSEFILE_VERSION = "10.2.0"

OPERATION_TYPE = "createDatabase"

GDBNAME = "ora10g.us.oracle.com"

SID = "ora10g"

TEMPLATENAME = "New_Database.dbt"

SYSPASSWORD = "test"

SYSTEMPASSWORD = "test"

SYSMANPASSWORD = "test"

DBSNMPPASSWORD = "test"

DATAFILEDESTINATION ="/data/oracle/oradata"

RECOVERYAREADESTINATION="/data/oracle/flash_recovery_area"

CHARACTERSET = "ZHS16GBK"

TOTALMEMORY = "6000"

TEMPLATENAME = " ora10g "

GDBNAME = " ora10g.us.oracle.com"

SCRIPTDESTINATION ="/data/oracle/admin/ ora10g /scripts"

 

其中最后三项不是必须的,这个的目的是在建立数据库的同时生成脚本。

 

10.6、下面就可以开始SILENT模式的数据库创建了:

代码:

 

[oracle@enterprice64 bin]$ ./dbca -silent -responseFile /data/database/dbca.rsp

 

Creating and starting Oracle instance

1% complete

3% complete

Creating database files

6% complete

Creating data dictionary views

7% complete

8% complete

9% complete

10% complete

11% complete

12% complete

14% complete

16% complete

17% complete

18% complete

Adding Oracle JVM

23% complete

28% complete

33% complete

35% complete

Adding Oracle Text

36% complete

37% complete

38% complete

Adding Oracle XML DB

40% complete

41% complete

42% complete

45% complete

Adding Oracle Multimedia

46% complete

47% complete

56% complete

Adding Oracle OLAP

57% complete

58% complete

59% complete

Adding Oracle Spatial

60% complete

61% complete

62% complete

63% complete

66% complete

Adding Oracle Ultra Search

67% complete

73% complete

Adding Enterprise Manager Repository

75% complete

76% complete

Adding Oracle Application Express

80% complete

83% complete

Adding Oracle Warehouse Builder

87% complete

90% complete

Completing Database Creation

91% complete

92% complete

93% complete

94% complete

97% complete

100% complete

Look at the log file "/data/oracle/cfgtoollogs/dbca/ora10g64/ora10g64.log" for further details.

 

数据库建立完成:

代码:

[oracle@enterprice64 database]$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.6.0 - Production on Mon Oct 22 17:28:02 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.6.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from v$version;

BANNER

----------------------------------------------------------------------------

 

Oracle Database 10g Enterprise Edition Release 10.2.0.6.0 - 64bit Production

PL/SQL Release 10.2.0.6.0 - Production

CORE 10.2.0.6.0 Production

TNS for Linux: Version 10.2.0.6.0 - Production

NLSRTL Version 10.2.0.6.0 - Production

 

10.7、最后可以利用netca来SILENT方式设置网络部分,同样的方法设置netca.rsp:

 

RESPONSEFILE_VERSION="10.2"

CREATE_TYPE= "CUSTOM"

SHOW_GUI=false

LOG_FILE=""/data/oracle/product/10.2.0/db_1/network/tools/log/netca.log""

INSTALLED_COMPONENTS={"server","net8","javavm"}

INSTALL_TYPE=""typical""

LISTENER_NUMBER=1

LISTENER_NAMES={"LISTENER"}

LISTENER_PROTOCOLS={"TCP;1521"}

LISTENER_START=""LISTENER""

NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}

 

这里需要检查是不是有这两个包:否则会抛出这样的异常:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /data/oracle/product/10.2.0/jdk/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory

libXp-1.0.0-8.1.el5.i386.rpm  

xorg-x11-deprecated-libs-6.8.2-1.EL.13.37.i386.rpm

如果没有请下载并安装他们

 

设置的参数包括上面的部分,然后就可以使用netca启动silent配置:

 [oracle@enterprice64 bin]$ ./netca /silent /responseFile /data/database/netca.rsp

 

Mon Oct 22 18:26:40 CST 2007 Oracle Net Configuration Assistant

Parsing command line arguments:

Parameter "silent" = true

Parameter "responsefile" = /data/database/netca.rsp

Parameter "log" = /data/oracle/product/10.2.0/db_1/network/tools/log/netca.log

Done parsing command line arguments.

Oracle Net Services Configuration:

Profile configuration complete.

Listener started at port:1521

Oracle Net Listener Startup:

Running Listener Control:

/data/oracle/product/10.2.0/db_1/bin/lsnrctl start LISTENER

Listener Control complete.

Listener started successfully.

Listener configuration complete.

Oracle Net Services configuration successful. The exit code is 0

 

[oracle@enterprice64 bin]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.6.0 - Production on 22-OCT-2007 18:31:20

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 10.2.0.6.0 - Production

Start Date 22-OCT-2007 18:26:40

Uptime 0 days 0 hr. 4 min. 39 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /data/oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File /data/oracle/diag/tnslsnr/enterprice64/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=enterprice64)(PORT=1521)))

Services Summary...

Service "ora10g64.us.oracle.com" has 1 instance(s).

Instance "ora10g64", status READY, has 1 handler(s) for this service...

Service "ora10g64XDB.us.oracle.com" has 1 instance(s).

Instance "ora10g64", status READY, has 1 handler(s) for this service...

Service "ora10g64_XPT.us.oracle.com" has 1 instance(s).

Instance "ora10g64", status READY, has 1 handler(s) for this service...

The command completed successfully

 

至此,SILENT安装方式完成。

 

11、让Oracle运行为服务(root用户登录)

创建文件 /etc/init.d/oracle

touch  /etc/init.d/oracle

然后将这个文件赋予可执行的权限,运行

chmod a+x /etc/init.d/oracle

完成后,输入下列内容

#!/bin/sh

#

export ORACLE_HOME=/data/oracle/product/10.2.0/db_1

export ORACLE_HOME_LISTNER=$ORACLE_HOME

export ORACLE=oracle

. /etc/init.d/functions

export PATH=${PATH}:$ORACLE_HOME/bin

start()

{

    daemon --user $ORACLE $ORACLE_HOME/bin/dbstart

    daemon --user $ORACLE "$ORACLE_HOME_LISTNER/bin/lsnrctl start"

}

stop()

{

    daemon --user $ORACLE "$ORACLE_HOME_LISTNER/bin/lsnrctl stop"

    daemon --user $ORACLE $ORACLE_HOME/bin/dbshut

}

case $1 in

'start')

    start

    RETVAL=$?

    ;;

'stop')

    stop

     RETVAL=$?

    ;;

'restart')

    stop

    start

    RETVAL=$?

    ;;

*)

    echo "usage: $0 {start|stop|restart}"

     exit

     ;;

esac

#

exit

 

12、让Oracle的服务在Linux启动时自动运行

ln -s /etc/init.d/oracle /etc/rc.d/rc3.d/S99oracle

ln -s /etc/init.d/oracle /etc/rc.d/rc5.d/S99oracle

这样就可以用service来启动和停止Oracle了。

最后要记得配置Oracle用户的环境变量(否则sqlplus类型这样的关键字不能识别):

[oracle@Fuyue ~]$ cat .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

unset USERNAME

# Oracle Settings

TMP=/tmp;

export TMP

TMPDIR=$TMP;

export TMPDIR

ORACLE_BASE=/data/oracle

ORACLE_HOME=$ORACLE_BASE/product/10.2.0

ORACLE_SID=ora10g

ORACLE_TERM=xterm

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH ORACLE_TERM

if [ $USER = "oracle" ]; then

  if [ $SHELL = "/bin/ksh" ]; then

    ulimit -p 16384

    ulimit -n 65536

  else

    ulimit -u 16384 -n 65536

  fi

fi

完成后要重新启动系统reboot

 

13、显示oracle当前用户名和sid名称:

执行语句,sql>set sqlprompt "_user _connect_identifier'>'"

set sqlprompt设置sqlplus的提示信息

_connect_identifier 显示你连接的instance_name

_user 显示sqlplus登录的oracle用户

 

14、Spfile文件损坏解决方法

SQL> startup

ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file ’/opt/oracle/app/oracle/product/10.1.0/Db_1/dbs/initora10g.ora’

 

这是因为在oracle9i/10g中,数据库默认将使用spfile启动数据库,如果spfile不存在,则就会出现上述错误。

解决方法:

$ORACLE_BASE/admin/数据库名称/pfile目录下的init.ora.012009233838形式的文件

copy$ORACLE_HOME/dbs目录下initora10g.ora即可。(注:initora10g.ora中的ora10g为你的实例名ORACLE_SID

 

15、Linux查看开放端口

sudo netstat –antup

lsof –i:1521

nmap -sT -O localhost

netstat -anp | grep LISTEN

lsof -n -i | grep LISTEN

 

16、主题:关闭或开启Linux上的防火墙

关闭 /etc/rc.d/init.d/iptables stop

开启 /etc/rc.d/init.d/iptables start

查看当前配置:iptables -L

redhat :

chkconfig --level 2345 iptables off

service iptables stop

但是不推荐关闭防火墙

1)    重启后生效

开启: chkconfig iptables on

关闭: chkconfig iptables off

 

2) 即时生效,重启后失效

开启: service iptables start

关闭: service iptables stop

 

需要说明的是对于Linux下的其它服务都可以用以上命令执行开启和关闭操作。

 

在开启了防火墙时,做如下设置,开启相关端口,

修改/etc/sysconfig/iptables 文件,添加以下内容:

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

 

17、解决ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务

错误原因分析:

检查监听,发现未设置对服务名的监听(Oracle10g默认安装后不自动设置监听)。   

当你的tnsnames.ora 文件中的SERVICE_NAME没有向你想要连接的数据库服务器中注册的时候,

就会出现这个错误信息。如果你的客户端配置没有发生变化,那么数据库服务器配置就必须进行改变,

否则你用来进行连接的SERVICE_NAME就永远不会注册

解决办法:

1. 打开文件"<OracleHome>/network/admin/listener.ora" ,你将看到如下的内容:

    SID_LIST_LISTENER =

    (SID_LIST =

      (SID_DESC =

        (SID_NAME = PLSExtProc)

        (ORACLE_HOME = /data/oracle/product/10.2.0)

        (PROGRAM = extproc)

      )

    )

   2. 将下面的语句添加到上面的语句中去。

        (SID_DESC =

        (GLOBAL_DBNAME = ORACLE)

        (ORACLE_HOME = /data/oracle/product/10.2.0)  

        (SID_NAME = ORACLE)

       )

  3. 文件的内容则变成了如下所示:

  SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = /data/oracle/product/10.2.0)

      (PROGRAM = extproc)

    )

   (SID_DESC =

        (GLOBAL_DBNAME = ora10g)

        (ORACLE_HOME = /data/oracle/product/10.2.0)  

        (SID_NAME = ora10g)

    )

  )

4. 保存文件,然后重新启动监听服务TNSListener就可以了 

问题解析:

----------------------

主动跟被动的关系

1.是让listener主动加载服务

原因是 添加

    (SID_DESC =

      (SID_NAME = ora10g)

      (ORACLE_HOME = /data/oracle/product/10.2.0)

    )

后,在使用lsnrctl start监听程序时会将listener的服务注册到进程监视器(pmon)中

2.listener被动加载服务

如果没有该内容,那么由实例的pmon进程在listener中注册服务,对listener来讲,就是被动了。

这也就是为什么先启动监听后启动数据库能够正常连接的,反之不行的原因了。


没有更多推荐了,返回首页