lxc 容器基础配置篇
一, 首先配置lxc需要的网卡断

吧eth0复制一份变为br0
配置br0

配置eth0

重启网卡
/etc/init.d/network restart
安装lxc软件 需要epel源---
yum install lxc* libcgroup* -y
安装完成过后:

启动lxc

配置lxc源



复制内容 到命令行擦做


自己选择自己系统的版本信息,
主要
ppc的话事IBM的
arm64手机那种
amd63 X64
i386 X32
查看下载的文件内容

下载一个模板

查看模板信息

启动lxc

发现需要登入但是并没有密码
新建一个连接

进去啦...

发现没有网
lxc配置网络
新建一个连接配置文件

重启服务:
新开连接

在启动lxc
更改容器的DNS
resolve.conf
新建连接配置容器

容器中查看已经同步

cnetos6 配置地址


在容器中ping 百度
更改yum源文件
vim /var/lib/lxc/centos6-muban/rootfs/etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
# [base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
安装ssh
安装ssh
yum install openssh-server -y
ssh远程连接lxc
lxc常用命令:
lxc -ls 查看lxc容器列表
lxc-destroy 删除一个容器
lxc-start 启动 lxc-start -n centos6-muban
lxc-stop 停止一个容器 lxc-stop -n centos6-muban
lxc-clone 克隆lxc lxc-clone centos6-muban web

lxc 容器基础配置篇的更多相关文章
- 深入浅出 webpack 之基础配置篇
前言 前端工程化经历过很多优秀的工具,例如 Grunt.Gulp.webpack.rollup 等等,每种工具都有自己适用的场景,而现今应用最为广泛的当属 webpack 打包了,因此学习好 webp ...
- webpack3.x版本实战案例【基础配置篇】(一)
本文旨在通过一个一个实战例子来学习webpack如何配置,更加深入的学习webpack在实战项目中如何配置. 我们学习哪些配置呢? [基础配置] 打包JS 编译ES6 编译typeScript 打包公 ...
- 提高开发效率之VS Code基础配置篇
背景 之前一直是只用WebStorm作为IDE来编写代码,但是由于: 手中的这台Mac接了两个显示器以后,使用WebStorm会有卡顿. WebStorm需要付费(虽然可以通过某方法和谐). 所以需要 ...
- 从零开始用electron整个跨平台桌面应用---基础配置篇
1.安装node.npm node以及npm都需要是最新版本(版本过低有坑) 2.安装淘宝镜像cnpm(建议,下载较快) npm install -g cnpm --registry=https:// ...
- 阿里云ECS服务器Linux环境下配置php服务器(一)--基础配置篇
开始安装软件了,我们需要安装的软件有apache,php和MySQL. ps:如果你购买的是北京的服务器,有个安全组需要设置,我全部用的默认设置,暂时还没发现会有什么影响. 首先关闭SELINUX(S ...
- 【MM系列】SAP MM模块-基础配置第一篇
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[MM系列]SAP MM模块-基础配置第一篇 ...
- 【Cocos2d-Js基础教学(1)JS -Mac配置篇】
一.准备工作 Windows配置篇请见 http://cn.cocos2d-x.org/tutorial/show?id=1396 1.安装python 2.下载Android SDK Android ...
- 【串线篇】spring boot嵌入式Servlet容器自动配置原理
EmbeddedServletContainerAutoConfiguration:嵌入式的Servlet容器自动配置? @AutoConfigureOrder(Ordered.HIGHEST_PREC ...
- SpringMVC基础配置(通过注解配置,非xml配置)
SpringMVC是什么,有多火,我这里就不再啰嗦了,SpringMVC比Struts2好用太多,我在学校的时候私下里两种都接触过,对比之后果断选择了SpringMVC,后来在做Android应用开发 ...
随机推荐
- 设计模式08: Composite 组合模式(结构型模式)
Composite 组合模式(结构型模式) 对象容器的问题在面向对象系统中,我们常会遇到一类具有“容器”特征的对象——即他们在充当对象的同时,又是其他对象的容器. public interface I ...
- Math对象的使用
1. Math.floor() === 向下取整 2.Math.random() === 取一个浮点随机数 3.Math.round() === 四舍五入后一个最接近的整数 4.Math.ceil() ...
- 读写文本文件之StreamReader和StreamWriter
private string _filePath = @"1.txt"; //查询文件是否存在,如果不存在,则创建 if (!File.Exists(_filePath)) { u ...
- php+jquery 实现 ajax上传图片到非当前服务器
用 html file控件上传图片,因为 $_FILES["file"] 是传到当前服务器,想要上传到另外一个服务器需要通过服务器脚本实现. 1.图片上传 引入jquery 和 a ...
- java 列表与集合总结
列表与集合 (一切输出都用for each!丢弃迭代器) 列表List 1 顺序表 Arraylist 适用于静态查找2 链式双向表 Linkedlist 适用于增删该查3 (容器) Vecto ...
- Educational Codeforces Round 62 (Rated for Div. 2)E(染色DP,构造,思维,组合数学)
#include<bits/stdc++.h>using namespace std;const long long mod=998244353;long long f[200007][2 ...
- kali linux之BurpSuite
web安全工具中的瑞士军刀,统一的集成工具发现web安全漏洞 所有的工具共享一个能处理并显示http消息的可扩展框架, 模块之间无缝交换信息. 有free版和professional版,java开发, ...
- java中容器的概念
容器:顾名思义,装东西的器物至于spring中bean,aop,ioc等一些都只是实现的方式具体容器哪些值得我们借鉴,我个人觉得是封装的思想.将你一个独立的系统功能放到一个容器之中,可以当做一个大的接 ...
- vs引入资源
把资源放在程序目录中,然后点击显示所有文件,然后在资源上右键“包括在项目中”
- 在FC中如何获取fcdot文件
在FlexiCapture中一些客户在问如何获取.fcdot文件(在测试序列号下或者没有测试模板的情况下) 第一步: 1.查看License Manager查看是否找到序列号 首先我们在开始菜单里面打 ...