Linux下安裝lvs


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM