使用oracle linux 4.8安装oracle 10g rac时需要安装许多依赖包,一个一个比较麻烦.搭建个本地源比较简单,比以往的的oracle linux 5和6都要复杂一些.
1.下载安装createrepo软件
[[email protected] ~]# rpm -ivh createrepo-0.4.6-1.el4.rf.noarch.rpm
[[email protected] ~]# mkdir /mnt/cdrom/
[[email protected] ~]# mount /dev/hdc /mnt/cdrom/
mount: block device /dev/hdc is write-protected, mounting read-only
[[email protected] ~]# cd /mnt/
[[email protected] mnt]# createrepo ./
[[email protected] mnt]# ll
total 12
dr-xr-xr-x 6 root root 4096 May 21 2009 cdrom
drwxr-xr-x 2 root root 4096 Nov 12 18:32 hgfs
drwxr-xr-x 2 root root 4096 Nov 12 18:18 repodata
[[email protected] mnt]#
2.配置yum源文件
[[email protected] ~]# vim /etc/yum.repos.d/tong.repo
[tong]
name=tong
baseurl=file:///mnt
gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-oracle
gpgcheck=0
enabled=1
[[email protected] ~]#
3.检查和安装软件
[[email protected] ~]# yum list
[[email protected] ~]# yum install gcc -y