Linux下安装lvs
2024-08-28 15:20:36
lvs已经编译到linux内核中,仅仅须要安装lvs的管理软件ipvsadm就可以
1. 插入光盘。查找设备
[root@chen ~]# ls -l /dev | grep cdrom
lrwxrwxrwx. 1 root root 3 12月 28 07:29 cdrom -> sr0
crw-rw----. 1 root cdrom 21, 1 12月 28 07:29 sg1
brw-rw----. 1 root cdrom 11, 0 12月 28 07:29 sr0
2. 载入光驱
[root@chen ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
3. 配置仓库
vi /etc/yum.repos.d/CentOS-Media.repo
改动前
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-6. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c6-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c6-media [command]
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
改动后
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-6. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c6-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c6-media [command]
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
4. 安装ipvsadm
[root@chen ~]# yum --disablerepo=\* --enablerepo=c6-media install ipvsadm
已载入插件:fastestmirror, security
设置安装进程
Loading mirror speeds from cached hostfile
c6-media | 4.0 kB 00:00 ...
c6-media/primary_db | 3.5 MB 00:02 ...
解决依赖关系
--> 运行事务检查
---> Package ipvsadm.i686 0:1.26-4.el6 will be 安装
--> 完毕依赖关系计算
依赖关系解决
==========================================================================================
软件包 架构 版本号 仓库 大小
==========================================================================================
正在安装:
ipvsadm i686 1.26-4.el6 c6-media 40 k
事务概要
==========================================================================================
Install 1 Package(s)
总下载量:40 k
Installed size: 65 k
确定吗?[y/N]:y
下载软件包:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
Package: centos-release-6-6.el6.centos.12.2.i686 (@anaconda-CentOS-201410241409.i386/6.6)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
确定吗?[y/N]:y
运行 rpm_check_debug
运行事务測试
事务測试成功
运行事务
正在安装 : ipvsadm-1.26-4.el6.i686 1/1
Verifying : ipvsadm-1.26-4.el6.i686 1/1
已安装:
ipvsadm.i686 0:1.26-4.el6
完毕!
5. 查看是否成功安装
[root@chen ~]# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
最新文章
- C# XSD校验XML文件的代码
- JS实现操作成功定时回到主页效果
- U盘安装 Windows XP 原版 ISO 的几点心得
- Oracle 数据库链接
- CentOS上无法识别NTFS格式分区的解决方法
- hibernate--ID生成策略--XML
- Memcached源码分析之内存管理
- Unity Android路径及注意事项
- linux系统编程之文件IO
- Ani动态光标格式解析
- (转载)Unity UGUI点击不同Button执行不同的方法(无参方法)
- k8s Nodeport方式下service访问,iptables处理逻辑(转)
- 百度地图bd map使用方法
- sql Server如何执行批量插入和批量删除
- bzoj4236 JOIJOI
- Web.config配置configSections学习
- ASP.NET 163 smtp服务器响应为:User has no permission
- 《javascript高级程序设计》读书笔记(四)引用类型
- qt中执行 sql文件的方法
- Oracle SQL*Loader 数据导入工具