基于FTP的YUM安装过程
原创
©著作权归作者所有:来自51CTO博客作者xinerwener的原创作品,请联系作者获取转载授权,否则将追究法律责任
注:他跟本地YUM的最大区别是: 分服务器和客户端。同一个网络里的客户端可以在服务器上下载安装软件包。
服务器端的安装过程:
1、配置IP地址
[root@localhost /]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0c:29:26:05:59
ONBOOT=yes
IPADDR=1.1.1.1
NETMASK=255.255.255.0
GATEWAY=1.1.1.254
BOOTPROTO=none
TYPE=Ethernet
2、重启网卡echo和回环接口
[root@localhost /]# ifdown eth0
[root@localhost /]# ifup eth0
[root@localhost /]# ifup lo
3、查看配置好的网卡信息
[root@localhost /]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:26:05:59
inet addr:1.1.1.1 Bcast:1.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe26:559/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:12344 (12.0 KiB)
Interrupt:59 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:900 (900.0 b) TX bytes:900 (900.0 b)
4、挂载光盘
[root@localhost /]# mount -t iso9660 -o loop /dev/cdrom /media
[root@localhost /]#
5、安装FTP服务
[root@localhost /]# rpm -ivh /media/Server/vsftpd-2.0.5-16.el5_4.1.i386.rpm
error: failed to stat /media/RHEL_5.5 i386 DVD: 没有那个文件或目录
Preparing... ########################################### [100%]
1:vsftpd ########################################### [100%]
6、将光盘中的内容复制到FTP的默认共享目录(因目录内容较多,这里时间比较长)
[root@localhost /]# cp -rf /media/* /var/ftp/pub
7、将验证文件复制到Pub目录下
[root@localhost /]# cp /var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml /var/ftp/pub/
8、配置YUM 主配置文件
[Server]
name=Server
baseurl=ftp://pub/Server
enabled=1
gpgcheck=0
[VT]
name=VT
baseurl=ftp://1.1.1.1/pub/Cluster
enabled=1
gpgcheck=0
[Cluster]
name=Cluster
baseurl=ftp://1.1.1.1/pub/Cluster
enabled=1
gpgcheck=0
[ClusterStorage]
name=ClusterStorage
baseurl=ftp://1.1.1.1/pub/ClusterStorage
enabled=1
gpgcheck=0
-- 插入 --
9、重启FTP服务
[root@localhost /]# service vsftpd restart
关闭 vsftpd: [失败]
为 vsftpd 启动 vsftpd: [确定]
10、安装完成
[root@localhost /]# yum grouplist
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Group Process
Cluster | 1.3 kB 00:00
ClusterStorage | 1.3 kB 00:00
Server | 1.3 kB 00:00
Server/primary | 753 kB 00:00
VT | 1.3 kB 00:00
VT/primary | 6.5 kB 00:00
Cluster/group | 101 kB 00:00
ClusterStorage/group | 105 kB 00:00
Server/group | 1.0 MB 00:00
VT/group | 101 kB 00:00
Installed Groups:
FTP 服务器
GNOME 桌面环境
X 窗口系统
办公/生产率
图形
图形化互联网
基于文本的互联网
打印支持
服务器配置工具
游戏和娱乐
管理工具
系统工具
编辑器
网络服务器
老的网络服务器
老的软件开发
老的软件支持
视频和音频
邮件服务器
Available Groups:
DNS 名称服务器
GNOME 软件开发
Java开发
KDE 软件开发
KDE (K 桌面环境)
MySQL 数据库
OpenFabrics 企业版发行
PostgreSQL 数据库
Windows 文件服务器
X 软件开发
万维网服务器
工程和科学
开发工具
开发库
授权和出版
新闻服务器
群集存储
集群
Done
[root@localhost /]# yum clean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
11、进行测试
[root@localhost /]# yum -y install gcc*
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Cluster | 1.3 kB 00:00
Cluster/primary | 6.5 kB 00:00
Cluster 32/32
ClusterStorage | 1.3 kB 00:00
ClusterStorage/primary | 9.0 kB 00:00
ClusterStorage 39/39
Server | 1.3 kB 00:00
Server/primary | 753 kB 00:00
Server 2348/2348
VT | 1.3 kB 00:00
VT/primary | 6.5 kB 00:00
VT 32/32
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.i386 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libgomp >= 4.1.2-48.el5 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
---> Package gcc-c++.i386 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libstdc++-devel = 4.1.2-48.el5 for package: gcc-c++
---> Package gcc-gfortran.i386 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libgfortran = 4.1.2-48.el5 for package: gcc-gfortran
--> Processing Dependency: libgmp.so.3 for package: gcc-gfortran
--> Processing Dependency: libgfortran.so.1 for package: gcc-gfortran
---> Package gcc-gnat.i386 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libgnat = 4.1.2-48.el5 for package: gcc-gnat
--> Processing Dependency: libgnat-4.1.so for package: gcc-gnat
--> Processing Dependency: libgnarl-4.1.so for package: gcc-gnat
---> Package gcc-java.i386 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libgcj-devel = 4.1.2-48.el5 for package: gcc-java
---> Package gcc-objc.i386 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libobjc = 4.1.2-48.el5 for package: gcc-objc
--> Processing Dependency: libobjc.so.1 for package: gcc-objc
---> Package gcc-objc++.i386 0:4.1.2-48.el5 set to be updated
---> Package gcc44.i386 0:4.4.0-6.el5 set to be updated
---> Package gcc44-c++.i386 0:4.4.0-6.el5 set to be updated
--> Processing Dependency: libstdc++44-devel = 4.4.0-6.el5 for package: gcc44-c++
---> Package gcc44-gfortran.i386 0:4.4.0-6.el5 set to be updated
--> Processing Dependency: libgfortran44 = 4.4.0-6.el5 for package: gcc44-gfortran
--> Processing Dependency: libgfortran.so.3 for package: gcc44-gfortran
--> Running transaction check
---> Package glibc-devel.i386 0:2.5-49 set to be updated
--> Processing Dependency: glibc-headers = 2.5-49 for package: glibc-devel
--> Processing Dependency: glibc-headers for package: glibc-devel
---> Package gmp.i386 0:4.1.4-10.el5 set to be updated
---> Package libgcj-devel.i386 0:4.1.2-48.el5 set to be updated
Cluster/filelists | 110 kB 00:00
ClusterStorage/filelists | 11 kB 00:00
Server/filelists | 2.4 MB 00:00
VT/filelists | 110 kB 00:00
--> Processing Dependency: /usr/lib/libz.so for package: libgcj-devel
--> Processing Dependency: zlib-devel for package: libgcj-devel
---> Package libgfortran.i386 0:4.1.2-48.el5 set to be updated
---> Package libgfortran44.i386 0:4.4.0-6.el5 set to be updated
---> Package libgnat.i386 0:4.1.2-48.el5 set to be updated
---> Package libgomp.i386 0:4.4.0-6.el5 set to be updated
---> Package libobjc.i386 0:4.1.2-48.el5 set to be updated
---> Package libstdc++-devel.i386 0:4.1.2-48.el5 set to be updated
---> Package libstdc++44-devel.i386 0:4.4.0-6.el5 set to be updated
--> Running transaction check
---> Package glibc-headers.i386 0:2.5-49 set to be updated
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
--> Processing Dependency: kernel-headers for package: glibc-headers
---> Package zlib-devel.i386 0:1.2.3-3 set to be updated
--> Running transaction check
---> Package kernel-headers.i386 0:2.6.18-194.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
gcc i386 4.1.2-48.el5 Server 5.2 M
gcc-c++ i386 4.1.2-48.el5 Server 3.4 M
gcc-gfortran i386 4.1.2-48.el5 Server 3.1 M
gcc-gnat i386 4.1.2-48.el5 Server 11 M
gcc-java i386 4.1.2-48.el5 Server 2.9 M
gcc-objc i386 4.1.2-48.el5 Server 2.5 M
gcc-objc++ i386 4.1.2-48.el5 Server 2.7 M
gcc44 i386 4.4.0-6.el5 Server 9.5 M
gcc44-c++ i386 4.4.0-6.el5 Server 4.5 M
gcc44-gfortran i386 4.4.0-6.el5 Server 4.4 M
Installing for dependencies:
glibc-devel i386 2.5-49 Server 2.0 M
glibc-headers i386 2.5-49 Server 601 k
gmp i386 4.1.4-10.el5 Server 665 k
kernel-headers i386 2.6.18-194.el5 Server 1.0 M
libgcj-devel i386 4.1.2-48.el5 Server 1.4 M
libgfortran i386 4.1.2-48.el5 Server 231 k
libgfortran44 i386 4.4.0-6.el5 Server 247 k
libgnat i386 4.1.2-48.el5 Server 981 k
libgomp i386 4.4.0-6.el5 Server 70 k
libobjc i386 4.1.2-48.el5 Server 104 k
libstdc++-devel i386 4.1.2-48.el5 Server 2.8 M
libstdc++44-devel i386 4.4.0-6.el5 Server 4.0 M
zlib-devel i386 1.2.3-3 Server 100 k
Transaction Summary
================================================================================
Install 23 Package(s)
Upgrade 0 Package(s)
Total download size: 63 M
Downloading Packages:
(1/23): kernel-headers-2.6.18-194.el5.i386.rpm | 1.0 MB 00:00
(2/23): gcc-java-4.1.2-48.el5.i386.rpm | 2.9 MB 00:00
(3/23): zlib-devel-1.2.3-3.i386.rpm | 100 kB 00:00
(4/23): glibc-headers-2.5-49.i386.rpm | 601 kB 00:00
(5/23): libgcj-devel-4.1.2-48.el5.i386.rpm | 1.4 MB 00:00
(6/23): libgfortran-4.1.2-48.el5.i386.rpm | 231 kB 00:00
(7/23): gcc-gfortran-4.1.2-48.el5.i386.rpm | 3.1 MB 00:00
(8/23): gcc-c++-4.1.2-48.el5.i386.rpm | 3.4 MB 00:00
(9/23): glibc-devel-2.5-49.i386.rpm | 2.0 MB 00:00
(10/23): gmp-4.1.4-10.el5.i386.rpm | 665 kB 00:00
(11/23): libgomp-4.4.0-6.el5.i386.rpm | 70 kB 00:00
(12/23): gcc-4.1.2-48.el5.i386.rpm | 5.2 MB 00:00
(13/23): libstdc++-devel-4.1.2-48.el5.i386.rpm | 2.8 MB 00:00
(14/23): libgnat-4.1.2-48.el5.i386.rpm | 981 kB 00:00
(15/23): gcc-gnat-4.1.2-48.el5.i386.rpm | 11 MB 00:00
(16/23): gcc-objc++-4.1.2-48.el5.i386.rpm | 2.7 MB 00:00
(17/23): gcc-objc-4.1.2-48.el5.i386.rpm | 2.5 MB 00:00
(18/23): libobjc-4.1.2-48.el5.i386.rpm | 104 kB 00:00
(19/23): gcc44-c++-4.4.0-6.el5.i386.rpm | 4.5 MB 00:00
(20/23): gcc44-gfortran-4.4.0-6.el5.i386.rpm | 4.4 MB 00:00
(21/23): libstdc++44-devel-4.4.0-6.el5.i386.rpm | 4.0 MB 00:00
(22/23): gcc44-4.4.0-6.el5.i386.rpm | 9.5 MB 00:00
(23/23): libgfortran44-4.4.0-6.el5.i386.rpm | 247 kB 00:00
--------------------------------------------------------------------------------
Total 8.2 MB/s | 63 MB 00:07
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : gmp 1/23
error: failed to stat /media/RHEL_5.5 i386 DVD: 没有那个文件或目录
Installing : libgomp 2/23
Installing : libgfortran44 3/23
Installing : libgfortran 4/23
Installing : libobjc 5/23
Installing : libgnat 6/23
Installing : libstdc++-devel 7/23
Installing : kernel-headers 8/23
Installing : glibc-headers 9/23
Installing : glibc-devel 10/23
Installing : libstdc++44-devel 11/23
Installing : zlib-devel 12/23
Installing : gcc 13/23
Installing : gcc44 14/23
Installing : libgcj-devel 15/23
Installing : gcc-objc 16/23
Installing : gcc-c++ 17/23
Installing : gcc-java 18/23
Installing : gcc-gnat 19/23
Installing : gcc-objc++ 20/23
Installing : gcc44-c++ 21/23
Installing : gcc-gfortran 22/23
Installing : gcc44-gfortran 23/23
Installed:
gcc.i386 0:4.1.2-48.el5 gcc-c++.i386 0:4.1.2-48.el5
gcc-gfortran.i386 0:4.1.2-48.el5 gcc-gnat.i386 0:4.1.2-48.el5
gcc-java.i386 0:4.1.2-48.el5 gcc-objc.i386 0:4.1.2-48.el5
gcc-objc++.i386 0:4.1.2-48.el5 gcc44.i386 0:4.4.0-6.el5
gcc44-c++.i386 0:4.4.0-6.el5 gcc44-gfortran.i386 0:4.4.0-6.el5
Dependency Installed:
glibc-devel.i386 0:2.5-49 glibc-headers.i386 0:2.5-49
gmp.i386 0:4.1.4-10.el5 kernel-headers.i386 0:2.6.18-194.el5
libgcj-devel.i386 0:4.1.2-48.el5 libgfortran.i386 0:4.1.2-48.el5
libgfortran44.i386 0:4.4.0-6.el5 libgnat.i386 0:4.1.2-48.el5
libgomp.i386 0:4.4.0-6.el5 libobjc.i386 0:4.1.2-48.el5
libstdc++-devel.i386 0:4.1.2-48.el5 libstdc++44-devel.i386 0:4.4.0-6.el5
zlib-devel.i386 0:1.2.3-3
Complete!
[root@localhost /]#
上一篇:本地YUM的安装过程
下一篇:搭建FTP服务器的安装过程
![](https://ucenter.51cto.com/images/noavatar_middle.gif)
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Linux安装yum工具-安装过程
Linux安装yum工具-安装过程
linux centos 服务器 yum rpm -
FTP服务器安装过程
安装环境: CentOS-5.3-i386
ftp centos vsftpd 源码安装 -
orchestrator 高可用yum快速安装过程
orchestrator 高可用yum快速安装过程
orchestrator 高可用 yum快速安装过程