分享
 
 
 

Oralcle 10g Fedora Core X上快速安装指南

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

Home -> oracle -> Oracle 10g release 1 (10.1.0.2) on Fedora core 1

Oracle Database 10g release 1 (10.1.0.2) installation on Fedora core 1

Please note that Oracle Database 10g is not certified to run on Fedora Linux, therefore you should not use this combination on a production server. You can examine Oracle certification matrix at Metalink

Contents

1. Downloading and unpacking installation files

2. Preparing your system

2.1 Steps to perform as root user

2.2 Steps to perform as oracle user

3. Running the installer

4. Post-installation steps

4.1 Starting database services

4.2 Shutting down database services

4.3 Automating oracle startup and shutdown

1. Downloading and unpacking installation files

Download Oracle Database 10g from Oracle Technology Network. Four files are available:

ship.ccd.cpio.gz - Oracle 10g Companion CD

ship.client.cpio.gz - Oracle 10g Client

ship.crs.cpio.gz - Oracle 10g Cluster Ready Services

ship.db.cpio.gz - Oracle 10g Database

Only ship.db.cpio.gz is required in order to install the database.

Once you downloaded the file, unpack it:

gunzip ship.db.cpio.gz

cpio -idmv<ship.db.cpio

All four installation files unpack to directory named "Disk1", so rename directory before you eventually unpack another file.

You may want to create Oracle installation CD set from unpacked installation files. As I don't have a CD-burner on any of my linux boxes, I created ISO images using

mkisofs -JR -l -o ship.db.iso Disk1/

and burned CDs on Windows machine.

2. Preparing your system

2.1 Steps to perform as root user

Install following fedora packages using rpm -ivh package_name:

From Fedora-core Disk 1:

setarch-1.0-1.i386.rpm

From Fedora-core Disk 2:

openmotif-2.2.2-16.1.i386.rpm

From Fedora-core Disk 3:

compat-libstdc++-7.3-2.96.118.i386.rpm

compat-db-4.0.14-2.i386.rpm

compat-gcc-7.3-2.96.118.i386.rpm

compat-libgcj-7.3-2.96.118.i386.rpm

compat-libstdc++-devel-7.3-2.96.118.i386.rpm

compat-libgcj-devel-7.3-2.96.118.i386.rpm

Now we have to make Oracle installer think that we have one of the supported distributions: Create a backup of your /etc/redhat-release file, an change its contents:

# cp /etc/redhat-release /etc/redhat-release.orig

# echo "Red Hat Enterprise Linux AS release 3 (Taroon)" > /etc/redhat-release

Change kernel parameters by adding the following lines in /etc/sysctl.conf:

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 = 32768 65000

Update kernel configuration:

[root@fedora root]# sysctl -e -p /etc/sysctl.conf

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

* soft nproc 2047

* hard nproc 16384

* soft nofile 1024

* hard nofile 65536

Add the following line to the /etc/pam.d/login file, if it does not already exist:

session required /lib/security/pam_limits.so

Create user and groups that will own oracle installation. In this exaple the username will be oracle:

[root@fedora]# groupadd oinstall

[root@fedora]# groupadd dba

[root@fedora]# useradd -g oinstall -G dba oracle

[root@fedora]# passwd oracle

Create directories in which oracle software will be installed. Oracle recommends OFA - Optimal Flexible Architecture (see oracle installation guide), but in this example everything will be installed under /home/oracle:

[root@fedora]# mkdir -p /home/oracle/product/10g

[root@fedora]# chown -R oracle.oinstall /home/oracle/*

2.2 Steps to perform as oracle user

Make gcc296 default compiler for user oracle by creating symbolic link. It is important that the directory containing the link (/home/oracle/bin) is listed in the PATH variable before /usr/bin.

[oracle@fedora oracle]$ mkdir /home/oracle/bin

[oracle@fedora oracle]$ cd /home/oracle/bin

[oracle@fedora bin]$ ln -s /usr/bin/gcc296 gcc

Put the following lines in oracle user .bash_profile

export ORACLE_BASE=/home/oracle

export ORACLE_HOME=/home/oracle/product/10g

export ORACLE_SID=orcl

export ORACLE_TERM=xterm

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

ulimit -u 16384 -n 65536

#

# change this NLS settings to suit your country:

# example:

# german_germany.we8iso8859p15, american_america.we8iso8859p1 etc.

#

export NLS_LANG='croatian_croatia.ee8iso8859p2'

Since I am from Croatia, I use Croatian national language support (NLS_LANG, NLS_DATE_LANGUAGE, NLS_SORT and NLS_DATE_FORMAT). You should set these variables to suit your needs.

Listing of valid Oracle NLS Data parameters including supported languages, territories and storage character sets can be found here.

In this example ORACLE_SID=orcl. You will be prompted by installer to specify SID and global database name, and you should replace the SID in .bash_profile with your own SID.

Update environment to include new variables:

[oracle@fedora]$ source /home/oracle/.bash_profile

Everything is now ready to start the oracle installer.

3. Running the installer

If you have Oracle 10g Database CD, login as root and mount it:

[root@fedora]# mount /mnt/cdrom

Oracle installer needs to be run from Xwindows, so start Xwindows and login as user oracle.

Make sure that your envionment is correctly set up:

[oracle@fedora oracle]$ set|grep ORACLE

ORACLE_BASE=/home/oracle

ORACLE_HOME=/home/oracle/product/10g

ORACLE_SID=orcl

ORACLE_TERM=xterm

[oracle@fedora oracle]$ gcc --version

2.96

Start the installer:

[oracle@fedora oracle]$ /mnt/cdrom/runInstaller

Note: if you get thew following error when running the installer from CD-ROM

bash: /mnt/cdrom/runInstaller: /bin/sh: bad interpreter: Permission denied

you should check how your CD-ROM was mounted. It should be mounted by user root, and the information about the filesystem in /etc/fstab sohuld look similar to this:

/dev/cdrom /mnt/cdrom auto exec,noauto,owner,kudzu,ro 0 0

Now the installer should be up and running.

4. Post-installation steps

First we want to change back the /etc/redhat-release file:

[root@fedora]# cp /etc/redhat-release.orig /etc/redhat-release

Next, modify the /etc/oratab file in order to use database startup and shutdown scripts provided by oracle. Find the line in /etc/oratab that looks similar to this:

*:/home/oracle/product/10g:N

Entries are of the form: $ORACLE_SID:$ORACLE_HOME:<N|Y>

Change the last field (N) to Y, and you will be able to start the database using dbstart utility.

4.1. Starting database services

Note: If you just installed Oracle, the database, TNS listener and enterprise manager are already running.

Start TNS Listener:

[oracle@fedora oracle]$ lsnrctl start

You can start the database via dbstart utility:

[oracle@fedora oracle]$ dbstart

or via SQL*Plus:

[oracle@fedora oracle]$ sqlplus / as sysdba

SQL*Plus: Release 10.1.0.2.0 - Production on Sat Feb 21 18:05:43 2004

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

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 188743680 bytes

Fixed Size 778036 bytes

Variable Size 162537676 bytes

Database Buffers 25165824 bytes

Redo Buffers 262144 bytes

Database mounted.

Database opened.

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 -

Production With the Partitioning, OLAP and Data Mining options

[oracle@fedora oracle]$

Start Enterprise manager server:

[oracle@fedora oracle]$ emctl start dbconsole

4.2. Stopping database services

Stop Enterprise manager server:

[oracle@fedora oracle]$ emctl stop dbconsole

You can stop the database via dbshut utility:

[oracle@fedora oracle]$ dbshut

or via SQL*Plus:

[oracle@fedora oracle]$ sqlplus / as sysdba

SQL*Plus: Release 10.1.0.2.0 - Production on Sat Feb 21 18:11:23 2004

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

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 -

Production With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 -

Production With the Partitioning, OLAP and Data Mining options

[oracle@fedora oracle]$

Stop TNS listener:

[oracle@fedora oracle]$ lsnrctl stop

4.3 Automating oracle startup and shutdown

To automatically start/shut oracle database during system startup/shutdown you need to write a script in /etc/rc.d/init.d directory. You can view or Download an example script.

Copy the script to /etc/rc.d/init.d as root user, edit environment variables to match your settings and modify its permissions:

[root@fedora root]# chown root.root /etc/rc.d/init.d/ora10

[root@fedora root]# chmod 755 /etc/rc.d/init.d/ora10

The script I wrote uses chkconfig utility to simplify service management. It is configured to start oracle services in runlevels 3 and 5,with start priority 95 and stop priority 1.

Initialize new service:

[root@fedora root]# chkconfig ora10 reset

[root@fedora root]# chkconfig --list ora10

ora10 0:off 1:off 2:off 3:on 4:off 5:on 6:off

Now oracle services will be automatically started when entering runlevels 3 and 5, and shut down when entering any other runlevel. For more information on chkconfig utility refer to its man page.

To manually start/stop oracle services you can use

[root@fedora root]# service ora10 start

and

[root@fedora root]# service ora10 stop

Hope this helps.

Denis.

Home -> oracle -> Oracle 10g release 1 (10.1.0.2) on Fedora core 1

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

HAPPYMENG

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有