yum setup ON RHEL5.4(local)

The planform summary
[root@rhel ~]# uname -a
Linux rhel.com 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux
[root@rhel ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
[root@rhel ~]#
[root@rhel ~]# more /proc/meminfo
MemTotal:             515348 kB
MemFree:                 13460 kB
Buffers:                 10668 kB
Cached:                 374592 kB
SwapCached:                    0 kB
Active:                 216972 kB
Inactive:             260924 kB
HighTotal:                     0 kB
HighFree:                        0 kB
LowTotal:             515348 kB
LowFree:                 13460 kB
SwapTotal:         1052248 kB
SwapFree:            1052160 kB
Dirty:                             8 kB
Writeback:                     0 kB
AnonPages:             92636 kB
Mapped:                    38912 kB
Slab:                        16084 kB
PageTables:             3232 kB
NFS_Unstable:                0 kB
Bounce:                            0 kB
CommitLimit:     1309920 kB
Committed_AS:     374796 kB
VmallocTotal:     507896 kB
VmallocUsed:            3664 kB
VmallocChunk:     504064 kB
HugePages_Total:         0
HugePages_Free:            0
HugePages_Rsvd:            0
Hugepagesize:         4096 kB
[root@rhel ~]# more /proc/cpuinfo
processor  : 0
vendor_id  : GenuineIntel
cpu family  : 6
model    : 23
model name  : Intel(R) Core(TM)2 Duo CPU         P8400    @ 2.26GHz
stepping  : 6
cpu MHz    : 2261.832
cache size  : 6144 KB
fdiv_bug  : no
hlt_bug    : no
f00f_bug  : no
coma_bug  : no
fpu    : yes
fpu_exception  : yes
cpuid level  : 5
wp    : yes
flags    : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 nx constant_tsc up pni monitor
bogomips  : 4523.66

[root@rhel ~]#
1)make a resource place.
cp /media/RHEL_5.4 i386 DVD/Server/* /opt/soft/Server/            
----copy all rpm packages and files to /opt/soft/Server/
2)configure a config file as the core file,such as backup.repo
Directory:/etc/yum.repos.d
vi backup.repo
[backup]                 ----as you like
name=backup.server         -----as you like
baseurl=file:///opt/soft/Server         ----the software's location
enabled=1                                                    ----enable 1,disable 0
gpgcheck=1                                                 ----check the new packages of resource check or not.1 is means check,0 is not.
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
3)refresh the CA
rpm -- import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
4)install the createrepo package
cd /opt/soft/Server
rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
5)refresh the repo's relationship
createrepo .
6)confirm
yum install gcc
[root@rhel Server]# yum install gcc
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.i386 0:4.1.2-46.el5 set to be updated
--> Processing Dependency: libgomp >= 4.1.2-46.el5 for package: gcc
--> Running transaction check
---> Package libgomp.i386 0:4.4.0-6.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================
Package                                                                    Arch                                                                    Version                                                                                 Repository                                                                        Size
===================================================================================================================================================================================
Installing:
gcc                                                                            i386                                                                    4.1.2-46.el5                                                                        rhel-source                                                                    5.2 M
Installing for dependencies:
libgomp                                                                    i386                                                                    4.4.0-6.el5                                                                         rhel-source                                                                     70 k

Transaction Summary
===================================================================================================================================================================================
Install            2 Package(s)                
Update             0 Package(s)                
Remove             0 Package(s)                

Total download size: 5.3 M
Is this ok [y/N]: y
Downloading Packages:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                                                                            1.8 GB/s | 5.3 MB         00:00        
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
    Installing         : libgomp                                                                                                                                                                                                                                                                                                         1/2
    Installing         : gcc                                                                                                                                                                                                                                                                                                                 2/2

Installed:
    gcc.i386 0:4.1.2-46.el5                                                                                                                                                                                                                                                                                                                    

Dependency Installed:
    libgomp.i386 0:4.4.0-6.el5                                                                                                                                                                                                                                                                                                            

Complete!
[root@rhel Server]#
7)Summary
if no step 4,you'll get this
[root@rhel Server]# yum install gcc
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
rhel-source                                                                                                                                                                                                                                                                                                 |    951 B         00:00        
rhel-source/primary                                                                                                                                                                                                                                                                                 | 808 kB         00:00        
rhel-source                                                                                                                                                                                                                                                                                                                            2292/2292
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.i386 0:4.1.2-46.el5 set to be updated
--> Processing Dependency: libgomp >= 4.1.2-46.el5 for package: gcc
--> Running transaction check
---> Package libgomp.i386 0:4.4.0-6.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================
Package                                                                    Arch                                                                    Version                                                                                 Repository                                                                        Size
===================================================================================================================================================================================
Installing:
gcc                                                                            i386                                                                    4.1.2-46.el5                                                                        rhel-source                                                                    5.2 M
Installing for dependencies:
libgomp                                                                    i386                                                                    4.4.0-6.el5                                                                         rhel-source                                                                     70 k

Transaction Summary
===================================================================================================================================================================================
Install            2 Package(s)                
Update             0 Package(s)                
Remove             0 Package(s)                

Total download size: 5.3 M
Is this ok [y/N]: y        
Downloading Packages:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                                                                            1.3 GB/s | 5.3 MB         00:00        
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 37017186


Public key for libgomp-4.4.0-6.el5.i386.rpm is not installed
[root@rhel Server]#

你可能感兴趣的:(yum)