• CentOS6.9安装OpenVZ


     可以参考下官方的教程  https://openvz.org/Quick_Installation_CentOS_6

     第一步:首先下载openvz.repo

    wget -P /etc/yum.repos.d/ https://download.openvz.org/openvz.repo

     然后只要用下面这个安装。

    yum install vzctl

    就会有下面依赖都会装起来

    ======================================================================================================
     Package             Arch            Version                       Repository                    Size
    ======================================================================================================
    Installing:
     vzctl               x86_64          4.9.4-1                       openvz-utils                 145 k
    Installing for dependencies:
     rsync               x86_64          3.0.6-12.el6                  base                         335 k
     vzctl-core          x86_64          4.9.4-1                       openvz-utils                 289 k
     vzkernel            x86_64          2.6.32-042stab128.2           openvz-kernel-rhel6           35 M
     vzquota             x86_64          3.1-1                         openvz-utils                  93 k
     vzstats             noarch          0.5.5-1                       openvz-utils                  23 k
    
    Transaction Summary
    ======================================================================================================
    Install       6 Package(s)

    安装完成后,有一些重要信息值得阅读

    Adding the following option to /etc/modprobe.d/openvz.conf:
    
            options nf_conntrack ip_conntrack_disable_ve0=0
    
    This change will take effect only after the next reboot.
    
    NOTE: if you need to change this setting, edit /etc/modprobe.d/openvz.conf
    now. DO NOT REMOVE the line, or it will be re-added!
    ============================================================================
    vz-postinstall: /etc/sysconfig/selinux: set SELINUX = disabled
    vz-postinstall: /etc/yum.conf: add exclude=kernel
    Invalid UUID , aborting

    最后重启CentOS6.9系统

    第二步:开启包转发 

    vi /etc/sysctl.conf

    然后打开

    net.ipv4.ip_forward = 1

    这样主机的路由才会通

    开机教程,这样开的是一台全功能的centos7

    vzctl create 241018 --hostname yy241018 --ostemplate centos-7-x86_64 --ipadd 10.42.241.18 --config basic

    也可以开迷你版本

    也可以开ubuntu16.04(这个没迷你版)

    vzctl create 241019 --hostname yy241019 --ostemplate ubuntu-16.04-x86_64 --ipadd 10.42.241.19 --config basic

     这个ubuntu16.04开机无法SSH登录,换个14.04的

    vzctl create 241020 --ostemplate ubuntu-14.04-x86_64-minimal --ipadd 10.42.241.20 --config basic

    这样就创建一台OVZ,这个OVZ的模板是自动下载的

    --2018-04-04 10:28:00--  http://download.openvz.org/template/precreated/centos-7-x86_64.tar.gz
    Resolving download.openvz.org... 185.231.241.69
    Connecting to download.openvz.org|185.231.241.69|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 221597800 (211M) [application/x-gzip]
    Saving to: `/vz/template/cache/centos-7-x86_64.tar.gz'


    但是如果ploop没装会报错的

    Can't load ploop library: libploop.so: cannot open shared object file: No such file or directory
    Please install ploop packages!
    Alternatively, if you can't or don't want to use ploop, please
    add --layout simfs option, or set VE_LAYOUT=simfs in /etc/vz/vz.conf
    Creation of container private area failed

    以上就是报错的代码

    飞儿传媒www.firadio.com
  • 相关阅读:
    Vue 实现前进刷新,后退不刷新的效果
    chrome浏览器的跨域设置——包括版本49前后两种设置
    Promise.all和Promise.race区别,和使用场景
    滚动条默认最底部
    使用react进行父子组件传值
    java 数组基础学习(一维二维数组)
    react项目 使用echarts
    Python的hasattr() getattr() setattr() 函数使用方法详解
    【线性判别】Fisher线性判别(转)
    【semantic segmentation】Pyramid Scene Parsing Network(转)
  • 原文地址:https://www.cnblogs.com/firadio/p/8714959.html
Copyright © 2020-2023  润新知