linux下oralce安装

来源:互联网 发布:flashas3程序员招聘 编辑:程序博客网 时间:2024/06/08 06:35

安装环境:

Linux版本:

[root@oraserver~]# uname -a

Linuxoraserver.net.com 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686i686 i386 GNU/Linux

Oracle安装包:10201_database_linux32

远程安装软件:XmanagerEnterprise 3

 

参考资料:oracle官方手册

http://www.oracle.com/pls/db102/portal.portal_db?selected=1

《2 Day DBA》和《Database Installation Guide for Linux x86》

 

1、Checking theSoftware Requirements(检查需要支撑的软件包)

 

Red HatEnterprise Linux 4.0 and Asianux 2.0:binutils-2.15.92.0.2-13.EL4compat-db-4.1.25-9compat-libstdc++-296-2.96-132.7.2control-center-2.8.0-12gcc-3.4.3-22.1.EL4gcc-c++-3.4.3-22.1.EL44glibc-2.3.4-2.9glibc-common-2.3.4-2.9gnome-libs-1.4.1.2.90-44.1libstdc++-3.4.3-22.1libstdc++-devel-3.4.3-22.1make-3.80-5pdksh-5.2.14-30  --可以不安装sysstat-5.0.5-1xscreensaver-4.18-5.rhel4.2setarch-1.6-1    --可以不安装

 

如果没有安装图像界面的话,安装一下如下软件包:

libXp-1.0.0-15.1.el6libXp-devel-1.0.0-15.1.el6

 

查看软件包和安装软件包,rpm工具:

[root@oraserver ~]# rpm–qa | grep binutils[root@oraserver ~]# rpm–ivh  binutils-*

 

为避免安装包依赖问题,可以配置本地yum,使用yum安装工具。配置本地yum方法网络上资料比较多,感兴趣的可以到网上找一下相关资料。


2、ConfiguringKernel Parameters(检查内核配置)

Note: The kernel parameter and shell limitvalues shown in the following section are recommended values only. Forproduction database systems, Oracle recommends that you tune these values to optimizethe performance of the system. Refer to your operating system documentation formore information about tuning kernel parameters.

 Oracle官方建议内核参数值如下:

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

 

参数说明:

1.related to the details ofthe semaphore parameters

kernel.shmall

kernel.shmmax

kernel.shmmni

 

2.related to the details of  the shared memory segment sizes

 

执行如下命令,查看内核参数,参数值小于上述的修改。没有的添加。大于上述参数值可以不修改。

[oracle@oraserver ~]$ grep ^[^#]  /etc/sysctl.conf

 

修改完后,执行如下命令使上述修改的内核参数有效。

[oracle@oraserver ~]$ sysctl -p

 

3、Setting Shell Limitsfor the oracle User(设置oracle限制参数)

To improve the performance of the softwareon Linux systems, you must increase the

following shell limits for the oracleuser. 


To increase the shell limits:

(1). Add the following lines to the /etc/security/limits.conf file:

oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536

(2). Add or edit the following line in the /etc/pam.d/login file, if it does not
already exist:

sessionrequired /lib/security/pam_limits.sosessionrequired pam_limits.so

 

(3). Depending on the oracle user's default shell, make the following changes to the
default shell start-up file:

■ For the Bourne, Bash, or Korn shell, add the followinglines to the/etc/profile file (or the file onSUSE systems)/etc/profile.local:

 

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

 

■ For the C shell (csh or tcsh), add the followinglines to the /etc/csh.login file (or the file onSUSE systems)/etc/csh.login.local:

if ( $USER== "oracle" ) thenlimit maxproc 16384limit descriptors 65536endif


4、修改系统版本信息:

[root@oraserver /]#cp /etc/redhat-release /etc/redhat-releasebak[root@oraserver /]#echo "redhat-4" > /etc/redhat-release[root@oraserver /]#cat /etc/redhat-releaseredhat-4


5、创建oracle安装路径和oracle用户及组

创建组与用户

[root@oraserver ~]#groupadd oinstall[root@oraserver ~]#groupadd dba[root@oraserver ~]#useradd -g oinstall -G dba oracle[root@oraserver ~]#passwd oracle

 

创建oralce安装路径

[root@oraserver ~]#mkdir -p /u01/app/oracle/product/10.2.0/db_1[root@oraserver ~]#chown -R oracle:oinstall /u01[root@oraserver ~]# chmod–R 755 /u01

6、设置oracle用户环境变量

[oracle@oraserver~]$ vi .bash_profile# .bash_profile# Get the aliasesand functionsif [ -f ~/.bashrc ];then        . ~/.bashrcfi# User specificenvironment and startup programsTMP=/tmp;export TMPTMPDIR=$TMP;export TMPDIR ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1exportORACLE_HOME ORACLE_BASE=/u01/app/oracleexportORACLE_BASE ORACLE_SID=testdb2exportORACLE_SID LD_LIBRARY_PATH=$ORACLE_HOME/libexportLD_LIBRARY_PATH PATH=$ORACLE_HOME/bin:$PATH:$HOME/binexport PATH


7、解压安装包

[oracle@oraserveru01]$ ls

10201_database_linux32.zip  app database  lost+found

[oracle@oraserveru01]$ unzip 10201_database_linux32.zip


8.安装

[oracle@oraserver database]$ ls

doc install  response  runInstaller stage  welcome.html

[oracle@oraserver database]$ ./runInstaller
原创粉丝点击