下面不过多介绍,请阅读OEL6上安装Oracle 12c。
1、系统信息:1[root@12c ~]# uname -a2Linux 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:37:40 EST 2012 x86_64 x86_64 x86_64 GNU/Linux34[root@12c ~]# grep MemTotal /proc/meminfo5MemTotal: 3273192 kB67[root@12c ~]# grep SwapTotal /proc/meminfo8SwapTotal: 8285752 kB910[root@12c ~]# df -h11F ilesystem Size Used Avail Use% Mounted on12/dev/sda3 36G 3.8G 31G 12% /13/dev/sda1 99M 22M 72M 24% /boot14t mpfs 1.6G 0 1.6G 0% /dev/shm15/dev/sdb1 5.0G 5.0G 0 100% /usr/swap这里简单说明下,我安装的OEL5 SWAP空间仍然不够大,因此我就扩展了下,扩展方法:我在虚拟机新增一块儿5G的disk,启动后fdisk分区了下:1[root@12c ~]# fdisk -l234Disk /dev/sda: 42.9 GB, 42949672960 bytes5255 heads, 63 sectors/track, 5221 cylinders6Units = cylinders of 16065 * 512 = 8225280 bytes78 Device Boot Start End Blocks Id System9/dev/sda1 * 1 13 104391 83 Linux10/dev/sda2 14 421 3277260 82 Linux swap / Solaris 11/dev/sda3 422 5221 38556000 83 Linux1213D isk /dev/sdb: 5368 MB, 5368709120 bytes14255 heads, 63 sectors/track, 652 cylinders15U nits = cylinders of 16065 * 512 = 8225280 bytes1617 Device Boot Start End Blocks Id System18/dev/sdb1 1 652 5237158+ 83 Linuxext3格式化:1[root@12c ~]# mkfs.ext3 /dev/sdb12mke2fs 1.39 (29-May-2006)3Filesystem label=4OS type: Linux5Block size=4096 (log=2)6Fragment size=4096 (log=2)7655360 inodes, 1309289 blocks865464 blocks (5.00%) reserved for the super user9First data block=010M aximum filesystem blocks=13421772801140 block groups1232768 blocks per group, 32768 fragments per group1316384 inodes per group14S uperblock backups stored on blocks:15 32768, 98304, 163840, 229376, 294912, 819200, 8847361617W riting inode tables: done18C reating journal (32768 blocks): done19W riting superblocks and filesystem accounting information: done2021T his filesystem will be automatically checked every 31 mounts or22180 days, whichever comes first. Use tune2fs -c or -i to override.创建一个目录,准备将此文件系统挂载:1[root@12c ~]# mkdir /usr/swap2[root@12c ~]# mount /dev/sdb1 /usr/swap在/usr/swap下dd出5GB的空间1[root@12c ~]# dd if=/dev/zero of=/usr/swap/swapdisk bs=10240K count=5002dd: writing `/usr/swap/swapdisk': No space left on device3490+0 records in4489+0 records out55128712192 bytes (5.1 GB) copied, 33.1548 seconds, 155 MB/s创建新交换分区空间1[root@12c ~]# mkswap /usr/swap/swapdisk2Setting up swapspace version 1, size = 5128708 kB查看原先的分区空间1[root@12c ~]# free -m2 total used free shared buffers cached3Mem: 3196 2778 417 0 20 25024-/+ buffers/cache: 255 29415Swap: 3200 0 3200启动新增加的swaptest的交换空间1[root@12c ~]# swapon /usr/swap/swapdisk查看增加后的交换空间1[root@12c ~]# free -m2 total used free shared buffers cached3Mem: 3196 3146 49 0 8 28854-/+ buffers/cache: 252 29445Swap: 8091 0 8091将新增加交换分区空间添加进开机启动1[root@12c ~]# vi /etc/fstab2–添加一行3/dev/sdb1 /usr/swap ext3 defaults 0 0 4/usr/swap/swapdisk swap swap defaults 0 0 最后reboot重启验证安装rlwrap1[root@12c ~]# rpm -ivh /install/rlwrap-0.37-1.el5.x86_64.rpm2warning: /install/rlwrap-0.37-1.el5.x86_64.rpm: Header V3 DSA signature: NOKE Y, key ID 217521f63Preparing… ########################################### [100%] 4 1:rlwrap ########################################### [100%]修改/etc/hosts1[root@12c ~]# vi /etc/hosts2# Do not remove the following line, or various programs3# that require network functionality will fail.4127.0.0.1 localhost.localdomain localhost5::1 localhost6.localdomain6 localhost66192.168.80.139 12c配置yum源,这里我参考了,其中有如下内容:Getting Started1. Download and Install Oracle Linux2. Download and copy the appropriate yum configuration file in place, by running the following commands as root: Oracle Linux 4, Update 6 or Newer# cd /etc/yum.repos.d# mv Oracle-Base.repo Oracle-Base.repo.disabled# wget /public-yum-el4.repoOracle Linux 5# cd /etc/yum.repos.d# wget /public-yum-el5.repoOracle Linux 6# cd /etc/yum.repos.d# wget /public-yum-ol6.repoOracle VM 2# cd /etc/yum.repos.d# wget /public-yum-ovm2.repo3. Enable the appropriate repository by editing the yum configuration file○ Open the yum configuration file in a text editor○ Locate the section in the file for the repository you plan to update from, e.g. [el4_u6_base]○ Change enabled=0 to enabled=14. Begin using yum, for example:yum listyum install firefoxYou may be prompted to confirm the import of the Oracle OSS Group GPG key.首先下载linux 5 对应的yum配置文件1[root@12c ~]# cd /etc/yum.repos.d/2[root@12c yum.repos.d]# wget /public-yum-el5.repo 3–2013-06-27 10:16:02– /public-yum-el5.repo4Resolving … 137.254.56.435Connecting to |137.254.56.43|:80… connected.6HTTP request sent, awaiting response… 200 OK7Length: 4220 (4.1K) [text/plain]8Saving to: `public-yum-el5.repo'910100%[======================================================================== =======>] 4,220 11.8K/s in 0.4s11122013-06-27 10:16:03 (11.8 KB/s) – `public-yum-el5.repo' saved [4220/4220]配置文件中将enable全部启动,0改为1。