centos55+oracle.docx

上传人:b****5 文档编号:8211643 上传时间:2023-01-29 格式:DOCX 页数:10 大小:229.54KB
下载 相关 举报
centos55+oracle.docx_第1页
第1页 / 共10页
centos55+oracle.docx_第2页
第2页 / 共10页
centos55+oracle.docx_第3页
第3页 / 共10页
centos55+oracle.docx_第4页
第4页 / 共10页
centos55+oracle.docx_第5页
第5页 / 共10页
点击查看更多>>
下载资源
资源描述

centos55+oracle.docx

《centos55+oracle.docx》由会员分享,可在线阅读,更多相关《centos55+oracle.docx(10页珍藏版)》请在冰豆网上搜索。

centos55+oracle.docx

centos55+oracle

安装CentOS 5.5

centos5.5下载地址:

1.1  安装向导

1.2 去掉Desktop Gnome选项,服务器一般不用安装桌面,要是安装Oracle除外!

选择现在定制“Customize now”

1.3去掉Editors选项,切忌!

1.4 去掉文本互联网软件

1.5 去掉拨号网络

到处就ok了!

切忌,不要错选一项哦!

按照网上搜来这样做的,没费什么力气,有了前人的血的教训,也帮我扫清的很多绊脚石。

 

系统环境配置

1.安装CENTOS 5.5

安装CentOs5.5 时,如果服务器只是运行Oracle数据库的话,

在安装CentOs5.0 时一定要选择安装gnome,开发工具包,遗留开发包,其他一些包可以不选择安装。

2.查询所需安装包是否完整

rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel libaio

[root@localhost yum.repos.d]# rpm -q gcc make binutils openmotif setarch compat-db  libaio

gcc-4.1.2-48.el5

make-3.81-3.el5

binutils-2.17.50.0.6-14.el5

package openmotif is not installed

setarch-2.0-1.1

package compat-db is not installed

libaio-0.3.106-5

[root@localhost yum.repos.d]#

把这些没有安装的包一一安装到位。

[root@localhost ~]# yum install openmotif

[root@localhost ~]# yum install compat-db

可能还需要以下一些包,在安装的过程中根据包依赖的关系,把所依赖的包安装上:

compat-libstdc++-33-3.2.3-61.i386.rpm     <–必须

libXp-devel-1.0.0-8.i386.rpm

openmotif-devel-2.3.0-0.3.el5.i386.rpm

openmotif22-2.2.3-18.i386.rpm

perl-libxml-perl-0.08-1.2.1.noarch.rpm

3.kernel参数修改vi /etc/sysctl.conf , 在行末添加以下内容,在CentOs5.0上会看到

kernel.shmmax = 4294967295

kernel.shmall = 268435456这些参数已经存在并且默认启用了,

需要将原kernel.shmmax与kernel.shmall参数注释掉。

并在文件末尾添加以下内容:

#use for oracle10g

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=262144

net.core.rmem_max=262144

net.core.wmem_default=262144

net.core.wmem_max=262144

在安装oracle数据库的时候要注意/etc/hosts与/etc/sysconfig/network文件主机名的一致性,

否则会在后面运行netca和dbca可能出现错误提示。

例如:

/etc/hosts文件内容如下:

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1        localhost.localdomain localhost

:

:

1        localhost6.localdomain6 localhost6

/etc/sysconfig/network内容如下:

NETWORKING=yes

NETWORKING_IPV6=no

HOSTNAME=localhost.localdomain

4.vi /etc/security/limits.conf 在文件末尾添加以下内容

#use for oracle10g

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

5. vi /etc/pam.d/login 行末添加以下内容

session    required     /lib/security/pam_limits.so

session    required     pam_limits.so

6. vi /etc/selinux/config 确保以下内容

SELINUX=disabled

关闭SELIINUX

7.vi /etc/profile,在最后加入:

if [ $USER = "oracle" ]; then

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

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

8.因为默认centos5.0不支持10.2,0.1,修改配置文件,使CentOs5.0 支持Oracle10g .

[root@localhost ~]# cp /etc/redhat-release  redhat-release.bak

备份要修改的文件 。

直接修改/etc/redhat-release内容为 redhat-4

再运行sysctl -p应用以上参数

 

Oracle用户及目录配置及安装

oracle10gforlinux下载地址:

1.创建和配置用户

[root@localhost ~]# groupadd oinstall   //创建oracle数据库安装组

[root@localhost ~]# groupadd dba        //创建oracle数据库管理组

[root@localhost ~]# useradd -m -g oinstall -G dba oracle  //创建oracle用户

[root@localhost ~]# id oracle

uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)

passwd oracle      //为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.

2.创建安装目录

mkdir -p /u01/oracle     //创建oracle的BASE 目录

chown -R oracle:

oinstall /u01/oracle  //修改BASE目录的属主和属组

chmod -R 775 /u01/oracle

mv /root/10201_database_linux32.zip /u01/mk

unzip /u01/10201_database_linux32.zip

3.修改 Oracle 用户 .bash_profile

# su - oracle

$ vi ./.bash_profile

添加

export ORACLE_BASE=/u01/oracle

export ORACLE_HOME=$ORACLE_BASE/10g

export ORACLE_SID=orcl  //数据库实例的SID,在图形界面安装过程中要求输入

export ORACLE_GID=orcl

export PATH=$PATH:

$HOME/bin:

$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:

/lib:

/usr/lib

开始安装

# su - oralce

$ cd /u01/databases     //Oracle解压后产生的目录

$ export LANG=en_US    //设置临时环境变量,解决oracle图形界面显示乱码的问题

Su - root

$ xhost +

su - oracle

#Xlib:

 connection to ”:

0.0″ refused by server解决方法(linux + oracle10g)

$ ./runInstaller       //可以加参数-ignoreSysPreReqs,跳过对系统安装前的检查

一直下一步就可以了.

安装过程中遇到的问题解决

error in invoking target ntcontab.o of makefile

在安装的时候报上面的错误,经过查找,发现是gcc-3.4.6-9和gcc-c++-3.4.6-9两个包没有装好。

解决办法:

加载光盘>centos->运行gcc-4.1.2-48-el5.i386.rpm和gcc-c++4.1.2-48-el5.i386.rpm

成功;

5. 在oracle安装报错的提示界面选择retry,这个错误解决了!

安装oracle10g时报:

Error in invoking target ’all_no_orcl ihsodbc’ of makefile… 

这个错误是和编译有关的,检查日志发现果然缺少了一个C的类库:

INFO:

 /usr/lib/libstdc++.so.5:

 No such file or directory

解决办法:

1、在linux光盘找到compat-libstdc++-33-3.2.3-47.3.i386.rpm包,在linux上安装补丁包:

如果安装过程中有提示缺少什么文件的话,可以切换到ROOT用户,安装好需要的文件并继续安装。

安装后期会提示需要用ROOT用户执行两个脚本,一一执行它。

直到安装完毕退出。

数据库的启动与排错

重启计算机后,数据库并没有自动启动。

1、启动监听服务

[oracle@localhost ~]$ lsnrctl start

2、[oracle@localhost ~]$ sqlplus ’/as sysdba’

SQL*Plus:

 Release 10.2.0.1.0 - Production on Wed Aug 4 11:

25:

31 2010

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

Connected to an idle instance.

SQL> startup

ORA-01078:

 failure in processing system parameters

LRM-00109:

 could not open parameter file ’/u01/oracle/10g/dbs/initORCL.ora’

启动数据库时提示出错。

说找不到指定文件initORCL.ora。

到/u01/oracle/10g/dbs/去查看,

果然没有。

新开个控制台

复制一个init.ora,命名为initORCL.ora

$ cd /u01/oracle/10g/dbs

$ cp init.ora  initORCL.ora

SQL> startup

ORA-00371:

 not enough shared pool memory, should be atleast 62198988 bytes

又出现错误提示,怎么办呢?

vi $ORACLE_HOME/dbs/initORCL.ora将其中的shared_pool_size = 35000000改成62198988

重新启动

再次执行

[oracle@localhost ~]$ sqlplus ’/as sysdba’

SQL*Plus:

 Release 10.2.0.1.0 - Production on Wed Aug 4 11:

25:

31 2010

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

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area  100663296 bytes

Fixed Size                  1217884 bytes

Variable Size              88083108 bytes

Database Buffers            8388608 bytes

Redo Buffers                2973696 bytes

ORA-00205:

 error in identifying control file, check alert log for more info

提示控制文件出错。

解决方法:

SQL>show parameter control_files

SQL>CREATE CONTROLFILE

将$ORACLE_BASE/admin/$GID/pfile/init$SID.ora***************拷贝到$ORACLE_HOME/dbs下,

命名为init$SID.ora,即可解决。

关闭后,重新启动

[oracle@localhost ~]$ sqlplus ’/as sysdba’

SQL*Plus:

 Release 10.2.0.1.0 - Production on Wed Aug 4 12:

05:

30 2010

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

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area  603979776 bytes

Fixed Size                  1220796 bytes

Variable Size             163581764 bytes

Database Buffers          432013312 bytes

Redo Buffers                7163904 bytes

Database mounted.

Database opened.

SQL>

oracle启动正常!

到此告一段落,终于功能安装并启动了ORALCE。

还有一点,如果服务开启打算对外服务,一定要把防火墙端口打开1521端口,如

oracle10gclient forwin32(oraclewindows客端)下载地址:

 

登录:

EnterpriseManager(EM)DatabaseControl

启动相关服务:

#su–oracle

$emctlstartdbconsole

TZsettoPRC

OracleEnterpriseManager10gDatabaseControlRelease10.2.0.1.0

Copyright(c)1996,2005OracleCorporation.Allrightsreserved.

http:

//localhost.localdomain:

1158/em/console/aboutApplication

StartingOracleEnterpriseManager10gDatabaseControl…………..started.

——————————————————————

Logsaregeneratedindirectory/u01/oracle/10g/localhost.localdomain_orcl/sysman/log

访问:

http:

//localhost.localdomain:

1158/em/

RedhatLinuxoracle10gem按钮乱码解决

1.修改jdk下面的字体。

[oracle@localhost]$cd$ORACLE_HOME/jdk/jre/lib/

[oracle@localhostlib]$mvfont.propertiesfont.properties_bak

[oracle@localhostlib]$

[oracle@localhostlib]$cpfont.properties.zh_CN.Redhatfont.properties

[oracle@localhostlib]$

2.修改jre下面的字体

[oracle@localhostlib]$cd$ORACLE_HOME/jre/1.4.2/lib

[oracle@localhostlib]$mvfont.propertiesfont.properties_bak

[oracle@localhostlib]$cpfont.properties.zh_CN.Redhatfont.properties

注意:

font.properties最后一行的设置字体文件,如果不存在需要指定已经存在的字体文件,

还要注意字体文件必须有操作的权限。

你可以:

windows下的字体文件simsun.ttc复制到/home/oracle/目录下并改名simsun.ttf

(注意ms的simsun字体是有版权的,所以商用换其他字体),相应的权限改为oracle用户可用。

[oracle@localhostlib]$tail-n3font.properties

filename.-misc-zysong18030-medium-r-normal–*-%d-*-*-c-*-iso10646-1=/home/oracle/simsun.ttf

3.清除em的cache

[oracle@localhostlib]$cd$ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs

[oracle@localhostzhs]$rm*.gif

4.重新启动em

[oracle@localhostzhs]$emctlstopdbconsole

[oracle@localhostzhs]$emctlstartdbconsole

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 中考

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1