遠程安裝實施時,如何配置遠程服務器的本地yum安裝源
overview
1.使用 ftp 將OracleLinux-R5-U8-Server-x86_64-dvd.iso 上傳到 /home 目錄下。再使用 mount 命令掛載鏡像。
mount/home/OracleLinux-R5-U8-Server-x86_64-dvd.iso /media -o loop
2.確認xx.iso已經在/media 下。
cd /media ll
3.編輯yum配置文件:
vi /etc/yum.repos.d/oel-media.repo
[oel-media]
name= oel 5.8
baseurl=file:///media/Server
enabled=1
gpgcheck=0
4.清除yum緩存,使用yuminstall自動安裝軟件
yum clean all
yum install oracle-validated
FYI:
以下案例為使用oracle linux 自帶的 oracle-validated-rpm 自動配置oracle linux的安裝環境。
[root@lixora home]# ll
total 6884764
-rw-r--r-- 1 root root 801603584 Jun 28 06:39 10201_database_linux_x86_64.cpio
-rw-r--r-- 1 root root 3884036096 Jun 2807:06 OracleLinux-R5-U8-Server-x86_64-dvd.iso
-rw-r--r-- 1 root root 1307536871 Jun 2806:50 p10098816_112020_Linux-x86-64_1of7.zip
-rw-r--r-- 1 root root 1049912579 Jun 2806:49 p10098816_112020_Linux-x86-64_2of7.zip
掛載鏡像
[root@lixora home]# mount/home/OracleLinux-R5-U8-Server-x86_64-dvd.iso /media -o loop
[root@lixora home]# cd /media
[root@lixora media]# ll
total 732
-rw-r--r-- 1 root root 5165 Feb 29 2012 blafdoc.css
drwxr-xr-x 3 root root 2048 Feb 29 2012 Cluster
drwxr-xr-x 3 root root 4096 Feb 29 2012 ClusterStorage
-rw-r--r-- 1 root root 6830 Feb 29 2012 EULA
-rw-r--r-- 1 root root 7041 Feb 29 2012 eula.en_US
-rw-r--r-- 1 root root 3334 Feb 29 2012 eula.py
-rw-r--r-- 1 root root 18390 Feb 29 2012 GPL
drwxr-xr-x 4 root root 2048 Feb 29 2012 images
drwxr-xr-x 2 root root 2048 Feb 29 2012 isolinux
-rw-r--r-- 1 root root 3547 Feb 29 2012 README-en
-rw-r--r-- 1 root root 7897 Feb 29 2012 README-en.html
-rw-r--r-- 1 root root 35456 Feb 29 2012 RELEASE-NOTES-en
-rw-r--r-- 1 root root 38444 Feb 29 2012 RELEASE-NOTES-en.html
-rw-r--r-- 1 root root 1397 Feb 29 2012 RPM-GPG-KEY
-rw-r--r-- 1 root root 1397 Feb 29 2012 RPM-GPG-KEY-oracle
drwxr-xr-x 4 root root 593920 Feb 29 2012 Server
-rw-r--r-- 1 root root 105Feb 29 2012 supportinfo
-r--r--r-- 1 root root 4436 Feb 29 2012 TRANS.TBL
drwxr-xr-x 3 root root 8192 Feb 29 2012 VT
[root@lixora media]# pwd
/media
[root@lixora media]# vi/etc/yum.repos.d/oel-media.repo
[oel-media]
name= oel 5.8
baseurl=file:///media/Server
enabled=1
gpgcheck=0
"/etc/yum.repos.d/oel-media.repo"[New] 6L, 77C written
確認無誤
[root@lixora media]# more/etc/yum.repos.d/oel-media.repo
[oel-media]
name= oel 5.8
baseurl=file:///media/Server
enabled=1
gpgcheck=0
開始安裝 oracle-validated-rpm
[root@lixora media]# yum clean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
[root@lixora media]# yum installoracle-validated
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
oel-media | 1.1 kB
00:00
oel-media/primary | 1.4MB
00:00
oel-media
3298/3298
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-validated.x86_640:1.1.0-15.el5 set to be updated
oel-media/filelists | 3.1MB
00:00
--> Processing Dependency: sysstat forpackage: oracle-validated
--> Processing Dependency:/usr/lib/libaio.so for package: oracle-
validated
--> Processing Dependency: glibc-headersfor package: oracle-validated
--> Processing Dependency:elfutils-libelf-devel for package: oracle-
validated
--> Processing Dependency:unixODBC-devel for package: oracle-
validated
--> Processing Dependency:/usr/lib64/libodbccr.so for package:
oracle-validated
--> Processing Dependency: gcc-c++ forpackage: oracle-validated
--> Processing Dependency: libaio-develfor package: oracle-validated
--> Processing Dependency: gcc forpackage: oracle-validated
--> Processing Dependency:/usr/lib/gcc/x86_64-redhat-
linux/4.1.1/libstdc++.a for package:oracle-validated
--> Processing Dependency:/usr/lib/libc.so for package: oracle-
validated
--> Processing Dependency:/usr/lib64/libaio.so for package: oracle-
validated
--> Processing Dependency:/usr/lib64/libc.so for package: oracle-
validated
--> Processing Dependency: /usr/lib/libodbccr.sofor package: oracle-
validated
--> Processing Dependency: libXp.so.6for package: oracle-validated
--> Running transaction check
---> Packageelfutils-libelf-devel.x86_64 0:0.137-3.el5 set to be
updated
--> Processing Dependency: elfutils-libelf-devel-static-x86_64=
0.137-3.el5 for package:elfutils-libelf-devel
---> Package gcc.x86_64 0:4.1.2-52.el5set to be updated
---> Package gcc-c++.x86_640:4.1.2-52.el5 set to be updated
---> Package glibc-devel.i386 0:2.5-81set to be updated
---> Package glibc-devel.x86_64 0:2.5-81set to be updated
---> Package glibc-headers.x86_640:2.5-81 set to be updated
--> Processing Dependency:kernel-headers >= 2.2.1 for package:
glibc-headers
--> Processing Dependency:kernel-headers for package: glibc-headers
---> Package libXp.i386 0:1.0.0-8.1.el5set to be updated
---> Package libaio-devel.i3860:0.3.106-5 set to be updated
---> Package libaio-devel.x86_640:0.3.106-5 set to be updated
---> Package libstdc++-devel.x86_640:4.1.2-52.el5 set to be updated
---> Package sysstat.x86_640:7.0.2-11.el5 set to be updated
---> Package unixODBC-devel.i3860:2.2.11-10.el5 set to be updated
---> Package unixODBC-devel.x86_640:2.2.11-10.el5 set to be updated
--> Running transaction check
---> Packageelfutils-libelf-devel-static.x86_64 0:0.137-3.el5 set to
be updated
---> Package kernel-headers.x86_640:2.6.18-308.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
======================================================================
==========
Installing:
oracle-validated x86_64 1.1.0-15.el5 oel-media 24 k
Installing for dependencies:
elfutils-libelf-devel x86_64 0.137-3.el5 oel-media 24 k
elfutils-libelf-devel-static x86_64 0.137-3.el5 oel-media 64 k
gcc x86_64 4.1.2-52.el5 oel-media 5.3 M
gcc-c++ x86_64 4.1.2-52.el5 oel-media 3.8 M
glibc-devel i386 2.5-81 oel-media 2.0 M
glibc-devel x86_64 2.5-81 oel-media 2.4 M
glibc-headers x86_64 2.5-81 oel-media 596 k
kernel-headers x86_64 2.6.18-308.el5 oel-media 1.4 M
libXp i386 1.0.0-8.1.el5 oel-media 22 k
libaio-devel i386 0.3.106-5 oel-media 12 k
libaio-devel x86_64 0.3.106-5 oel-media 11 k
libstdc++-devel x86_64 4.1.2-52.el5 oel-media 2.8 M
sysstat x86_64 7.0.2-11.el5 oel-media 187 k
unixODBC-devel i386 2.2.11-10.el5 oel-media 38 k
unixODBC-devel x86_64 2.2.11-10.el5 oel-media 793 k
Transaction Summary
================================================================================
Install 16 Package(s)
Upgrade 0 Package(s)
Total download size: 20 M
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total 433MB/s | 20 MB
00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing :libstdc++-devel 1/16
Installing : sysstat 2/16
Installing : libaio-devel 3/16
Installing :unixODBC-devel 5/16
Installing :kernel-headers 6/16
Installing :glibc-headers 7/16
Installing : glibc-devel 8/16
Installing : glibc-devel 9/16
Installing : libaio-devel 10/16
Installing : libXp 11/16
Installing : gcc 12/16
Installing : gcc-c++ 13/16
Installing :elfutils-libelf-devel 14/16
Installing :oracle-validated 15/16
Installing :elfutils-libelf-devel-static 16/16
Installed:
oracle-validated.x86_64 0:1.1.0-15.el5
Dependency Installed:
elfutils-libelf-devel.x86_64 0:0.137-3.el5 elfutils-libelf-devel-static.x86_640:0.137-3.el5 gcc.x86_64 0:4.1.2-52.el5
gcc-c++.x86_64 0:4.1.2-52.el5 glibc-devel.i386 0:2.5-81 glibc-devel.x86_64 0:2.5-81
glibc-headers.x86_64 0:2.5-81 kernel-headers.x86_64 0:2.6.18-308.el5 libXp.i3860:1.0.0-8.1.el5
libaio-devel.i386 0:0.3.106-5 libaio-devel.x86_64 0:0.3.106-5 libstdc++-devel.x86_64 0:4.1.2-52.el5
sysstat.x86_64 0:7.0.2-11.el5 unixODBC-devel.i386 0:2.2.11-10.el5 unixODBC-evel.x86_64 0:2.2.11-10.el5
Complete!
到此oracle-validate-rpm 已全部安裝完,已經為我們做好了一切裝備。
[root@lixora media]# id oracle
uid=54321(oracle) gid=54321(oinstall)groups=54321(oinstall),54322(dba)
[root@lixora media]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionaryword
Retype new UNIX password:
passwd: all authentication tokens updatedsuccessfully.
[root@lixora media]#