IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    虚拟带库【mhVTL】:Install on RHEL5

    Adamhuan发表于 2016-09-16 05:30:52
    love 0

    本文,详细呈现在RHEL5上部署mhVTL的技术细节。

    一、 mhVTL:服务器端
    首先,你需要获得lzo软件包。
    该软件包,你可以通过下面的网址获取:
    http://rpmfind.net/linux/rpm2html/search.php?query=lzo&submit=Search+…

    然后上传服务器:

    [root@vistor-server ~]# cd /software
    [root@vistor-server software]# 
    [root@vistor-server software]# ls
    total 64
    -rw-r--r-- 1 root root 58297 |2016-09-16|04:29:27 lzo-2.02-2.el5.1.x86_64.rpm
    [root@vistor-server software]#

    如上,这里,我下载的版本是:lzo-2.02-2.el5.1.x86_64。

    安装:
    YUM方式:

    [root@vistor-server software]# rpm -qa | grep --color lzo
    [root@vistor-server software]# 
    [root@vistor-server software]# rpm -ivh lzo-2.02-2.el5.1.x86_64.rpm 
    warning: lzo-2.02-2.el5.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
    Preparing...                ########################################### [100%]
       1:lzo                    ########################################### [100%]
    [root@vistor-server software]# 
    [root@vistor-server software]# rpm -qa | grep --color lzo
    lzo-2.02-2.el5.1
    [root@vistor-server software]#

    然后,安装mhVTL与iscsi:
    yum install -y mhvtl-utils kmod-mhvtl
    yum install -y lsscsi
    yum install -y scsi-target-utils

    Shell:

    [root@vistor-server software]# rpm -qa | grep --color mhvtl
    [root@vistor-server software]# rpm -qa | grep --color scsi
    iscsi-initiator-utils-6.2.0.872-16.el5
    [root@vistor-server software]#
    [root@vistor-server software]# ping -c 3 baidu.com
    PING baidu.com (220.181.57.217) 56(84) bytes of data.
    64 bytes from 220.181.57.217: icmp_seq=1 ttl=128 time=29.5 ms
    64 bytes from 220.181.57.217: icmp_seq=2 ttl=128 time=29.2 ms
    64 bytes from 220.181.57.217: icmp_seq=3 ttl=128 time=30.4 ms
    
    --- baidu.com ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 1999ms
    rtt min/avg/max/mdev = 29.225/29.764/30.487/0.531 ms
    [root@vistor-server software]# 
    [root@vistor-server software]# rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
    [root@vistor-server software]# 
    [root@vistor-server software]# rpm -Uvh http://elrepo.org/elrepo-release-5-4.el5.elrepo.noarch.rpm
    Retrieving http://elrepo.org/elrepo-release-5-4.el5.elrepo.noarch.rpm
    Preparing...                ########################################### [100%]
    	package elrepo-release-5-4.el5.elrepo.noarch is already installed
    [root@vistor-server software]# 
    [root@vistor-server software]# yum list | grep --color lsscsi
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    [root@vistor-server software]# 
    [root@vistor-server software]# yum list | grep --color mhvtl
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    kmod-mhvtl.x86_64                     1.4.9-1.el5.elrepo               elrepo   
    kmod-mhvtl-xen.x86_64                 1.4.9-1.el5.elrepo               elrepo   
    mhvtl-utils.x86_64                    1.4.9-1.el5.elrepo               elrepo   
    [root@vistor-server software]# 
    [root@vistor-server software]# yum list | grep --color scsi
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    iscsi-initiator-utils.x86_64          6.2.0.872-16.el5                 installed
    [root@vistor-server software]# 
    
    [root@vistor-server software]# yum install -y mhvtl-utils kmod-mhvtl
    Loaded plugins: product-id, security, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package kmod-mhvtl.x86_64 0:1.4.9-1.el5.elrepo set to be updated
    ---> Package mhvtl-utils.x86_64 0:1.4.9-1.el5.elrepo set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ===============================================================================================================================================================================================================
     Package                                           Arch                                         Version                                                     Repository                                    Size
    ===============================================================================================================================================================================================================
    Installing:
     kmod-mhvtl                                        x86_64                                       1.4.9-1.el5.elrepo                                          elrepo                                        24 k
     mhvtl-utils                                       x86_64                                       1.4.9-1.el5.elrepo                                          elrepo                                       299 k
    
    Transaction Summary
    ===============================================================================================================================================================================================================
    Install       2 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 324 k
    Downloading Packages:
    (1/2): kmod-mhvtl-1.4.9-1.el5.elrepo.x86_64.rpm                                                                                                                                         |  24 kB     00:00     
    (2/2): mhvtl-utils-1.4.9-1.el5.elrepo.x86_64.rpm                                                                                                                                        | 299 kB     00:03     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                                                                           76 kB/s | 324 kB     00:04     
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : mhvtl-utils                                                                                                                                                                             1/2 
      Installing     : kmod-mhvtl                                                                                                                                                                              2/2 
    Working. This may take some time ...
    Done.
    
    Installed:
      kmod-mhvtl.x86_64 0:1.4.9-1.el5.elrepo                                                                mhvtl-utils.x86_64 0:1.4.9-1.el5.elrepo                                                               
    
    Complete!
    [root@vistor-server software]#
    
    [root@vistor-server yum.repos.d]# yum list | grep --color lsscsi
    This system is receiving updates from Red Hat Subscription Management.
    lsscsi.x86_64                     0.17-3.el5                  rhel-5-server-rpms
    [root@vistor-server yum.repos.d]# 
    [root@vistor-server yum.repos.d]# yum install -y lsscsi
    Loaded plugins: product-id, security, subscription-manager
    This system is receiving updates from Red Hat Subscription Management.
    rhel-5-server-cf-tools-1-rpms                                                            | 3.4 kB     00:00     
    rhel-5-server-rpms                                                                       | 3.4 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package lsscsi.x86_64 0:0.17-3.el5 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================================================
     Package               Arch                  Version                    Repository                         Size
    ================================================================================================================
    Installing:
     lsscsi                x86_64                0.17-3.el5                 rhel-5-server-rpms                 27 k
    
    Transaction Summary
    ================================================================================================================
    Install       1 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 27 k
    Downloading Packages:
    lsscsi-0.17-3.el5.x86_64.rpm                                                             |  27 kB     00:00     
    warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 37017186
    rhel-5-server-rpms/gpgkey                                                                | 1.1 kB     00:00     
    Importing GPG key 0x37017186 "Red Hat, Inc. (release key) " from /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : lsscsi                                                                                   1/1 
    rhel-5-server-cf-tools-1-rpms/productid                                                  | 2.1 kB     00:00     
    rhel-5-server-rpms/productid                                                             | 2.1 kB     00:00     
    
    Installed:
      lsscsi.x86_64 0:0.17-3.el5                                                                                    
    
    Complete!
    [root@vistor-server yum.repos.d]#
    
    [root@vistor-server yum.repos.d]# yum repolist
    Loaded plugins: product-id, security, subscription-manager
    This system is receiving updates from Red Hat Subscription Management.
    rhel-5-server-cf-tools-1-rpms                                                            | 3.4 kB     00:00     
    rhel-5-server-rpms                                                                       | 3.4 kB     00:00     
    repo id                                 repo name                                                         status
    Cluster                                 Cluster                                                               32
    ClusterStorage                          ClusterStorage                                                        39
    Server                                  Server                                                             3,358
    VT                                      VT                                                                    59
    elrepo                                  ELRepo.org Community Enterprise Linux Repository - el5               375
    rhel-5-server-cf-tools-1-rpms           Red Hat CloudForms Tools for RHEL 5 (RPMs)                            35
    rhel-5-server-rpms                      Red Hat Enterprise Linux 5 Server (RPMs)                          17,168
    repolist: 21,066
    [root@vistor-server yum.repos.d]# 
    [root@vistor-server yum.repos.d]# yum list | grep --color scsi
    This system is receiving updates from Red Hat Subscription Management.
    iscsi-initiator-utils.x86_64        6.2.0.872-16.el5          installed         
    lsscsi.x86_64                       0.17-3.el5                installed         
    kmod-be2iscsi-rhel5u5.x86_64        2.0.549.0-2.el5_5         rhel-5-server-rpms
    kmod-be2iscsi-xen-rhel5u5.x86_64    2.0.549.0-2.el5_5         rhel-5-server-rpms
    scsi-target-utils.x86_64            1.0.14-2.el5              ClusterStorage    
    [root@vistor-server yum.repos.d]#
    
    [root@vistor-server yum.repos.d]# yum install -y scsi-target-utils
    Loaded plugins: product-id, security, subscription-manager
    This system is receiving updates from Red Hat Subscription Management.
    rhel-5-server-cf-tools-1-rpms                                                            | 3.4 kB     00:00     
    rhel-5-server-rpms                                                                       | 3.4 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package scsi-target-utils.x86_64 0:1.0.14-2.el5 set to be updated
    --> Processing Dependency: libibverbs.so.1(IBVERBS_1.1)(64bit) for package: scsi-target-utils
    --> Processing Dependency: librdmacm.so.1(RDMACM_1.0)(64bit) for package: scsi-target-utils
    --> Processing Dependency: perl(Config::General) for package: scsi-target-utils
    --> Processing Dependency: libibverbs.so.1()(64bit) for package: scsi-target-utils
    --> Processing Dependency: librdmacm.so.1()(64bit) for package: scsi-target-utils
    --> Running transaction check
    ---> Package libibverbs.x86_64 0:1.1.6-3.el5 set to be updated
    --> Processing Dependency: openib >= 1.0 for package: libibverbs
    ---> Package librdmacm.x86_64 0:1.0.15-2.el5 set to be updated
    ---> Package perl-Config-General.noarch 0:2.40-1.el5 set to be updated
    --> Running transaction check
    ---> Package openib.noarch 0:1.5.4.1-4.el5 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================================================
     Package                        Arch              Version                   Repository                     Size
    ================================================================================================================
    Installing:
     scsi-target-utils              x86_64            1.0.14-2.el5              ClusterStorage                172 k
    Installing for dependencies:
     libibverbs                     x86_64            1.1.6-3.el5               rhel-5-server-rpms             46 k
     librdmacm                      x86_64            1.0.15-2.el5              rhel-5-server-rpms             28 k
     openib                         noarch            1.5.4.1-4.el5             rhel-5-server-rpms             23 k
     perl-Config-General            noarch            2.40-1.el5                ClusterStorage                 69 k
    
    Transaction Summary
    ================================================================================================================
    Install       5 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 338 k
    Downloading Packages:
    (1/5): openib-1.5.4.1-4.el5.noarch.rpm                                                   |  23 kB     00:00     
    (2/5): librdmacm-1.0.15-2.el5.x86_64.rpm                                                 |  28 kB     00:00     
    (3/5): libibverbs-1.1.6-3.el5.x86_64.rpm                                                 |  46 kB     00:01     
    ----------------------------------------------------------------------------------------------------------------
    Total                                                                            49 kB/s | 338 kB     00:06     
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : perl-Config-General                                                                      1/5 
      Installing     : openib                                                                                   2/5 
      Installing     : libibverbs                                                                               3/5 
      Installing     : librdmacm                                                                                4/5 
      Installing     : scsi-target-utils                                                                        5/5 
    Cluster/productid                                                                        | 1.7 kB     00:00     
    ClusterStorage/productid                                                                 | 1.7 kB     00:00     
    Server/productid                                                                         | 1.7 kB     00:00     
    
    Installed:
      scsi-target-utils.x86_64 0:1.0.14-2.el5                                                                       
    
    Dependency Installed:
      libibverbs.x86_64 0:1.1.6-3.el5            librdmacm.x86_64 0:1.0.15-2.el5    openib.noarch 0:1.5.4.1-4.el5   
      perl-Config-General.noarch 0:2.40-1.el5   
    
    Complete!
    [root@vistor-server yum.repos.d]#

    下载安装介质的方式:
    官网网站:https://sites.google.com/site/linuxvtl2
    该网站中国大陆无法访问。

    启动带库:

    [root@vistor-server yum.repos.d]# /etc/init.d/mhvtl start
    vtllibrary process PID is 7081
    vtllibrary process PID is 7171
    [root@vistor-server yum.repos.d]#

    查看带库:

    [root@vistor-server yum.repos.d]# lsscsi -g
    [0:0:0:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sda  /dev/sg0
    [0:0:1:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sdb  /dev/sg2
    [2:0:0:0]    cd/dvd  NECVMWar VMware SATA CD01 1.00  /dev/sr0  /dev/sg1
    [31:0:0:0]   mediumx STK      L700             0104  -         /dev/sg11
    [31:0:1:0]   tape    IBM      ULT3580-TD5      0104  /dev/st0  /dev/sg3
    [31:0:2:0]   tape    IBM      ULT3580-TD5      0104  /dev/st1  /dev/sg4
    [31:0:3:0]   tape    IBM      ULT3580-TD4      0104  /dev/st2  /dev/sg5
    [31:0:4:0]   tape    IBM      ULT3580-TD4      0104  /dev/st3  /dev/sg6
    [31:0:8:0]   mediumx STK      L80              0104  -         /dev/sg12
    [31:0:9:0]   tape    STK      T10000B          0104  /dev/st4  /dev/sg7
    [31:0:10:0]  tape    STK      T10000B          0104  /dev/st5  /dev/sg8
    [31:0:11:0]  tape    STK      T10000B          0104  /dev/st6  /dev/sg9
    [31:0:12:0]  tape    STK      T10000B          0104  /dev/st7  /dev/sg10
    [root@vistor-server yum.repos.d]#

    把带库映射给SCSI:

    [root@vistor-server yum.repos.d]# cat /etc/tgt/targets.conf | grep -v '#' | strings
    default-driver iscsi
    [root@vistor-server yum.repos.d]# 
    [root@vistor-server yum.repos.d]# vi /etc/tgt/targets.conf 
    [root@vistor-server yum.repos.d]# 
    [root@vistor-server yum.repos.d]# cat /etc/tgt/targets.conf | grep -v '#' | strings
    default-driver iscsi
    
    backing-store	/dev/sg0
    backing-store	/dev/sg2
    backing-store	/dev/sg1
    backing-store	/dev/sg11
    backing-store	/dev/sg3
    backing-store	/dev/sg4
    backing-store	/dev/sg5
    backing-store	/dev/sg6
    backing-store	/dev/sg12
    backing-store	/dev/sg7
    backing-store	/dev/sg8
    backing-store	/dev/sg9
    backing-store	/dev/sg10
    device-type	pt
    bs-type		sg
    
    initiator-address ALL
    [root@vistor-server yum.repos.d]#

    启动iscsi-target:

    [root@vistor-server yum.repos.d]# /etc/init.d/tgtd status
    tgtd is stopped
    [root@vistor-server yum.repos.d]#
    [root@vistor-server yum.repos.d]# /etc/init.d/tgtd start
    Starting SCSI target daemon:                               [  OK  ]
    [root@vistor-server yum.repos.d]#

    查询一下:

    [root@vistor-server yum.repos.d]# tgtadm --lld iscsi --op show --mode target
    Target 1: adamhuan.mhVTL
        System information:
            Driver: iscsi
            State: ready
        I_T nexus information:
        LUN information:
            LUN: 0
                Type: controller
                SCSI ID: IET     00010000
                SCSI SN: beaf10
                Size: 0 MB, Block size: 1
                Online: Yes
                Removable media: No
                Readonly: No
                Backing store type: null
                Backing store path: None
                Backing store flags: 
        Account information:
        ACL information:
    [root@vistor-server yum.repos.d]#

    至此,mhVTL的服务器端的配置就完成了。

    二、 mhVTL图形界面
    配置mhVTL的图形界面:
    安装软件包:
    yum install -y php mtx mt-st

    [root@vistor-server yum.repos.d]# yum install -y php mtx mt-st
    Loaded plugins: product-id, security, subscription-manager
    This system is receiving updates from Red Hat Subscription Management.
    rhel-5-server-cf-tools-1-rpms                                                            | 3.4 kB     00:00     
    rhel-5-server-rpms                                                                       | 3.4 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package mt-st.x86_64 0:0.9b-4.el5 set to be updated
    ---> Package mtx.x86_64 0:1.2.18-9 set to be updated
    ---> Package php.x86_64 0:5.1.6-45.el5_11 set to be updated
    --> Processing Dependency: httpd-mmn = 20051115 for package: php
    --> Processing Dependency: php-cli = 5.1.6-45.el5_11 for package: php
    --> Processing Dependency: php-common = 5.1.6-45.el5_11 for package: php
    --> Running transaction check
    ---> Package httpd.x86_64 0:2.2.3-92.el5_11 set to be updated
    rhel-5-server-rpms/filelists_db                                                          |  46 MB     05:12     
    ---> Package php-cli.x86_64 0:5.1.6-45.el5_11 set to be updated
    ---> Package php-common.x86_64 0:5.1.6-45.el5_11 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================================================
     Package                 Arch                Version                      Repository                       Size
    ================================================================================================================
    Installing:
     mt-st                   x86_64              0.9b-4.el5                   Server                           40 k
     mtx                     x86_64              1.2.18-9                     Server                           97 k
     php                     x86_64              5.1.6-45.el5_11              rhel-5-server-rpms              2.4 M
    Installing for dependencies:
     httpd                   x86_64              2.2.3-92.el5_11              rhel-5-server-rpms              1.3 M
     php-cli                 x86_64              5.1.6-45.el5_11              rhel-5-server-rpms              2.2 M
     php-common              x86_64              5.1.6-45.el5_11              rhel-5-server-rpms              155 k
    
    Transaction Summary
    ================================================================================================================
    Install       6 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 6.1 M
    Downloading Packages:
    (1/6): php-common-5.1.6-45.el5_11.x86_64.rpm                                             | 155 kB     00:01     
    (2/6): httpd-2.2.3-92.el5_11.x86_64.rpm                                                  | 1.3 MB     00:04     
    (3/6): php-cli-5.1.6-45.el5_11.x86_64.rpm                                                | 2.2 MB     00:12     
    (4/6): php-5.1.6-45.el5_11.x86_64.rpm                                                    | 2.4 MB     00:42     
    ----------------------------------------------------------------------------------------------------------------
    Total                                                                            94 kB/s | 6.1 MB     01:05     
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : php-common                                                                               1/6 
      Installing     : php-cli                                                                                  2/6 
      Installing     : httpd                                                                                    3/6 
      Installing     : mt-st                                                                                    4/6 
      Installing     : php                                                                                      5/6 
      Installing     : mtx                                                                                      6/6 
    
    Installed:
      mt-st.x86_64 0:0.9b-4.el5            mtx.x86_64 0:1.2.18-9            php.x86_64 0:5.1.6-45.el5_11           
    
    Dependency Installed:
      httpd.x86_64 0:2.2.3-92.el5_11    php-cli.x86_64 0:5.1.6-45.el5_11    php-common.x86_64 0:5.1.6-45.el5_11   
    
    Complete!
    [root@vistor-server yum.repos.d]#

    修改sudo:

    [root@vistor-server yum.repos.d]# echo "apache ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers 
    [root@vistor-server yum.repos.d]#

    如果没有配置sudo,则会在启动【mhVTL GUI】的时候报错:
    mhvtl_gui_error

    修改apache配置文件:

    [root@vistor-server yum.repos.d]# tail -n 8 /etc/httpd/conf/httpd.conf 
    
    Alias /mhvtl "/var/www/html/mhvtl"
    
    	Options None
    	AllowOverride None
    	Order allow,deny
    	Allow from all
    
    [root@vistor-server yum.repos.d]#

    mhVTL GUI的web程序:
    https://github.com/walterfrs/mhvtl-gui

    下载后,上传服务器【/var/www/html/mhvtl】

    [root@vistor-server yum.repos.d]# cd /software
    [root@vistor-server software]# pwd
    /software
    [root@vistor-server software]# ls
    total 392
    -rw-r--r-- 1 root root  58297 |2016-09-16|04:29:27 lzo-2.02-2.el5.1.x86_64.rpm
    -rw-r--r-- 1 root root 329355 |2016-09-16|06:15:45 mhvtl-gui-master_git.zip
    [root@vistor-server software]# 
    [root@vistor-server software]# unzip mhvtl-gui-master_git.zip 
    Archive:  mhvtl-gui-master_git.zip
    60d89dd86c4bf6059daa65cea788a808e31be97a
       creating: mhvtl-gui-master/
      inflating: mhvtl-gui-master/.gitignore  
      inflating: mhvtl-gui-master/LICENSE  
      inflating: mhvtl-gui-master/README  
      inflating: mhvtl-gui-master/favicon.ico  
      inflating: mhvtl-gui-master/go.php  
       creating: mhvtl-gui-master/html/
      inflating: mhvtl-gui-master/html/about.php  
      inflating: mhvtl-gui-master/html/about_console.php  
      inflating: mhvtl-gui-master/html/act.php  
      inflating: mhvtl-gui-master/html/act.test.php  
      inflating: mhvtl-gui-master/html/activity.php  
      inflating: mhvtl-gui-master/html/activity.test.php  
      inflating: mhvtl-gui-master/html/add.drive.php  
      inflating: mhvtl-gui-master/html/add.library.php  
      inflating: mhvtl-gui-master/html/add.options.php  
      inflating: mhvtl-gui-master/html/add.stgt.iscsi.clients.php  
      inflating: mhvtl-gui-master/html/confirm.again.reset_default.php  
      inflating: mhvtl-gui-master/html/confirm.install.stgt.php  
      inflating: mhvtl-gui-master/html/confirm.install_mhvtl.php  
      inflating: mhvtl-gui-master/html/confirm.reset_default.php  
      inflating: mhvtl-gui-master/html/confirm.start_mhvtl.php  
      inflating: mhvtl-gui-master/html/confirm.start_stgt.php  
      inflating: mhvtl-gui-master/html/confirm.stop-start_mhvtl.php  
      inflating: mhvtl-gui-master/html/confirm.stop_mhvtl.php  
      inflating: mhvtl-gui-master/html/confirm.stop_stgt.php  
      inflating: mhvtl-gui-master/html/confirm.update_mhvtl-gui.php  
      inflating: mhvtl-gui-master/html/confirm.update_mhvtl.php  
      inflating: mhvtl-gui-master/html/confirm.update_tgt.php  
      inflating: mhvtl-gui-master/html/create.auto.iscsi.config.stgt.php  
      inflating: mhvtl-gui-master/html/create.iscsi.lun.stgt.php  
      inflating: mhvtl-gui-master/html/create.iscsi.target.stgt.php  
      inflating: mhvtl-gui-master/html/devices.php  
      inflating: mhvtl-gui-master/html/disable_stgt_scsi_target.php  
      inflating: mhvtl-gui-master/html/display.external.media.php  
      inflating: mhvtl-gui-master/html/display.tgt.initiator.php  
      inflating: mhvtl-gui-master/html/display_stgt.initiator.cons.php  
      inflating: mhvtl-gui-master/html/display_stgt.lun.php  
      inflating: mhvtl-gui-master/html/display_stgt.target.php  
      inflating: mhvtl-gui-master/html/download_mhvtl.php  
      inflating: mhvtl-gui-master/html/drive.status.php  
      inflating: mhvtl-gui-master/html/dump.tape.php  
      inflating: mhvtl-gui-master/html/emailfeedback.php  
      inflating: mhvtl-gui-master/html/enable_stgt_scsi_target.php  
      inflating: mhvtl-gui-master/html/fdisplay.php  
      inflating: mhvtl-gui-master/html/find.db.info.php  
      inflating: mhvtl-gui-master/html/find.device.id.php  
      inflating: mhvtl-gui-master/html/form.add.adic.library.php  
      inflating: mhvtl-gui-master/html/form.add.custom.complete.php  
      inflating: mhvtl-gui-master/html/form.add.dell.library.php  
      inflating: mhvtl-gui-master/html/form.add.hp.library.php  
      inflating: mhvtl-gui-master/html/form.add.ibm.library.php  
      inflating: mhvtl-gui-master/html/form.add.overland.library.php  
      inflating: mhvtl-gui-master/html/form.add.quantum.library.php  
      inflating: mhvtl-gui-master/html/form.add.sony.library.php  
      inflating: mhvtl-gui-master/html/form.add.spectra.library.php  
      inflating: mhvtl-gui-master/html/form.add.stgt.iscsi.clients.php  
      inflating: mhvtl-gui-master/html/form.add.stk.library.php  
      inflating: mhvtl-gui-master/html/form.create.auto.iscsi.config.stgt.php  
      inflating: mhvtl-gui-master/html/form.create.iscsi.lun.stgt.php  
      inflating: mhvtl-gui-master/html/form.create.iscsi.target.stgt.php  
      inflating: mhvtl-gui-master/html/form.display.external.media.php  
      inflating: mhvtl-gui-master/html/form.drive.status.php  
      inflating: mhvtl-gui-master/html/form.dump.tape.php  
      inflating: mhvtl-gui-master/html/form.make.external.media.php  
      inflating: mhvtl-gui-master/html/form.mhvtl-gui.theme.selector.php  
      inflating: mhvtl-gui-master/html/form.mount.tape.php  
      inflating: mhvtl-gui-master/html/form.move.tape.php  
      inflating: mhvtl-gui-master/html/form.patch.install.mhvtl.php  
      inflating: mhvtl-gui-master/html/form.patch.install.tgt.php  
      inflating: mhvtl-gui-master/html/form.patch.mhvtl.php  
      inflating: mhvtl-gui-master/html/form.patch.uninstall.mhvtl.php  
      inflating: mhvtl-gui-master/html/form.patch.uninstall.tgt.php  
      inflating: mhvtl-gui-master/html/form.quick.test.mhvtl.php  
      inflating: mhvtl-gui-master/html/form.remove.confirm.again.library.php  
      inflating: mhvtl-gui-master/html/form.remove.iscsi.lun.stgt.php  
      inflating: mhvtl-gui-master/html/form.remove.iscsi.target.stgt.php  
      inflating: mhvtl-gui-master/html/form.remove.library.php  
      inflating: mhvtl-gui-master/html/form.remove.stgt.iscsi.clients.php  
      inflating: mhvtl-gui-master/html/form.robot.status.php  
      inflating: mhvtl-gui-master/html/form.select.iscsi.lun.stgt.php  
      inflating: mhvtl-gui-master/html/form.select.iscsi.target.stgt.php  
      inflating: mhvtl-gui-master/html/form.setup.choose.standard.complete.php  
      inflating: mhvtl-gui-master/html/form.setup.complete.php  
      inflating: mhvtl-gui-master/html/form.setup.custom.next.library.php  
      inflating: mhvtl-gui-master/html/form.setup.standard.next.library.php  
      inflating: mhvtl-gui-master/html/form.show.confirm.again.library.php  
      inflating: mhvtl-gui-master/html/form.show.library.php  
      inflating: mhvtl-gui-master/html/form.tapealert.mhvtl.php  
      inflating: mhvtl-gui-master/html/form.unmount.tape.php  
      inflating: mhvtl-gui-master/html/form.vtlcmd.close.map.php  
      inflating: mhvtl-gui-master/html/form.vtlcmd.empty.map.php  
      inflating: mhvtl-gui-master/html/form.vtlcmd.empty.php  
      inflating: mhvtl-gui-master/html/form.vtlcmd.exit.php  
      inflating: mhvtl-gui-master/html/form.vtlcmd.list.map.php  
      inflating: mhvtl-gui-master/html/form.vtlcmd.load.map.php  
      inflating: mhvtl-gui-master/html/form.vtlcmd.make.tape.php  
      inflating: mhvtl-gui-master/html/form.vtlcmd.offline.php  
      inflating: mhvtl-gui-master/html/form.vtlcmd.online.php  
      inflating: mhvtl-gui-master/html/form.vtlcmd.open.map.php  
      inflating: mhvtl-gui-master/html/form1.display.external.media.php  
      inflating: mhvtl-gui-master/html/form1.drive.status.php  
      inflating: mhvtl-gui-master/html/form1.export.tape.php  
      inflating: mhvtl-gui-master/html/form1.import.tape.php  
      inflating: mhvtl-gui-master/html/form1.make.external.media.php  
      inflating: mhvtl-gui-master/html/form1.mount.tape.php  
      inflating: mhvtl-gui-master/html/form1.move.tape.php  
      inflating: mhvtl-gui-master/html/form1.robot.status.php  
      inflating: mhvtl-gui-master/html/form1.unmount.tape.php  
      inflating: mhvtl-gui-master/html/form1.vtlcmd.exit.php  
      inflating: mhvtl-gui-master/html/form1.vtlcmd.make.tape.php  
      inflating: mhvtl-gui-master/html/form2.export.tape.php  
      inflating: mhvtl-gui-master/html/form2.import.tape.php  
      inflating: mhvtl-gui-master/html/frame_a.php  
      inflating: mhvtl-gui-master/html/help.php  
      inflating: mhvtl-gui-master/html/html_contents.php  
       creating: mhvtl-gui-master/html/images/
     extracting: mhvtl-gui-master/html/images/about.png  
     extracting: mhvtl-gui-master/html/images/activity.png  
     extracting: mhvtl-gui-master/html/images/alert.png  
      inflating: mhvtl-gui-master/html/images/animated_alert.gif  
      inflating: mhvtl-gui-master/html/images/animated_dot.gif  
     extracting: mhvtl-gui-master/html/images/configuration.png  
     extracting: mhvtl-gui-master/html/images/fd_green_light.png  
     extracting: mhvtl-gui-master/html/images/fd_red_light.png  
     extracting: mhvtl-gui-master/html/images/gear_red.png  
      inflating: mhvtl-gui-master/html/images/gplv2.gif  
     extracting: mhvtl-gui-master/html/images/green_light.png  
     extracting: mhvtl-gui-master/html/images/help.png  
     extracting: mhvtl-gui-master/html/images/live_update.png  
      inflating: mhvtl-gui-master/html/images/loading.gif  
     extracting: mhvtl-gui-master/html/images/mhvtl.png  
     extracting: mhvtl-gui-master/html/images/mhvtl_procs.png  
     extracting: mhvtl-gui-master/html/images/monitoring.png  
     extracting: mhvtl-gui-master/html/images/operation.png  
     extracting: mhvtl-gui-master/html/images/red_light.png  
     extracting: mhvtl-gui-master/html/images/scsi_target.png  
     extracting: mhvtl-gui-master/html/images/starting_mhvtl.png  
     extracting: mhvtl-gui-master/html/images/stopping_mhvtl.png  
     extracting: mhvtl-gui-master/html/images/tab_left.png  
     extracting: mhvtl-gui-master/html/images/tab_right.png  
      inflating: mhvtl-gui-master/html/images/test.animated_dot.gif  
     extracting: mhvtl-gui-master/html/images/tux.png  
     extracting: mhvtl-gui-master/html/images/warning.png  
      inflating: mhvtl-gui-master/html/install.stgt.php  
      inflating: mhvtl-gui-master/html/install_mhvtl.php  
      inflating: mhvtl-gui-master/html/list.serial.number.php  
      inflating: mhvtl-gui-master/html/list.tapes.php  
      inflating: mhvtl-gui-master/html/live_update.php  
      inflating: mhvtl-gui-master/html/make.external.media.php  
      inflating: mhvtl-gui-master/html/mhvtl-gui.theme.selector.php  
      inflating: mhvtl-gui-master/html/mhvtl.list.tapes.php  
      inflating: mhvtl-gui-master/html/mhvtl.php  
      inflating: mhvtl-gui-master/html/module_quick.php  
      inflating: mhvtl-gui-master/html/mon.php  
      inflating: mhvtl-gui-master/html/monitor.php  
      inflating: mhvtl-gui-master/html/procs_quick.php  
      inflating: mhvtl-gui-master/html/quick.test.mhvtl.php  
      inflating: mhvtl-gui-master/html/quick.test.result.mhvtl.php  
      inflating: mhvtl-gui-master/html/remove.iscsi.lun.stgt.php  
      inflating: mhvtl-gui-master/html/remove.iscsi.target.stgt.php  
      inflating: mhvtl-gui-master/html/remove.library.php  
      inflating: mhvtl-gui-master/html/remove.stgt.iscsi.clients.php  
      inflating: mhvtl-gui-master/html/reset.iscsi.target.config.stgt.php  
      inflating: mhvtl-gui-master/html/reset_default.php  
      inflating: mhvtl-gui-master/html/restart_mhvtl.php  
      inflating: mhvtl-gui-master/html/review_mhvtl-gui_update.php  
      inflating: mhvtl-gui-master/html/review_mhvtl_update.php  
      inflating: mhvtl-gui-master/html/review_tgt_update.php  
      inflating: mhvtl-gui-master/html/robot.status.php  
      inflating: mhvtl-gui-master/html/save.iscsi.target.config.stgt.php  
      inflating: mhvtl-gui-master/html/scsi_target.php  
      inflating: mhvtl-gui-master/html/scst-procs_quick.php  
      inflating: mhvtl-gui-master/html/scst.php  
      inflating: mhvtl-gui-master/html/search_stgt.all.php  
      inflating: mhvtl-gui-master/html/search_stgt.luns.php  
      inflating: mhvtl-gui-master/html/search_stgt.target.php  
      inflating: mhvtl-gui-master/html/sendfeedback.php  
      inflating: mhvtl-gui-master/html/setup.options.php  
      inflating: mhvtl-gui-master/html/setup.php  
      inflating: mhvtl-gui-master/html/show.library.php  
      inflating: mhvtl-gui-master/html/start_mhvtl.php  
      inflating: mhvtl-gui-master/html/start_stgt.php  
      inflating: mhvtl-gui-master/html/status.php  
      inflating: mhvtl-gui-master/html/stgt-procs_quick.php  
      inflating: mhvtl-gui-master/html/stgt.php  
      inflating: mhvtl-gui-master/html/stop_mhvtl.php  
      inflating: mhvtl-gui-master/html/stop_stgt.php  
      inflating: mhvtl-gui-master/html/styles.css  
      inflating: mhvtl-gui-master/html/tgt_uploader.php  
      inflating: mhvtl-gui-master/html/thankyou.php  
      inflating: mhvtl-gui-master/html/tools.php  
      inflating: mhvtl-gui-master/html/update.device.conf.library.php  
      inflating: mhvtl-gui-master/html/update.mhvtl.conf.php  
      inflating: mhvtl-gui-master/html/update.php  
      inflating: mhvtl-gui-master/html/update_mhvtl-gui.php  
      inflating: mhvtl-gui-master/html/update_mhvtl.php  
      inflating: mhvtl-gui-master/html/uploader.php  
      inflating: mhvtl-gui-master/html/view.options.php  
      inflating: mhvtl-gui-master/html/view.tgt.conf.php  
      inflating: mhvtl-gui-master/html/view_device.conf.php  
      inflating: mhvtl-gui-master/html/view_syslog.php  
      inflating: mhvtl-gui-master/html/vtlcmd.close.map.confirm.again.php  
      inflating: mhvtl-gui-master/html/vtlcmd.close.map.php  
      inflating: mhvtl-gui-master/html/vtlcmd.empty.map.confirm.again.php  
      inflating: mhvtl-gui-master/html/vtlcmd.empty.map.php  
      inflating: mhvtl-gui-master/html/vtlcmd.exit.php  
      inflating: mhvtl-gui-master/html/vtlcmd.export.tape.php  
      inflating: mhvtl-gui-master/html/vtlcmd.import.tape.php  
      inflating: mhvtl-gui-master/html/vtlcmd.list.map.confirm.again.php  
      inflating: mhvtl-gui-master/html/vtlcmd.list.map.php  
      inflating: mhvtl-gui-master/html/vtlcmd.load.map.confirm.again.php  
      inflating: mhvtl-gui-master/html/vtlcmd.load.map.php  
      inflating: mhvtl-gui-master/html/vtlcmd.make.tape.php  
      inflating: mhvtl-gui-master/html/vtlcmd.mount.tape.php  
      inflating: mhvtl-gui-master/html/vtlcmd.move.tape.php  
      inflating: mhvtl-gui-master/html/vtlcmd.offline.php  
      inflating: mhvtl-gui-master/html/vtlcmd.online.php  
      inflating: mhvtl-gui-master/html/vtlcmd.open.map.confirm.again.php  
      inflating: mhvtl-gui-master/html/vtlcmd.open.map.php  
      inflating: mhvtl-gui-master/html/vtlcmd.php  
      inflating: mhvtl-gui-master/html/vtlcmd.unmount.tape.php  
      inflating: mhvtl-gui-master/index.php  
      inflating: mhvtl-gui-master/login.php  
      inflating: mhvtl-gui-master/mhvtl.cfg.db  
       creating: mhvtl-gui-master/scripts/
      inflating: mhvtl-gui-master/scripts/actdisp.sh  
      inflating: mhvtl-gui-master/scripts/auto.iscsi.config.stgt.sh  
      inflating: mhvtl-gui-master/scripts/build_html_opts.sh  
      inflating: mhvtl-gui-master/scripts/change_console_theme  
      inflating: mhvtl-gui-master/scripts/check_before_use.sh  
      inflating: mhvtl-gui-master/scripts/check_gui.update.sh  
      inflating: mhvtl-gui-master/scripts/check_tgt.update.sh  
      inflating: mhvtl-gui-master/scripts/check_update.sh  
      inflating: mhvtl-gui-master/scripts/checkuniquemedia.sh  
      inflating: mhvtl-gui-master/scripts/config_stgt.sh  
      inflating: mhvtl-gui-master/scripts/create_external_media  
      inflating: mhvtl-gui-master/scripts/download_mhvtl.sh  
      inflating: mhvtl-gui-master/scripts/host_mon.sh  
      inflating: mhvtl-gui-master/scripts/install_mhvtl.sh  
      inflating: mhvtl-gui-master/scripts/install_stgt.sh  
      inflating: mhvtl-gui-master/scripts/make_library_contents  
      inflating: mhvtl-gui-master/scripts/make_more_drives  
      inflating: mhvtl-gui-master/scripts/make_more_library_contents  
      inflating: mhvtl-gui-master/scripts/mhvtl.patch.sh  
      inflating: mhvtl-gui-master/scripts/mhvtl.quick.test.sh  
      inflating: mhvtl-gui-master/scripts/os_release.sh  
      inflating: mhvtl-gui-master/scripts/pandisp.sh  
      inflating: mhvtl-gui-master/scripts/plot_devices.sh  
      inflating: mhvtl-gui-master/scripts/remove_library.sh  
      inflating: mhvtl-gui-master/scripts/reset_default.sh  
      inflating: mhvtl-gui-master/scripts/review_mhvtl-gui_update.sh  
      inflating: mhvtl-gui-master/scripts/review_mhvtl_update.sh  
      inflating: mhvtl-gui-master/scripts/review_tgt_update.sh  
      inflating: mhvtl-gui-master/scripts/start_stop_scst  
      inflating: mhvtl-gui-master/scripts/start_stop_stgt  
      inflating: mhvtl-gui-master/scripts/update_mhvtl-gui.sh  
      inflating: mhvtl-gui-master/scripts/update_mhvtl.sh  
     extracting: mhvtl-gui-master/version  
    [root@vistor-server software]# 
    
    传到指定文件路径下:
    [root@vistor-server software]# mkdir /var/www/html/mhvtl
    [root@vistor-server software]# ls
    total 396
    drwxr-xr-x 4 root root   4096 |2012-11-27|19:16:30 mhvtl-gui-master
    -rw-r--r-- 1 root root  58297 |2016-09-16|04:29:27 lzo-2.02-2.el5.1.x86_64.rpm
    -rw-r--r-- 1 root root 329355 |2016-09-16|06:15:45 mhvtl-gui-master_git.zip
    [root@vistor-server software]# cp -rf mhvtl-gui-master/* /var/www/html/mhvtl/
    [root@vistor-server software]# 
    [root@vistor-server software]# ls /var/www/html/mhvtl/
    total 64
    -rw-r--r-- 1 root root    14 |2016-09-16|06:17:08 version
    drwxr-xr-x 2 root root  4096 |2016-09-16|06:17:08 scripts
    -rw-r--r-- 1 root root  2931 |2016-09-16|06:17:08 README
    -rw-r--r-- 1 root root  2379 |2016-09-16|06:17:08 mhvtl.cfg.db
    -rw-r--r-- 1 root root  2961 |2016-09-16|06:17:08 login.php
    -rw-r--r-- 1 root root 18006 |2016-09-16|06:17:08 LICENSE
    -rw-r--r-- 1 root root   343 |2016-09-16|06:17:08 index.php
    drwxr-xr-x 3 root root 12288 |2016-09-16|06:17:08 html
    -rwxr-xr-x 1 root root   750 |2016-09-16|06:17:08 go.php
    -rw-r--r-- 1 root root  1150 |2016-09-16|06:17:08 favicon.ico
    [root@vistor-server software]#

    启动apache进程:

    [root@vistor-server software]# /etc/init.d/httpd status
    httpd is stopped
    [root@vistor-server software]#
    [root@vistor-server software]# /etc/init.d/httpd start
    Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.111.135 for ServerName
                                                               [  OK  ]
    [root@vistor-server software]#

    浏览器访问mhVTL GUI:
    mhvtl_gui_1
    可以看到,这里需要填入密码。

    密码可以在web应用的根目录的go.php中找到。
    具体如下:

    [root@vistor-server software]# cd /var/www/html/mhvtl/
    [root@vistor-server mhvtl]# ls
    total 64
    -rw-r--r-- 1 root root    14 |2016-09-16|06:17:08 version
    drwxr-xr-x 2 root root  4096 |2016-09-16|06:17:08 scripts
    -rw-r--r-- 1 root root  2931 |2016-09-16|06:17:08 README
    -rw-r--r-- 1 root root  2379 |2016-09-16|06:17:08 mhvtl.cfg.db
    -rw-r--r-- 1 root root  2961 |2016-09-16|06:17:08 login.php
    -rw-r--r-- 1 root root 18006 |2016-09-16|06:17:08 LICENSE
    -rw-r--r-- 1 root root   343 |2016-09-16|06:17:08 index.php
    drwxr-xr-x 3 root root 12288 |2016-09-16|06:17:08 html
    -rwxr-xr-x 1 root root   750 |2016-09-16|06:17:08 go.php
    -rw-r--r-- 1 root root  1150 |2016-09-16|06:17:08 favicon.ico
    [root@vistor-server mhvtl]# 
    [root@vistor-server mhvtl]# cat go.php | grep --color password
    if(isset($_POST['login'])) { $password = $_POST['pswd'];
    if ( $password == "mhvtl" ) { //Replace with your password
    
    [root@vistor-server mhvtl]#

    如上,可以知道,密码为:mhvtl。

    登陆后:
    mhvtl_gui_2

    这样,mhVTL虚拟带库的服务端就全部配置完成了。

    ——————————————————————
    Done。



沪ICP备19023445号-2号
友情链接