<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Ubuntu on 众诺博客</title>
        <link>https://blog.ganzi.fun/tags/ubuntu/</link>
        <description>Recent content in Ubuntu on 众诺博客</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>zh-cn</language>
        <lastBuildDate>Sun, 21 May 2023 00:35:43 +0000</lastBuildDate><atom:link href="https://blog.ganzi.fun/tags/ubuntu/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>PVE最小化安装Ubuntu之lxc下安装</title>
            <link>https://blog.ganzi.fun/pve-ubuntu.html</link>
            <pubDate>Sun, 21 May 2023 00:35:43 +0000</pubDate>
            <guid>https://blog.ganzi.fun/pve-ubuntu.html</guid>
            <description>&lt;p&gt;LXC在系统调用上，因为直接使用的是pve的内核，cpu和&lt;a class=&#34;link&#34; href=&#34;https://www.smzdm.com/fenlei/neicun/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;内存&lt;/a&gt;的占用都是非常小的，所以可以轻量化部署，另外在其他硬件上部署docker，功能，路径上可能都有问题，所以，我们直接安装lxc-ubuntu，来部署docker。&lt;/p&gt;&#xA;&lt;p&gt;因为pve内置源的问题，我已经直接把官方的ubuntu lxc版本下载好了&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;http://pan.baidu.com/s/1H0YXrHdSER-ffdn7Y_CCdg&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;http://pan.baidu.com/s/1H0YXrHdSER-ffdn7Y_CCdg&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;提取码：rjrc&lt;/p&gt;&#xA;&lt;h2 id=&#34;1上传镜像&#34;&gt;1.上传镜像&#xA;&lt;/h2&gt;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://post.smzdm.com/p/avwo3q7m/pic_2/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;!-- raw HTML omitted --&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;进入对应的文件夹，上传我们下载好的文件，我用的finalshell 直接支持文件上传。&lt;/p&gt;&#xA;&lt;h2 id=&#34;2创建容器&#34;&gt;2.创建容器&#xA;&lt;/h2&gt;&lt;p&gt;上传完成后，我们点击右上角，创建ct&lt;/p&gt;&#xA;&lt;p&gt;主机名随意&lt;/p&gt;&#xA;&lt;p&gt;设置改密码&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;不勾选无特权容器&lt;/strong&gt;，如果勾选，启动docker的时候会报错&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://post.smzdm.com/p/avwo3q7m/pic_3/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;!-- raw HTML omitted --&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;点击下一步之后，模板选择我们上传好的文件&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://post.smzdm.com/p/avwo3q7m/pic_4/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;!-- raw HTML omitted --&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.smzdm.com/ju/s2441lm/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;磁盘&lt;/a&gt;大小 根据需求选择，我这里默认10个g&lt;/p&gt;&#xA;&lt;p&gt;cpu核心数量选择4 根据需求选择&lt;/p&gt;&#xA;&lt;p&gt;内存512即可，当然根据你将使用的容器，适当扩大。&lt;/p&gt;&#xA;&lt;p&gt;网络这里，左侧无需修改，右侧容易选择dhcp，由&lt;a class=&#34;link&#34; href=&#34;https://www.smzdm.com/fenlei/luyouqi/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;路由器&lt;/a&gt;分配&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://post.smzdm.com/p/avwo3q7m/pic_5/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;!-- raw HTML omitted --&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;dns设置为路由器地址，因为我的pve已经设置过了，这里我不需要修改。&lt;/p&gt;&#xA;&lt;p&gt;创建完成后不要着急启动。&lt;/p&gt;&#xA;&lt;h2 id=&#34;3设置权限&#34;&gt;3.设置权限&#xA;&lt;/h2&gt;&lt;p&gt;打开创建好的虚拟机&lt;/p&gt;&#xA;&lt;p&gt;点击选项&lt;/p&gt;&#xA;&lt;p&gt;功能&lt;/p&gt;&#xA;&lt;p&gt;勾选嵌套后保存&lt;/p&gt;&#xA;&lt;p&gt;经典的俄罗斯套娃模式&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://post.smzdm.com/p/avwo3q7m/pic_6/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;!-- raw HTML omitted --&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;进入pve的shell，为我们新创建的系统设置软件权限，否则docker无法启用。&lt;/p&gt;&#xA;&lt;p&gt;我们用finalshell打开pve，登陆后&lt;/p&gt;&#xA;&lt;p&gt;输入cd /etc/pve/lxc/&lt;/p&gt;&#xA;&lt;p&gt;下方打开指定文件夹，我们来编辑相关的文件，将代码复制后，保存即可&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://post.smzdm.com/p/avwo3q7m/pic_7/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;!-- raw HTML omitted --&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;添加代码如下&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;lxc.apparmor.profile: unconfined&lt;/p&gt;&#xA;&lt;p&gt;lxc.cgroup.devices.allow: a&lt;/p&gt;&#xA;&lt;p&gt;lxc.cap.drop:&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;</description>
        </item></channel>
</rss>
