- 浏览: 497236 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (258)
- 0-中医 (83)
- 1-工作 (4)
- 2-生活 (17)
- 3-其他 (3)
- oracle_dev (5)
- oracle_dba (35)
- ebs_gl (1)
- ebs_ap (0)
- ebs_po (0)
- ebs_hr_people (0)
- ebs_hr_payroll (0)
- java (12)
- javaScript (7)
- JSP2.0 (4)
- springMVC (3)
- spring (4)
- iBatis (5)
- Hibernate (3)
- tomcat (2)
- linux (13)
- 网络 (3)
- python (25)
- Django (11)
- z-技术 (13)
- PHPCMS (0)
最新评论
-
bo521dai:
Bravo. contains everything.
Oracle调优总结 -
yangxiutian:
固态硬盘是什么东东,既然对硬件有约束,我想推广难啊,除非若干年 ...
未来操作系统(组图) -
showzh:
...
listener.ora 、sqlnet.ora 、tnsnames.ora的关系以及手工配置举例 -
489687009:
我特别想问一下楼主,现在有了框架后,jsp2.0还有用武之地吗 ...
JSP2.0入门 -
liuzl121:
你好 我刚学java,我想请教下这个SignonControl ...
log4j详尽配置实战(for spring)
Installing Oracle Database 10g Release 2 on Linux x86 (RHEL4 and SLES9 covered)
- 博客分类:
- oracle_dba
by John Smiley
Learn the basics of installing Oracle Database 10g Release 2 on Red Hat Enterprise Linux or Novell SUSE Enterprise Linux, from the bare metal up (for evaluation purposes only). Contents Updated December 2007 Click here for a version covering Oracle Database 11g on OEL5/RHEL5. The guide provides a walkthrough of installing an Oracle Database 10g Release 2 database on commodity hardware for the purpose of evaluation. If you are new to Linux and/or Oracle, this guide is for you. It starts with the basics and walks you through an installation of Oracle Database 10g Release 2 from the bare metal up. This guide will take the approach of offering the easiest paths, with the fewest number of steps for accomplishing a task. This approach often means making configuration choices that would be inappropriate for anything other than an evaluation. For that reason, this guide is not appropriate for building production-quality environments, nor does it reflect best practices. The Linux distributions certified for Oracle Database 10g Release 2 are: We will cover the RHEL4 and SLES9 distributions only here. Please note that as an alternative Novell offers the orarun package for installation of SLES9 and Oracle. To use that method instead of the one described here, refer to this Novell-supplied install guide. This guide is divided into four parts: Part I covers the installation of the Linux operating system, Part II covers configuring Linux for Oracle, Part III discusses the essentials of installing the Oracle Database, and Part IV covers creating additional filesystems and Automatic Storage Management (ASM)—a new storage option in Oracle Database 10g that greatly simplifies storage administration and management. The Appendix provides information to help you get started using your new database including how to access the database interactively and how to stop and start the database and related services. This guide assumes a server with the following hardware: Your hardware does not have to match this in order to use this guide. All that is necessary for a basic database install is a single CPU, 1024MB of RAM, and one disk drive (IDE, SCSI, or FireWire) with at least 7GB of free space. Now, let's walk through the process of installing the Linux operating system on a server. The instructions assume a fresh install of Linux (as opposed to an upgrade), that the server will be dedicated to Oracle, and that no other operating systems or data are on the server. Oracle Database 10g Release 2 is certified to run the base release of RHEL4 (Advanced Server and Enterprise Server) without updates. If you have update CDs, you can use the boot CD from the update instead of the boot CD from the base release to automatically apply all updates during the installation. All updates from Red Hat are supported by Oracle. The easiest and fastest way to apply the updates for a fresh install of Linux is to perform the install by using the update CDs. If Linux is already installed or you don't have the updates on CDs, they can be applied through RHN. Because this guide is designed for a fresh Linux install, you'll use the update CDs. (WARNING: Improperly partitioning a disk is one of the surest and fastest ways to wipe out everything on your hard disk. If you are unsure how to proceed, stop and get help, or you will risk losing data!) This guide uses the following partitioning scheme, with ext3 for each filesystem: Verifying Your Installation Required kernel version: 2.6.9-5.0.5.EL This kernel, or any of the kernels supplied in updates, works with Oracle Database 10g Release 2 . Check your kernel version by running the following command: Once you've completed the steps above, all of the packages required for Oracle Database 10g Release 2 will have been installed. Verify this using the example below. Oracle Database 10g Release 2 is certified to run on the base release of SLES9. Service Packs and package updates are available from Novell, either on CDs or online via its support portal. In this guide, we will install on the SLES9 base release. (WARNING: Improperly partitioning a disk is one of the surest and fastest ways to wipe out everything on your hard disk. If you are unsure how to proceed, stop and get help, or you will risk losing data!) This guide uses the following partitioning scheme, with ext3 for each filesystem: If you've completed the steps above, you should have all the packages and updates required for Oracle Database 10g Release 2. However, you can take the steps below to verify your installation. Required kernel version: 2.6.5-7.97 (or later) Check your kernel version by running the following command: Part II: Configuring Linux for Oracle Now that the Linux software is installed, you need to configure it for Oracle. This section walks through the steps required to configure Linux for Oracle Database 10g Release 2. To verify that your system meets the minimum requirements for an Oracle Database 10g Release 2 database, log in as root and run the commands below. The minimum RAM required is 1024MB, and the minimum required swap space is 1GB. Swap space should be twice the amount of RAM for systems with 2GB of RAM or less and between one and two times the amount of RAM for systems with more than 2GB. You also need 2.5GB of available disk space for the Oracle Database 10g Release 2 software and another 1.2GB for the database. The /tmp directory needs at least 400MB of free space. To check the available disk space on your system, run the following command: The example shows that the /tmp directory does not have its own filesystem. (It's part of the root filesystem for this guide.) With 5.2 GB available, the root filesystem has just enough space for the installation (2.5 + 1.2 + 0.4 = 4.1GB) with a little room left over. Create the Oracle Groups and User Account Next, create the Linux groups and user account that will be used to install and maintain the Oracle Database 10g Release 2 software. The user account will be called oracle, and the groups will be oinstall and dba. Execute the following commands as root: Set the password on the oracle account: Now create directories to store the Oracle Database 10g Release 2 software and the database files. This guide adheres to the Optimal Flexible Architecture (OFA) for the naming conventions used in creating the directory structure. For more information on OFA standards, see Appendix C of the Oracle Database Installation Guide 10g Release 2 (10.2) for Linux x86. The following assumes that the directories are being created in the root filesystem. This is done for the sake of simplicity and is not recommended as a general practice. These directories would normally be created as separate filesystems. Issue the following commands as root: Configuring the Linux Kernel Parameters The Linux kernel is a wonderful thing. Unlike most other *NIX systems, Linux allows modification of most kernel parameters while the system is up and running. There's no need to reboot the system after making kernel parameter changes. Oracle Database 10g Release 2 requires the kernel parameter settings shown below. The values given are minimums, so if your system uses a larger value, don't change it. If you're following along and have just installed Linux, the kernel parameters will all be at their default values and you can just cut and paste the following commands while logged in as root. Run the following commands as root to verify your settings: For Novell SUSE Linux releases, use the following to ensure that the system reads the /etc/sysctl.conf file at boot time: Setting Shell Limits for the oracle User Oracle recommends setting limits on the number of processes and open files each Linux account may use. To make these changes, cut and paste the following commands as root: For RHEL4, use the following: For SLES 9, use the following: Oracle Database 10g Release 2 can be downloaded from OTN. Oracle offers a development and testing license free of charge. However, no support is provided and the license does not permit production use. A full description of the license agreement is available on OTN. The easiest way to make the Oracle Database 10g Release 2 distribution media available on your server is to download them directly to the server. Use the graphical login to log in as oracle. Create a directory to contain the Oracle Database 10g Release 2 distribution: To download Oracle Database 10g Release 2 from OTN, point your browser (Firefox works well) tohttp://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linuxsoft.html. Fill out the Eligibility Export Restrictions page, and read the OTN License agreement. If you agree with the restrictions and the license agreement, click on I Accept. Click on the 10201_database_linux32.zip link, and save the file in the directory you created for this purpose (10gR2_db)—if you have not already logged in to OTN, you may be prompted to do so at this point. Unzip and extract the file: Install the Software and Create a Database Log in using the oracle account. Change directory to Disk1. Start the Oracle Universal Installer. The database we created in Part III used a single filesystem for disk storage. However, there are several other ways to configure storage for an Oracle database. Part IV explores other methods of configuring disk storage for a database. In particular, it describes creating additional filesystems and using Automatic Storage Management (ASM). Use of raw devices and Oracle Cluster File System (OCFS) is covered in the next article in this series which walks through installing Oracle RAC Database 10g Release 2 on Linux x86. Partition the Disks In order to use either file systems or ASM, you must have unused disk partitions available. This section describes how to create the partitions that will be used for new file systems and for ASM. WARNING: Improperly partitioning a disk is one of the surest and fastest ways to wipe out everything on your hard disk. If you are unsure how to proceed, stop and get help, or you will risk losing data. This example uses /dev/sdb (an empty SCSI disk with no existing partitions) to create a single partition for the entire disk (36 GB). Now verify the new partition: Repeat the above steps for each disk to be partitioned. The following section on Filesystems uses a single disk partition, /dev/sdb1. The ASM example uses three partitions on three disks: /dev/sdb1, /dev/sdc1, and /dev/sdd1 Filesystems are the most widely used means of storing data file, redo logs, and control files for Oracle databases. Filesystems are easy to implement and require no third-party software to administer. In most cases, filesystems are created during the initial installation of Linux. However, there are times when a new filesystem must be created after the initial installation, such as when a new disk drive is being installed. This section describes building a new filesystem and using it in an Oracle database. Unless otherwise noted, all commands must be run as root. Create the Filesystem Use ext3 to create this new filesystem. Other filesystems work just as well, but ext3 offers the fastest recovery time in the event of a system crash. Create the Mount Point A filesystem must have a mount point, which is simply an empty directory where the new filesystem "attaches" to the system's directory tree. Mount points should be given names consistent with the Oracle Flexible Architecture (OFA) standard. For more information on OFA standards, see Appendix C of the Oracle Database Installation Guide 10g Release 2 (10.2) for Linux x86. Because you have already created the /u01 directory in Part I, use /u02 for this example. Add the New Filesystem to /etc/fstab So that the new filesystem will be mounted automatically when the system boots, you need to add a line to the /etc/fstab file that describes the new filesystem and where to mount it. Add a line similar to the one below to /etc/fstab, using a text editor. Mount the New Filesystem Mounting the filesystem makes it available for use. Until the filesystem is mounted, files cannot be stored in it. Use the following commands to mount the filesystem and verify that it is available. Create Oracle Directories and Set Permissions Now you create a directory to store your Oracle files. The directory name used in the example follows the OFA standard naming convention for a database with ORACLE_SID=demo1. Create a New Tablespace in the New Filesystem The new filesystem is ready for use. Next you create a new tablespace in the filesystem to store your database objects. Connect to the database as the SYSTEM user, and execute theCREATE TABLESPACE statement, specifying the data file in the new filesystem. Now you can use the new tablespace to store database objects such as tables and indexes. ASM was a new storage option introduced with Oracle Database 10gR1 that provides the services of a filesystem, logical volume manager, and software RAID in a platform-independent manner. ASM can stripe and mirror your disks, allow disks to be added or removed while the database is under load, and automatically balance I/O to remove "hot spots." It also supports direct and asynchronous I/O and implements the Oracle Data Manager API (simplified I/O system call interface) introduced in Oracle9i. ASM is not a general-purpose filesystem and can be used only for Oracle data files, redo logs, and control files. Files in ASM can be created and named automatically by the database (by use of the Oracle Managed Files feature) or manually by the DBA. Because the files stored in ASM are not accessible to the operating system, the only way to perform backup and recovery operations on databases that use ASM files is through Recovery Manager (RMAN). ASM is implemented as a separate Oracle instance that must be up if other databases are to be able to access it. Memory requirements for ASM are light: only 64 MB for most systems. Installing ASM On Linux platforms, ASM can use raw devices or devices managed via the ASMLib interface. Oracle recommends ASMLib over raw devices for ease-of-use and performance reasons. ASMLib 2.0 is available for free download from OTN. This section walks through the process of configuring a simple ASM instance by using ASMLib 2.0 and building a database that uses ASM for disk storage. Determine Which Version of ASMLib You Need ASMLib 2.0 is delivered as a set of three Linux packages: First, determine which kernel you are using by logging in as root and running the following command: The example shows that this is a 2.6.9-22 kernel for an SMP (multiprocessor) box using Intel i686 CPUs. Use this information to find the correct ASMLib packages on OTN: Next, install the packages by executing the following command as root: Configuring ASMLib Before using ASMLib, you must run a configuration script to prepare the driver. Run the following command as root, and answer the prompts as shown in the example below. Next you tell the ASM driver which disks you want it to use. Oracle recommends that each disk contain a single partition for the entire disk. See Partitioning the Disks at the beginning of this section for an example of creating disk partitions. You mark disks for use by ASMLib by running the following command as root: Tip: Enter the DISK_NAME in UPPERCASE letters. Verify that ASMLib has marked the disks: Create the ASM Instance ASM runs as a separate Oracle instance which can be created and configured using the Oracle Universal Installer. Now that ASMLib is installed and the disks are marked for use, you can create an ASM instance. Log in as oracle and start runInstaller: Once the ASM instance has been created, create a database that uses ASM for storage: Log in as oracle and start runInstaller:
Overview
Part I: Installing Linux
RHEL4
SLES9
Part II: Configuring Linux for Oracle
Verify System Requirements
Create Directories
Create the Oracle Groups and User Account
Configure Linux Kernel Parameters
Set Shell Limits for the oracle User
Part III: Installing Oracle
Install the Software
Part IV: Configuring Storage
Filesystems
Automatic Storage Management
Conclusion
Appendix
Overview
Part I: Installing Linux
RHEL4
The 9GB disk on the first controller (/dev/sda) will hold all Linux and Oracle software and contains the following partitions:
- 100MB /boot partition
-1,500MB swap partition—Set this to at least twice the amount of RAM in the system but to no more than 2GB. (Thirty-two-bit systems do not support swap files larger than 2GB.) If you need more than 2GB of swap space, create multiple swap partitions.
-7,150MB root partition—This partition will be used for everything, including /usr, /tmp, /var, /opt, /home, and more. This approach is purely to simplify installation for the purposes of this guide. A more robust partitioning scheme would separate these directories onto separate filesystems.
uname -r
Ex:
# uname -r
2.6.9-22.ELsmp
To see which versions of these packages are installed on your system, run the following command:
openmotif21-2.1.30-11.RHEL4.2 (Required only to install Oracle demos. Installation of Oracle demos is not covered by this guide.)
rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \
gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21
Ex:
# rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \
> gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21
binutils-2.15.92.0.2-15
compat-db-4.1.25-9
control-center-2.8.0-12.rhel4.2
gcc-3.4.4-2
gcc-c++-3.4.4-2
glibc-2.3.4-2.13
glibc-common-2.3.4-2.13
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.4-2
libstdc++-devel-3.4.4-2
make-3.80-5
pdksh-5.2.14-30.3
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.9
libaio-0.3.103-3
openmotif21-2.1.30-11.RHEL4.4
SLES9
Verifying Your Installation
The 9GB disk on the first controller (/dev/sda) will hold all Linux and Oracle software and contains the following partitions:
- 100MB /boot partition
-1,500MB swap partition—Set this to at least twice the amount of RAM in the system but to no more than 2GB. (Thirty-two-bit systems do not support swap files larger than 2GB.) If you need more than 2GB of swap space, create multiple swap partitions.
-7,150MB root partition—this partition will be used for everything, including /usr, /tmp, /var, /opt, /home, and more. This approach is purely to simplify installation for the purposes of this guide. A more robust partitioning scheme would separate these directories onto separate filesystems.
- Basis Runtime System
- YaST
- Linux Tools
- Help & Support Documentation
- Graphical Base System
- GNOME System
- C/C++ Compiler and Tools
- Analyzing Tools
- Simple Webserver
- Authentication Server (NIS, LDAP, Kerberos)
uname -r
Ex:
# uname -r
2.6.5-7.97-smp
Other required package versions (or later):
To see which versions of these packages are installed on your system, run the following command as root:rpm -q binutils gcc gcc-c++ glibc gnome-libs libstdc++ libstdc++-devel make \
pdksh sysstat xscreensaver libaio
Ex:
# rpm -q binutils gcc gcc-c++ glibc gnome-libs libstdc++ libstdc++-devel make \
> pdksh sysstat xscreensaver libaio
binutils-2.15.90.0.1.1-32.10
gcc-3.3.3-43.34
gcc-c++-3.3.3-43.34
glibc-2.3.3-98.47
gnome-libs-1.4.1.7-671.1
libstdc++-3.3.3-43.34
libstdc++-devel-3.3.3-43.34
make-3.80-184.1
pdksh-5.2.14-780.7
sysstat-5.0.1-35.4
xscreensaver-4.16-2.6
libaio-0.3.102-1.2
If any of the package versions on your system are missing or the versions are earlier than those specified above, you can download and install the updates from the Novell SUSE Linux Portal.
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
Ex:
# grep MemTotal /proc/meminfo
MemTotal: 1034680 kB
# grep SwapTotal /proc/meminfo
SwapTotal: 1534196 kB
df -h
Ex:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 6.8G 1.3G 5.2G 20% /
/dev/sda1 99M 17M 77M 18% /boot
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle
Ex:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
# id oracle
uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)
passwd oracle
Ex:
# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
Ex:
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle
kernel.shmall = 2097152
kernel.shmmax = 536870912
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.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
cat >> /etc/sysctl.conf <<EOF
kernel.shmall = 2097152
kernel.shmmax = 536870912
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.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
EOF
/sbin/sysctl -p
Ex:
# cat >> /etc/sysctl.conf <<EOF
> kernel.shmall = 2097152
> kernel.shmmax = 536870912
> kernel.shmmni = 4096
> kernel.sem = 250 32000 100 128
> fs.file-max = 65536
> net.ipv4.ip_local_port_range = 1024 65000
> EOF
# /sbin/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
kernel.shmall = 2097152
kernel.shmmax = 536870912
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.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
/sbin/sysctl -a | grep shm
/sbin/sysctl -a | grep sem
/sbin/sysctl -a | grep file-max
/sbin/sysctl -a | grep ip_local_port_range
/sbin/sysctl -a | grep rmem_default
/sbin/sysctl -a | grep rmem_max
/sbin/sysctl -a | grep wmem_default
/sbin/sysctl -a | grep wmem_max
Ex:
# /sbin/sysctl -a | grep shm
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shm-use-bigpages = 0
# /sbin/sysctl -a | grep sem
kernel.sem = 250 32000 100 128
# /sbin/sysctl -a | grep file-max
fs.file-max = 65536
# /sbin/sysctl -a | grep ip_local_port_range
net.ipv4.ip_local_port_range = 1024 65000
# /sbin/sysctl -a | grep rmem_default
net.core.rmem_default = 262144
# /sbin/sysctl -a | grep rmem_max
net.core.rmem_max = 262144
# /sbin/sysctl -a | grep wmem_default
net.core.wmem_default = 262144
# /sbin/sysctl -a | grep wmem_max
net.core.wmem_max = 262144
/sbin/chkconfig boot.sysctl on
cat >> /etc/security/limits.conf <<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> /etc/pam.d/login <<EOF
session required /lib/security/pam_limits.so
EOF
cat >> /etc/profile <<EOF
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF
cat >> /etc/csh.login <<EOF
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF
cat >> /etc/profile.local <<EOF
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF
cat >> /etc/csh.login.local <<EOF
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF
Part III: Installing Oracle
mkdir 10gR2_db
cd 10gR2_db
unzip 10201_database_linux32.zip
Ex:
$ cd $HOME/10gR2_db
Ex:
$ cd database
$ ./runInstaller
Part IV: Configuring Storage
Ex:
# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 4427.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 255 heads, 63 sectors, 4427 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-4427, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-4427, default 4427):
Using default value 4427
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
Ex:
# fdisk -l /dev/sdb
Disk /dev/sdb: 36.4 GB, 36420075008 bytes
255 heads, 63 sectors/track, 4427 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 4427 35559846 83 Linux
Ex:
# mke2fs -j /dev/sdb1
mke2fs 1.26 (3-Feb-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
4447744 inodes, 8889961 blocks
444498 blocks (5.00%) reserved for the super user
First data block=0
272 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,
2654208, 4096000, 7962624
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Ex:
# mkdir /u02
/dev/sdb1 /u02 ext3 defaults 1 1
mount /u02
df -h /u02
Ex:
# mount /u02
# df -h /u02
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 33G 33M 31G 1% /u02
mkdir -p /u02/oradata/demo1
chown -R oracle:oinstall /u02/oradata
chmod -R 775 /u02/oradata
Ex:
$ sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Nov 27 15:50:50 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name: system
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create tablespace data1
2 datafile '/u02/oradata/demo1/data1_01.dbf' size 100m
3 extent management local
4 segment space management auto;
Tablespace created.
Ex:
SQL> create table demotab (id number(5) not null primary key,
2 name varchar2(50) not null,
3 amount number(9,2))
4 tablespace data1;
Table created.
Automatic Storage Management (ASM)
Each Linux distribution has its own set of ASMLib 2.0 packages, and within each distribution, each kernel version has a corresponding oracleasm package. The following paragraphs describe how to determine which set of packages you need.
uname -rm
Ex:
# uname -rm
2.6.9-22.ELsmp i686
rpm -Uvh oracleasm-kernel_version-asmlib_version.cpu_type.rpm \
oracleasmlib-asmlib_version.cpu_type.rpm \
oracleasm-support-asmlib_version.cpu_type.rpm
Ex:
# rpm -Uvh \
> oracleasm-2.6.9-22.ELsmp-2.0.0-1.i686.rpm \
> oracleasmlib-2.0.1-1.i386.rpm \
> oracleasm-support-2.0.1-1.i386.rpm
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.9-22.ELsm########################################### [ 67%]
3:oracleasmlib ########################################### [100%]
# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Creating /dev/oracleasm mount point: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
/etc/init.d/oracleasm createdisk DISK_NAME device_name
Ex:
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk "/dev/sdc1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdd1
Marking disk "/dev/sdd1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
$ ./runInstaller
OraDB10gASM
Note:Oracle recommends using a different ORACLE_HOME for ASM than the ORACLE_HOME used for the database for ease of administration.
- High mirrors data twice.
- Normal mirrors data once. This is the default.
- External does not mirror data within ASM. This is typically used if an external RAID array is providing redundancy.
The disks you configured for use with ASMLib are listed as Candidate Disks. Select each disk you wish to include in the disk group.
Create the Database$ ./runInstaller
OraDb10g_home1
Note:Oracle recommends using a different ORACLE_HOME for the database than the ORACLE_HOME used for ASM.
发表评论
-
ORACLE 9I UNDO Tablespace
2010-05-13 09:20 1489(9i以前称为Rollback segment;9i称为Und ... -
Archive Log 学习笔记 --oracle 数据库
2010-02-22 14:35 1571一、归档的启用,停用和自动归档 1、启用和停用archi ... -
exp和imp 用法和介绍 --oracle数据库
2010-02-22 13:51 3209EXP导出范例: E:\software>D:\ora ... -
深入理解user和schema --oracle 数据库
2010-02-22 11:39 2567前言: user是控制权限 ... -
Oracle数据库中快照snapshot的使用
2010-02-22 10:57 3233oracle数据库的快照是一个表,它包含有对一个本地或远程数 ... -
Oracle Audit 功能的使用方法介绍
2010-02-22 10:45 5345一. 视图说明: 1. SYS.AUD$ 审计功能的底层视图, ... -
ORACLE EXPLAIN PLAN的总结
2010-02-22 09:29 2066在ORACLE数据库中,需要对SQL语句进行优化的话需要知道其 ... -
oracle常用命令
2010-01-20 16:09 1832一、ORACLE的启动和关闭 ... -
oracle em(Enterprise Manager) 收集贴
2009-12-11 13:56 3327em配置命令 ======================== ... -
ORACLE 簇的详细介绍
2009-12-11 11:35 13861. 什么是聚簇 聚簇是根据码值找到数据的物理存储位置 ... -
Oracle_体系架构_后台进程及从进程详解
2009-12-11 11:23 1482后台进程包括: 1)Focused Background P ... -
动态性能表V$sysstat
2009-09-18 13:54 924from: http://oracledba.iteye.co ... -
Linux下oracle常见安装错误总结
2009-08-06 14:37 2523from: http://home.ixpub.net/spa ... -
在RedHat 5下安装Oracle 10g详解
2009-08-06 13:37 7853方案一: 作者:Roc 说明:根据网上很多文档的学习,结合本人 ... -
Oracle9i rman备份恢复总结
2009-06-30 09:23 1832Recovery Manager(RMAN)是一种用于备份( ... -
Oracle使用回闪找回删除的数据
2009-05-15 13:11 2711如果不小心删除了oracle表中不应该删除的数据,这时候又想找 ... -
Oracle面试题集锦-技术篇
2009-05-15 12:32 25971. 解释冷备份和热备份的不同点以及各自的优点 解答:热 ... -
oracle 配置文件 解析
2009-05-13 10:39 1551Oracle主要配置文件: ... -
listener.ora 、sqlnet.ora 、tnsnames.ora的关系以及手工配置举例
2009-05-13 09:56 20798解决问题:TNS或者数据库不能登录。 最简单有效方法:使用or ... -
Oracle备份与恢复案例(By Piner)
2009-05-12 17:11 1569一. 理解什么是数据库 ...
相关推荐
### 安装Oracle RAC 10g Release 2于Linux x86(中)的知识点解析 #### 概览与背景 Oracle Database 10g Release 2 RAC(Real Application Clusters)的安装流程旨在指导新手及有经验的用户在Linux环境下部署RAC...
Oracle Database 11g Release 2 (11.2.0.3) RAC On Oracle Linux 6.3 Using VirtualBox This article describes the installation of Oracle Database 11g release 2 (11.2.0.3 64-bit) RAC on Linux (Oracle Linux ...
在本文中,我们将深入探讨如何在Linux环境下安装Oracle Database 11g,这是一个重要的数据库管理系统,广泛用于企业级数据存储和处理。Oracle 11g提供了高性能、高可用性和安全性,使其成为许多组织的核心数据库解决...
本文档详细介绍了在Red Hat Enterprise Linux(RHEL)5和Oracle Enterprise Linux(OEL)5(x86_64架构)上安装Oracle 10g Release 2数据库的具体要求。这些要求包括硬件配置、内核版本、以及必要的系统设置等关键...
安装Oracle Database 10g在Sun Solaris 10操作系统上是一个技术性较强的步骤,"Installing Oracle Database 10 g on Sun Solaris 10 by Using RC"文档会详细指导这一过程。这通常包括硬件和软件需求分析、操作系统...
在本文中,我们将深入探讨如何在Linux x86平台上安装Oracle RAC 10g Release 2。这个过程适用于评估目的,旨在为初次接触Linux和/或Oracle的用户提供基础指导。我们将逐步介绍从零开始安装Oracle RAC软件的整个过程...
本指南详细介绍了如何在Red Hat Enterprise Linux (RHEL) 5.4上安装并配置Oracle Enterprise Manager (EM) Grid Control 10.2.0.5版本,同时适用于Oracle Database 11g Release 2 (11gR2)。该文档不仅包含了...
2. **操作系统版本**:选择一个稳定且支持Oracle 10G的Linux发行版,如Red Hat Enterprise Linux或Oracle Linux 5.x/6.x。 3. **软件准备**:确保系统上安装了必要的软件包,如GCC编译器、Perl、Kerberos、NFS...
标题《Installing Oracle 11g Release 2 Enterprise Edition》和描述中提到的内容,强调的是安装Oracle 11g R2 EE版数据库软件的过程和注意事项。在这个过程中,首先需要了解的是,官方不推荐在生产环境中使用Oracle...
从压缩包文件`Installing Oracle9i on RedHat Linux 7_2, 7_3, 8_0, 9, AS 2_1, 3_0 (Red Hat Enterprise Advanced Server 3 - RHEL AS 3) (Oracle database installation, install Oracle software).htm`中,我们...
2 Installing your Oracle Software 3 Creating an Oracle Database Using DBCA 4 Managing the Database instance 5 Managing the ASM Instance 6 Configuring the Oracle Network Environment 7 Managing ...
- Requirements for Installing Oracle 11g R2 RDBMS on RHEL (and OEL) 5 on AMD64/EM64T。 #### 三、Oracle 11g的安装 1. **安装流程**: - 运行Oracle Database安装程序。 - 配置单点登录(Single Sign-On)...
在深入探讨如何逐步安装Oracle RAC 11gR2于Linux系统上的过程中,我们首先应当理解该版本中引入的一些新概念与特性,这将有助于更有效地进行部署和管理。 ### 1. 新概念概览 #### 1.1 SCAN(Single Client Access ...
《Oracle Database 10g OCM Exam Preparation Workshop Student Guide Volume 1》是Oracle官方为准备OCM(Oracle Certified Master)认证考试的专业人士提供的一份详尽的培训资料。该资料聚焦于Oracle Database 10g...
本教程将详述如何在Red Hat Linux操作系统上安装Oracle 9i,这对于那些需要在Linux环境下搭建Oracle数据库的IT专业人士来说是极具价值的。 首先,了解Oracle 9i的基本信息是必要的。Oracle 9i是Oracle公司推出的第9...
2 Installing your Oracle Software 3 Creating an Oracle Database Using DBCA 4 Managing the Database instance 5 Managing the ASM Instance 6 Configuring the Oracle Network Environment 7 Managing ...
2 Installing your Oracle Software 3 Creating an Oracle Database Using DBCA 4 Managing the Database instance 5 Managing the ASM Instance 6 Configuring the Oracle Network Environment 7 Managing ...
《在Linux环境下安装Oracle 10g的详细指南》 Oracle 10g是一款功能强大的关系型数据库管理系统,尤其在企业级应用中广泛使用。在Linux操作系统上安装Oracle 10g,不仅可以充分利用Linux的稳定性,还能享受到开源...