<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>爱上感觉</title>
  
  
  <link href="https://www.dmark.us.kg/atom.xml" rel="self"/>
  
  <link href="https://www.dmark.us.kg/"/>
  <updated>2024-10-02T02:42:24.480Z</updated>
  <id>https://www.dmark.us.kg/</id>
  
  <author>
    <name>青春有你</name>
    
  </author>
  
  <generator uri="https://hexo.io/">Hexo</generator>
  
  <entry>
    <title>Linux命令大全</title>
    <link href="https://www.dmark.us.kg/html/linux-command/"/>
    <id>https://www.dmark.us.kg/html/linux-command/</id>
    <published>2024-10-01T13:53:58.000Z</published>
    <updated>2024-10-02T02:42:24.480Z</updated>
    
    <content type="html"><![CDATA[<p>Linux 命令大全</p><h2 id="1、文件管理"><a href="#1、文件管理" class="headerlink" title="1、文件管理"></a>1、文件管理</h2><p>catchattrchgrpchmod<br>chowncksumcmpdiff<br>diffstatfilefindgit<br>gitviewindentcutln<br>lesslocatelsattrmattrib<br>mcmdelmdirmktemp<br>moremmovemreadmren<br>mtoolsmtoolstestmvod<br>pastepatchrcprm<br>slocatesplitteetmpwatch<br>touchumaskwhichcp<br>whereismcopymshowfatrhmask<br>scpawkreadupdatedb</p><h2 id="2、文档编辑"><a href="#2、文档编辑" class="headerlink" title="2、文档编辑"></a>2、文档编辑</h2><p>colcolrmcommcsplit<br>edegrepexfgrep<br>fmtfoldgrepispell<br>jedjoejoinlook<br>mtypepicorgrepsed<br>sortspelltrexpr<br>uniqwclet </p><h2 id="3、文件传输"><a href="#3、文件传输" class="headerlink" title="3、文件传输"></a>3、文件传输</h2><p>lprmlprlpqlpd<br>byeftpuutouupick<br>uucpuucicotftpncftp<br>ftpshutftpwhoftpcount </p><h2 id="4、磁盘管理"><a href="#4、磁盘管理" class="headerlink" title="4、磁盘管理"></a>4、磁盘管理</h2><p>cddfdirsdu<br>edquotaejectmcdmdeltree<br>mdumkdirmlabelmmd<br>mrdmzippwdquota<br>mountmmountrmdirrmt<br>stattreeumountls<br>quotacheckquotaofflndirrepquota<br>quotaon   </p><h2 id="5、磁盘维护"><a href="#5、磁盘维护" class="headerlink" title="5、磁盘维护"></a>5、磁盘维护</h2><p>badblockscfdiskdde2fsck<br>ext2edfsckfsck.minixfsconf<br>fdformathdparmmformatmkbootdisk<br>mkdosfsmke2fsmkfs.ext2mkfs.msdos<br>mkinitrdmkisofsmkswapmpartition<br>swaponsymlinkssyncmbadblocks<br>mkfs.minixfsck.ext2fdisklosetup<br>mkfssfdiskswapoff </p><h2 id="6、网络通讯"><a href="#6、网络通讯" class="headerlink" title="6、网络通讯"></a>6、网络通讯</h2><p>apachectlarpwatchdipgetty<br>mingettyuuxtelnetuulog<br>uustatppp-offnetconfignc<br>httpdifconfigminicommesg<br>dnsconfwallnetstatping<br>pppstatssambasetserialtalk<br>traceroutettynewaliasesuuname<br>netconfwritestatserialefax<br>pppsetuptcpdumpytalkcu<br>smbdtestparmsmbclientshapecfg</p><h2 id="7、系统管理"><a href="#7、系统管理" class="headerlink" title="7、系统管理"></a>7、系统管理</h2><p>adduserchfnuseradddate<br>exitfingerfwhiossleep<br>suspendgroupdelgroupmodhalt<br>killlastlastblogin<br>lognamelogoutpsnice<br>procinfotoppstreereboot<br>rloginrshsliploginscreen<br>shutdownrwhosudogitps<br>swatchtloadlogrotateuname<br>chshuserconfuserdelusermod<br>vlockwhowhoamiwhois<br>newgrprenicesuskill<br>widgroupaddfree</p><h2 id="8、系统设置"><a href="#8、系统设置" class="headerlink" title="8、系统设置"></a>8、系统设置</h2><p>resetclearaliasdircolors<br>aumixbindchrootclock<br>crontabdeclaredepmoddmesg<br>enableevalexportpwunconv<br>grpconvrpminsmodkbdconfig<br>liloliloconfiglsmodminfo<br>setmodprobentsysvmouseconfig<br>passwdpwconvrdateresize<br>rmmodgrpunconvmodinfotime<br>setupsndconfigsetenvsetconsole<br>timeconfigulimitunsetchkconfig<br>apmdhwclockmkkickstartfbset<br>unaliasSVGATextModegpasswd </p><h2 id="9、备份压缩"><a href="#9、备份压缩" class="headerlink" title="9、备份压缩"></a>9、备份压缩</h2><p>arbunzip2bzip2bzip2recover<br>gunzipunarjcompresscpio<br>dumpuuencodegzexegzip<br>lharestoretaruudecode<br>unzipzipzipinfo </p><h2 id="10、设备管理"><a href="#10、设备管理" class="headerlink" title="10、设备管理"></a>10、设备管理</h2><p>setledsloadkeysrdevdumpkeys<br>MAKEDEVpoweroff  </p><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;Linux 命令大全&lt;/p&gt;
&lt;h2 id=&quot;1、文件管理&quot;&gt;&lt;a href=&quot;#1、文件管理&quot; class=&quot;headerlink&quot; title=&quot;1、文件管理&quot;&gt;&lt;/a&gt;1、文件管理&lt;/h2&gt;&lt;p&gt;cat	chattr	chgrp	chmod&lt;br&gt;chown	cksu</summary>
      
    
    
    
    <category term="linux" scheme="https://www.dmark.us.kg/categories/linux/"/>
    
    
    <category term="linux" scheme="https://www.dmark.us.kg/tags/linux/"/>
    
    <category term="命令" scheme="https://www.dmark.us.kg/tags/%E5%91%BD%E4%BB%A4/"/>
    
  </entry>
  
  <entry>
    <title>linux介绍</title>
    <link href="https://www.dmark.us.kg/html/linux/"/>
    <id>https://www.dmark.us.kg/html/linux/</id>
    <published>2024-10-01T13:45:44.000Z</published>
    <updated>2024-10-01T13:58:20.342Z</updated>
    
    <content type="html"><![CDATA[<h2 id="Linux-是一种自由和开放源码的类-UNIX-操作系统。"><a href="#Linux-是一种自由和开放源码的类-UNIX-操作系统。" class="headerlink" title="Linux 是一种自由和开放源码的类 UNIX 操作系统。"></a>Linux 是一种自由和开放源码的类 UNIX 操作系统。</h2><h3 id="Linux-英文解释为-Linux-is-not-Unix。"><a href="#Linux-英文解释为-Linux-is-not-Unix。" class="headerlink" title="Linux 英文解释为 Linux is not Unix。"></a>Linux 英文解释为 Linux is not Unix。</h3><p>Linux 是在 1991 由林纳斯·托瓦兹在赫尔辛基大学上学时创立的，主要受到 Minix 和 Unix 思想的启发。</p><h3 id="本教程，我们将为大家介绍如何使用-Linux。"><a href="#本教程，我们将为大家介绍如何使用-Linux。" class="headerlink" title="本教程，我们将为大家介绍如何使用 Linux。"></a>本教程，我们将为大家介绍如何使用 Linux。</h3><p>Linux 其实很容易学，相信你们能很快学会。</p><h2 id="现在开始学习-Linux-！"><a href="#现在开始学习-Linux-！" class="headerlink" title="现在开始学习 Linux ！"></a>现在开始学习 Linux ！</h2><h3 id="谁适合阅读？"><a href="#谁适合阅读？" class="headerlink" title="谁适合阅读？"></a>谁适合阅读？</h3><p>本教程针对的是Linux服务器方面的知识，适合从事运维或后端开发的人员阅读。</p><h3 id="需要具备的知识？"><a href="#需要具备的知识？" class="headerlink" title="需要具备的知识？"></a>需要具备的知识？</h3><p>如果你熟悉操作系统方面的知识，相信你会很快学会 Linux。</p><p>本教程将于 Linux 的发行版本 Centos 为例来为大家介绍 Linux 系统的应用。</p><h2 id="Linux-是开源的"><a href="#Linux-是开源的" class="headerlink" title="Linux 是开源的"></a>Linux 是开源的</h2><p>Linux 遵循 GNU 通用公共许可证（GPL），任何个人和机构都可以自由地使用 Linux 的所有底层源代码，也可以自由地修改和再发布。</p><p>由于 Linux 是自由软件，任何人都可以创建一个符合自己需求的 Linux 发行版。</p><h2 id="目前主流的-Linux-版本有："><a href="#目前主流的-Linux-版本有：" class="headerlink" title="目前主流的 Linux 版本有："></a>目前主流的 Linux 版本有：</h2><h3 id="Debian（及其派生版本Ubuntu、Linux-Mint）"><a href="#Debian（及其派生版本Ubuntu、Linux-Mint）" class="headerlink" title="Debian（及其派生版本Ubuntu、Linux Mint）"></a>Debian（及其派生版本Ubuntu、Linux Mint）</h3><h3 id="Fedora（及其相关版本Red-Hat-Enterprise-Linux、CentOS）"><a href="#Fedora（及其相关版本Red-Hat-Enterprise-Linux、CentOS）" class="headerlink" title="Fedora（及其相关版本Red Hat Enterprise Linux、CentOS）"></a>Fedora（及其相关版本Red Hat Enterprise Linux、CentOS）</h3><h3 id="openSUSE"><a href="#openSUSE" class="headerlink" title="openSUSE"></a>openSUSE</h3><p>…<br>Linux 内核最初只是由芬兰人林纳斯·托瓦兹（Linus Torvalds）在赫尔辛基大学上学时出于个人爱好而编写的。</p><p>Linux 是一套免费使用和自由传播的类 Unix 操作系统，是一个基于 POSIX 和 UNIX 的多用户、多任务、支持多线程和多 CPU 的操作系统。</p><p>Linux 能运行主要的 UNIX 工具软件、应用程序和网络协议。它支持 32 位和 64 位硬件。Linux 继承了 Unix 以网络为核心的设计思想，是一个性能稳定的多用户网络操作系统。</p><h2 id="Linux-的发行版"><a href="#Linux-的发行版" class="headerlink" title="Linux 的发行版"></a>Linux 的发行版</h2><p>Linux 的发行版说简单点就是将 Linux 内核与应用软件做一个打包。</p><p><img src="https://pic.langman.us.kg/img/a1001/20241001215237.png"></p><p>目前市面上较知名的发行版有：Ubuntu、RedHat、CentOS、Debian、Fedora、SuSE、OpenSUSE、Arch Linux、SolusOS 等。</p><p><img src="https://pic.langman.us.kg/img/a1001/20241001215301.png"></p><h2 id="Linux-应用领域"><a href="#Linux-应用领域" class="headerlink" title="Linux 应用领域"></a>Linux 应用领域</h2><p>今天各种场合都有使用各种 Linux 发行版，从嵌入式设备到超级计算机，并且在服务器领域确定了地位，通常服务器使用 LAMP（Linux + Apache + MySQL + PHP）或 LNMP（Linux + Nginx+ MySQL + PHP）组合。</p><p>目前 Linux 不仅在家庭与企业中使用，并且在政府中也很受欢迎。</p><p>巴西联邦政府由于支持 Linux 而世界闻名。<br>有新闻报道俄罗斯军队自己制造的 Linux 发布版的，做为 G.H.ost 项目已经取得成果。<br>印度的 Kerala 联邦计划在向全联邦的高中推广使用 Linux。<br>中华人民共和国为取得技术独立，在龙芯处理器中排他性地使用 Linux。<br>在西班牙的一些地区开发了自己的 Linux 发布版，并且在政府与教育领域广泛使用，如 Extremadura 地区的 gnuLinEx 和 Andalusia 地区的 Guadalinex。<br>葡萄牙同样使用自己的 Linux 发布版 Caixa Mágica，用于 Magalh?es 笔记本电脑和 e-escola 政府软件。<br>法国和德国同样开始逐步采用 Linux。</p><h2 id="Linux-vs-Windows"><a href="#Linux-vs-Windows" class="headerlink" title="Linux vs Windows"></a>Linux vs Windows</h2><p>目前国内 Linux 更多的是应用于服务器上，而桌面操作系统更多使用的是 Windows。主要区别如下</p><h3 id="Windows"><a href="#Windows" class="headerlink" title="Windows"></a>Windows</h3><p>1、界面统一，外壳程序固定所有 Windows 程序菜单几乎一致，快捷键也几乎相同。<br>2、驱动程序丰富，版本更新频繁。默认安装程序里面一般包含有该版本发布时流行的硬件驱动程序，<br>   之后所出的新硬件驱动依赖于硬件厂商提供。对于一些老硬件，如果没有了原配的驱动有时很难支持。<br>   另外，有时硬件厂商未提供所需版本的 Windows 下的驱动，也会比较头痛。<br>3、使用比较简单，容易入门。图形化界面对没有计算机背景知识的用户使用十分有利。<br>4、系统构造复杂、变化频繁，且知识、技能淘汰快，深入学习困难。<br>5、每一种特定功能可能都需要商业软件的支持，需要购买相应的授权。</p><h3 id="Linux"><a href="#Linux" class="headerlink" title="Linux"></a>Linux</h3><p>1、图形界面风格依发布版不同而不同，可能互不兼容。GNU&#x2F;Linux 的终端机是从 UNIX 传承下来，基本命令和操作方法也几乎一致。<br>2、由志愿者开发，由 Linux 核心开发小组发布，很多硬件厂商基于版权考虑并未提供驱动程序，尽管多数无需手动安装，<br>   但是涉及安装则相对复杂，使得新用户面对驱动程序问题（是否存在和安装方法）会一筹莫展。<br>   但是在开源开发模式下，许多老硬件尽管在Windows下很难支持的也容易找到驱动。<br>   HP、Intel、AMD 等硬件厂商逐步不同程度支持开源驱动，问题正在得到缓解。<br>3、图形界面使用简单，容易入门。文字界面，需要学习才能掌握。<br>4、系统构造简单、稳定，且知识、技能传承性好，深入学习相对容易。<br>5、大部分软件都可以自由获取，同样功能的软件选择较少。</p><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;h2 id=&quot;Linux-是一种自由和开放源码的类-UNIX-操作系统。&quot;&gt;&lt;a href=&quot;#Linux-是一种自由和开放源码的类-UNIX-操作系统。&quot; class=&quot;headerlink&quot; title=&quot;Linux 是一种自由和开放源码的类 UNIX 操作系统。&quot;&gt;&lt;/a</summary>
      
    
    
    
    <category term="linux" scheme="https://www.dmark.us.kg/categories/linux/"/>
    
    
    <category term="linux" scheme="https://www.dmark.us.kg/tags/linux/"/>
    
  </entry>
  
  <entry>
    <title>测试图片使用效果</title>
    <link href="https://www.dmark.us.kg/html/pict/"/>
    <id>https://www.dmark.us.kg/html/pict/</id>
    <published>2024-09-29T00:11:54.000Z</published>
    <updated>2024-10-01T07:44:43.197Z</updated>
    
    <content type="html"><![CDATA[<p>1<br><img src="https://cdn.jsdelivr.net/gh/aimenglang/mypicgogo@main/pics/1.png" alt="图片1"><br>2<br><img src="https://pic.langman.us.kg/2024/10/47922863682d6a0219c7096f88cc2322.png" alt="图片2"></p><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;1&lt;br&gt;&lt;img src=&quot;https://cdn.jsdelivr.net/gh/aimenglang/mypicgogo@main/pics/1.png&quot; alt=&quot;图片1&quot;&gt;&lt;br&gt;2&lt;br&gt;&lt;img src=&quot;https://pic.langman.us.kg/2</summary>
      
    
    
    
    
  </entry>
  
  <entry>
    <title>互联网是如何工作的呢？如何制作属于您自己的网站？</title>
    <link href="https://www.dmark.us.kg/html/www/"/>
    <id>https://www.dmark.us.kg/html/www/</id>
    <published>2024-09-28T23:51:02.000Z</published>
    <updated>2024-10-01T14:04:47.328Z</updated>
    
    <content type="html"><![CDATA[<h2 id="互联网是如何工作的呢？如何制作属于您自己的网站？"><a href="#互联网是如何工作的呢？如何制作属于您自己的网站？" class="headerlink" title="互联网是如何工作的呢？如何制作属于您自己的网站？"></a>互联网是如何工作的呢？如何制作属于您自己的网站？</h2><h2 id="什么是网站主机"><a href="#什么是网站主机" class="headerlink" title="什么是网站主机?"></a>什么是网站主机?</h2><p>什么是 Internet 服务提供商（ISP）？什么是 DNS？</p><h2 id="什么是万维网（-World-Wide-Web）？"><a href="#什么是万维网（-World-Wide-Web）？" class="headerlink" title="什么是万维网（ World Wide Web）？"></a>什么是万维网（ World Wide Web）？</h2><p>Web是一个遍布全球的计算机网络。<br>网络中的所有计算机均可彼此相互通信。<br>所有的计算机都使用被称为 HTTP 的通信标准。</p><h2 id="WWW-如何工作？"><a href="#WWW-如何工作？" class="headerlink" title="WWW 如何工作？"></a>WWW 如何工作？</h2><p>Web 信息存储于被称为网页的文档中。<br>网页是存储于名为 web 服务器的计算机中的文件。<br>读取网页的计算机可称为 web 客户机。<br>web 客户机通过名为 web 浏览器的程序来查看页面。<br>主流的浏览器有 Google Chrome、Microsoft Edge 和 Firefox。<br><img src="https://pic.langman.us.kg/img/a1001/20241001214028.png"></p><h2 id="浏览器如何读取网页？"><a href="#浏览器如何读取网页？" class="headerlink" title="浏览器如何读取网页？"></a>浏览器如何读取网页？</h2><p>浏览器可以通过一个请求 (request) 从 web 服务器读取页面。<br>请求是包含页面地址的标准 HTTP 请求。<br>网页地址实例: <a href="https://www.apple.com/">https://www.apple.com/</a></p><h2 id="浏览器如何显示网页？"><a href="#浏览器如何显示网页？" class="headerlink" title="浏览器如何显示网页？"></a>浏览器如何显示网页？</h2><p>所有的网页都含有供显示的指令。<br>浏览器通过读取这些指令来显示页面。<br>最常用的显示指令是 HTML 标签。<br>HTML 标签格式：<p>这是一个段落。</p>.<br>如果你想学习更多关于HTML的知识请访问我们的 HTML 教程.</p><h2 id="什么是-Web-服务器？"><a href="#什么是-Web-服务器？" class="headerlink" title="什么是 Web 服务器？"></a>什么是 Web 服务器？</h2><p>您的所有网页的集合被称为网站。<br>要想让别人看到您的页面，就必须对网站进行发布。<br>您必须把网站拷贝到一台 web 服务器，才能完成对网站的发布。<br>如果您的 PC 连入网络的话，您也可以把它当作一台 web 服务器。<br>大多数的情况是使用由 ISP 提供的 web 主机。</p><h2 id="什么是-ISP-Internet-Service-Provider"><a href="#什么是-ISP-Internet-Service-Provider" class="headerlink" title="什么是 ISP( Internet Service Provider )?"></a>什么是 ISP( Internet Service Provider )?</h2><p>ISP 是 Internet Service Provider（互联网服务提供商）的缩写，它指的是提供互联网连接服务的公司或组织。</p><p>中国三大 ISP：中国电信，中国移动，中国联通。</p><p>ISP 指的是 Internet 服务提供商。<br>ISP 可提供 Internet 服务。<br>最常见的 Internet 服务是网站主机。<br>网站主机服务可把您的网站存放到一个公共的服务器上。<br>网站主机服务通常包括了域名注册服务。<br>DNS<br>域名系统（英语：Domain Name System，缩写：DNS）是互联网的一项服务。它作为将域名和IP地址相互映射的一个分布式数据库，能够使人更方便地访问互联网。<br><img src="https://pic.langman.us.kg/img/a1001/20241001214120.png"></p><h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>如果您希望其它人看到您的网站，就必须把网站拷贝到一个公共的服务器。即使您可以使用自己的 PC 来做 web 服务器，最常见的做法还是通过 ISP 来存放网站。</p><p>包含在 web 主机解决方案中的还有域名注册和标准的电子邮件服务。</p><p>您可以在接下来的章节阅读到更多有关域名注册、电子邮件和其他服务的内容。</p><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;h2 id=&quot;互联网是如何工作的呢？如何制作属于您自己的网站？&quot;&gt;&lt;a href=&quot;#互联网是如何工作的呢？如何制作属于您自己的网站？&quot; class=&quot;headerlink&quot; title=&quot;互联网是如何工作的呢？如何制作属于您自己的网站？&quot;&gt;&lt;/a&gt;互联网是如何工作的呢？如何制</summary>
      
    
    
    
    <category term="知识" scheme="https://www.dmark.us.kg/categories/%E7%9F%A5%E8%AF%86/"/>
    
    <category term="信息" scheme="https://www.dmark.us.kg/categories/%E7%9F%A5%E8%AF%86/%E4%BF%A1%E6%81%AF/"/>
    
    
    <category term="互联网" scheme="https://www.dmark.us.kg/tags/%E4%BA%92%E8%81%94%E7%BD%91/"/>
    
    <category term="网站" scheme="https://www.dmark.us.kg/tags/%E7%BD%91%E7%AB%99/"/>
    
    <category term="web" scheme="https://www.dmark.us.kg/tags/web/"/>
    
    <category term="www" scheme="https://www.dmark.us.kg/tags/www/"/>
    
  </entry>
  
  <entry>
    <title>市面常见浏览器介绍</title>
    <link href="https://www.dmark.us.kg/html/browser/"/>
    <id>https://www.dmark.us.kg/html/browser/</id>
    <published>2024-09-28T23:50:56.000Z</published>
    <updated>2024-10-01T14:13:00.769Z</updated>
    
    <content type="html"><![CDATA[<p>浏览器<br><img src="https://pic.langman.us.kg/img/a1001/20241001213400.png"><br>Internet Explorer（IE浏览器）<br>Internet Explorer（IE浏览器）是微软公司（Microsoft）发行的一款 web 浏览器。 它发布于 1995 年，是当今最流行的浏览器之一。</p><p>Microsoft Edge 浏览器<br>微软新一代浏览器。 微软新的 IE 浏览器项目 Project Spartan 在 Build 2015 上正式更名为 Microsoft Edge。最新的 Edge 采用了 Chromium 内核，当然也兼容以前 IE 的功能。</p><p>ChromeGoogle Chrome（谷歌浏览器）<br>Google Chrome（谷歌浏览器）是由 Google 公司开发一款开源免费的 web 浏览器。它发布于 2008 年，是当今最常用的浏览器。</p><p>FirefoxFirefox（火狐浏览器）<br>Firefox（火狐浏览器）是来自 Mozilla 的一款 web 浏览器。它发布于 2004 年，也是当今最流行的浏览器之一。</p><p>SafariApple Safari（苹果 Safari 浏览器）<br>Safari 是由苹果公司开发的一款 web 浏览器，它是 Mac 系统的默认浏览器。Safari 以其时尚的设计而著称。</p><p>OperaOpera 浏览器<br>Opera 是挪威人发明的一款 web 浏览器。它以下列特性而闻名于世：快速小巧、符合工业标准、适用于多种操作系统。对于一系列小型设备诸如手机和掌上电脑来说，Opera 无疑是首选的浏览器。</p><p>MozillaMozilla 项目<br>Mozilla 项目是从 Netscape 的基础上发展起来的。今天，基于 Mozilla 的浏览器已经演变为互联网上最大的浏览器家族。</p><p>NetscapeNetscape 浏览器<br>Netscape 是首个商业化的 web 浏览器。它发布于 1994 年。在 IE 的竞争下，Netscape 逐渐丧失了它的市场份额。Netscape 的官方开发结束于 2008 年 2 月。</p><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;浏览器&lt;br&gt;&lt;img src=&quot;https://pic.langman.us.kg/img/a1001/20241001213400.png&quot;&gt;	&lt;br&gt;Internet Explorer（IE浏览器）&lt;br&gt;Internet Explorer（IE浏览器）是微软公司（M</summary>
      
    
    
    
    <category term="知识" scheme="https://www.dmark.us.kg/categories/%E7%9F%A5%E8%AF%86/"/>
    
    <category term="信息" scheme="https://www.dmark.us.kg/categories/%E7%9F%A5%E8%AF%86/%E4%BF%A1%E6%81%AF/"/>
    
    
    <category term="浏览器" scheme="https://www.dmark.us.kg/tags/%E6%B5%8F%E8%A7%88%E5%99%A8/"/>
    
    <category term="ie" scheme="https://www.dmark.us.kg/tags/ie/"/>
    
    <category term="chrome" scheme="https://www.dmark.us.kg/tags/chrome/"/>
    
    <category term="firefox" scheme="https://www.dmark.us.kg/tags/firefox/"/>
    
    <category term="Safari" scheme="https://www.dmark.us.kg/tags/Safari/"/>
    
    <category term="Opera" scheme="https://www.dmark.us.kg/tags/Opera/"/>
    
    <category term="Mozilla" scheme="https://www.dmark.us.kg/tags/Mozilla/"/>
    
    <category term="Netscape" scheme="https://www.dmark.us.kg/tags/Netscape/"/>
    
  </entry>
  
  <entry>
    <title>这里是测试公告效果使用</title>
    <link href="https://www.dmark.us.kg/html/testgo/"/>
    <id>https://www.dmark.us.kg/html/testgo/</id>
    <published>2024-09-28T23:50:44.000Z</published>
    <updated>2024-10-01T03:32:04.271Z</updated>
    
    <content type="html"><![CDATA[<p>欢迎大家来到我的世界。。。</p><p>还没想好怎么测试。</p><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;欢迎大家来到我的世界。。。&lt;/p&gt;
&lt;p&gt;还没想好怎么测试。&lt;/p&gt;
&lt;style&gt;
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 a</summary>
      
    
    
    
    
  </entry>
  
  <entry>
    <title>这里是测试分享视频使用</title>
    <link href="https://www.dmark.us.kg/html/video/"/>
    <id>https://www.dmark.us.kg/html/video/</id>
    <published>2024-09-28T23:45:05.000Z</published>
    <updated>2024-10-01T03:39:08.748Z</updated>
    
    <content type="html"><![CDATA[<div class="video-container">[123](https://youtube.com/shorts/zUsIrI-dcss?si=nnm7non0U3xvKckG)</div><div class="video-container">【环保公益短片《一次》| 让环保成为我们与这颗蓝色星球共存的桥梁 让美好成为现实 我们只需要一次就够了】 https://www.bilibili.com/video/BV11U4y1p7D2/?share_source=copy_web</div>我来看看新闻了。。<style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}<p>.video-container iframe {<br>    position: absolute;<br>    top: 0;<br>    left: 0;<br>    width: 100%;<br>    height: 100%;<br>}<br></style></p>]]></content>
    
    
      
      
    <summary type="html">&lt;div class=&quot;video-container&quot;&gt;
[123](https://youtube.com/shorts/zUsIrI-dcss?si=nnm7non0U3xvKckG)
&lt;/div&gt;
&lt;div class=&quot;video-container&quot;&gt;
【环保公益短片</summary>
      
    
    
    
    
  </entry>
  
  <entry>
    <title>Docker搭建LNMP建站环境</title>
    <link href="https://www.dmark.us.kg/html/docker-lnmp/"/>
    <id>https://www.dmark.us.kg/html/docker-lnmp/</id>
    <published>2024-02-29T18:30:56.000Z</published>
    <updated>2024-09-30T18:51:57.437Z</updated>
    
    <content type="html"><![CDATA[<p>docker搭建建站环境，学习手动搭建网站。！</p><p>我们在搭建过程会使用到LNMP （Linux Nginx Mysql Php）</p><p>学会搭建以后，只要给我们源码就可以搭建网站。 </p><h2 id="更新系统"><a href="#更新系统" class="headerlink" title="更新系统"></a>更新系统</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">apt update -y  &amp;&amp; apt upgrade -y &amp;&amp; apt install -y curl wget <span class="built_in">sudo</span> socat</span><br></pre></td></tr></table></figure><h2 id="安装docker"><a href="#安装docker" class="headerlink" title="安装docker"></a>安装docker</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -fsSL https://get.docker.com | sh</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -L <span class="string">&quot;https://github.com/docker/compose/releases/latest/download/docker-compose-<span class="subst">$(uname -s)</span>-<span class="subst">$(uname -m)</span>&quot;</span> -o /usr/local/bin/docker-compose</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">chmod</span> +x /usr/local/bin/docker-compose</span><br></pre></td></tr></table></figure><h2 id="创建目录"><a href="#创建目录" class="headerlink" title="创建目录"></a>创建目录</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /home</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">mkdir</span> web</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> web</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">mkdir</span> html</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">mkdir</span> mysql</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">mkdir</span> certs</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">touch</span> nginx.conf</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nano docker-compose.yml</span><br></pre></td></tr></table></figure><h2 id="配置docker-compose"><a href="#配置docker-compose" class="headerlink" title="配置docker-compose"></a>配置docker-compose</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line">version: <span class="string">&#x27;3.8&#x27;</span></span><br><span class="line"></span><br><span class="line">services:</span><br><span class="line">  nginx:</span><br><span class="line">    image: nginx</span><br><span class="line">    container_name: nginx</span><br><span class="line">    restart: always</span><br><span class="line">    ports:</span><br><span class="line">      - 80:80</span><br><span class="line">      - 443:443      </span><br><span class="line">    volumes:</span><br><span class="line">      - ./nginx.conf:/etc/nginx/nginx.conf</span><br><span class="line">      - ./certs:/etc/nginx/certs      </span><br><span class="line">      - ./html:/var/www/html</span><br><span class="line"></span><br><span class="line">  php:</span><br><span class="line">    image: php:fpm</span><br><span class="line">    container_name: php</span><br><span class="line">    restart: always</span><br><span class="line">    volumes:</span><br><span class="line">      - ./html:/var/www/html</span><br><span class="line"></span><br><span class="line">  mysql:</span><br><span class="line">    image: mysql</span><br><span class="line">    container_name: mysql</span><br><span class="line">    restart: always</span><br><span class="line">    volumes:</span><br><span class="line">      - ./mysql:/var/lib/mysql</span><br><span class="line">    environment:</span><br><span class="line">      - MYSQL_ROOT_PASSWORD=webroot</span><br><span class="line">      - MYSQL_DATABASE=web</span><br><span class="line">      - MYSQL_USER=kejilion</span><br><span class="line">      - MYSQL_PASSWORD=kejilionYYDS</span><br></pre></td></tr></table></figure><h2 id="申请证书"><a href="#申请证书" class="headerlink" title="申请证书"></a>申请证书</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl https://get.acme.sh | sh</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">~/.acme.sh/acme.sh --register-account -m xxxx@gmail.com</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">~/.acme.sh/acme.sh --issue -d s.kejilion.eu.org --standalone</span><br></pre></td></tr></table></figure><h2 id="下载证书"><a href="#下载证书" class="headerlink" title="下载证书"></a>下载证书</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">~/.acme.sh/acme.sh --installcert -d s.kejilion.eu.org --key-file /home/web/certs/key.pem --fullchain-file /home/web/certs/cert.pem</span><br></pre></td></tr></table></figure><h2 id="NGINX配置"><a href="#NGINX配置" class="headerlink" title="NGINX配置"></a>NGINX配置</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br></pre></td><td class="code"><pre><span class="line">events &#123;</span><br><span class="line">    worker_connections 1024;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">http &#123;</span><br><span class="line"></span><br><span class="line">    include       /etc/nginx/mime.types;</span><br><span class="line">    default_type  application/octet-stream;</span><br><span class="line"></span><br><span class="line">    sendfile        on;</span><br><span class="line">    keepalive_timeout  65;</span><br><span class="line">    </span><br><span class="line">    client_max_body_size 1000m;  </span><br><span class="line">    <span class="comment">#上传限制参数1G以内文件可上传</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># HTTP server</span></span><br><span class="line">server &#123;</span><br><span class="line">    listen 80;</span><br><span class="line">    server_name yuming.com;</span><br><span class="line"></span><br><span class="line">    <span class="comment"># Redirect all HTTP requests to HTTPS</span></span><br><span class="line">    <span class="built_in">return</span> 301 https://$host<span class="variable">$request_uri</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment"># HTTPS server</span></span><br><span class="line">server &#123;</span><br><span class="line">    listen 443 ssl http2;</span><br><span class="line">    server_name yuming.com;</span><br><span class="line"></span><br><span class="line">    <span class="comment"># http2 on;</span></span><br><span class="line">        </span><br><span class="line">    ssl_certificate /etc/nginx/certs/cert.pem;</span><br><span class="line">    ssl_certificate_key /etc/nginx/certs/key.pem;</span><br><span class="line"></span><br><span class="line">    root /var/www/html;</span><br><span class="line">    index index.php;</span><br><span class="line"></span><br><span class="line">    <span class="comment"># rewrite ^/vip.php(.*)$ /vip.php?s=$1 last;</span></span><br><span class="line">        </span><br><span class="line">    try_files <span class="variable">$uri</span> <span class="variable">$uri</span>/ =404;</span><br><span class="line">    </span><br><span class="line">    <span class="comment"># PHP-FPM configuration</span></span><br><span class="line">    location ~ \.php$ &#123;</span><br><span class="line">        fastcgi_pass php:9000;</span><br><span class="line">        fastcgi_index index.php;</span><br><span class="line">        fastcgi_param SCRIPT_FILENAME $document_root<span class="variable">$fastcgi_script_name</span>;</span><br><span class="line">        include fastcgi_params;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h2 id="下载源码"><a href="#下载源码" class="headerlink" title="下载源码"></a>下载源码</h2><p>maccms10</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /home/web &amp;&amp; wget https://github.com/magicblack/maccms_down/raw/master/maccms10.zip &amp;&amp; <span class="built_in">sudo</span> apt-get install -y unzip &amp;&amp; unzip maccms10.zip -d html &amp;&amp; <span class="built_in">rm</span> maccms10.zip &amp;&amp; <span class="built_in">mv</span> /home/web/html/maccms10-master/* /home/web/html/</span><br></pre></td></tr></table></figure><p>wordpress</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /home/web &amp;&amp; wget https://cn.wordpress.org/wordpress-6.2.2-zh_CN.zip &amp;&amp; <span class="built_in">sudo</span> apt-get install -y unzip &amp;&amp; unzip wordpress-6.2.2-zh_CN.zip -d html &amp;&amp; <span class="built_in">rm</span> wordpress-6.2.2-zh_CN.zip &amp;&amp; <span class="built_in">mv</span> /home/web/html/wordpress/* /home/web/html/</span><br></pre></td></tr></table></figure><p>运行</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /home/web &amp;&amp; docker-compose up -d</span><br></pre></td></tr></table></figure><h2 id="赋予权限"><a href="#赋予权限" class="headerlink" title="赋予权限"></a>赋予权限</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">exec</span> -it nginx <span class="built_in">chmod</span> -R 777 /var/www/html</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">exec</span> -it php <span class="built_in">chmod</span> -R 777 /var/www/html</span><br></pre></td></tr></table></figure><h2 id="安装PHP扩展"><a href="#安装PHP扩展" class="headerlink" title="安装PHP扩展"></a>安装PHP扩展</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">exec</span> php apt update &amp;&amp; docker <span class="built_in">exec</span> php apt install -y libmariadb-dev-compat libmariadb-dev libzip-dev libmagickwand-dev imagemagick</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">exec</span> php docker-php-ext-install mysqli pdo_mysql zip exif gd intl bcmath opcache</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">exec</span> php pecl install imagick &amp;&amp; docker <span class="built_in">exec</span> php sh -c <span class="string">&#x27;echo &quot;extension=imagick.so&quot; &gt; /usr/local/etc/php/conf.d/imagick.ini&#x27;</span></span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">exec</span> -it php sh -c <span class="string">&#x27;echo &quot;upload_max_filesize=50M \n post_max_size=50M&quot; &gt; /usr/local/etc/php/conf.d/uploads.ini&#x27;</span></span><br></pre></td></tr></table></figure><h3 id="重启php"><a href="#重启php" class="headerlink" title="重启php"></a>重启php</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker restart php</span><br></pre></td></tr></table></figure><p>可以去访问你的域名了，完成wp安装向导后再输入下面的命令！</p><p>跳过FTP更新主题插件的限制</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">echo</span> <span class="string">&quot;define(&#x27;FS_METHOD&#x27;, &#x27;direct&#x27;);&quot;</span> &gt;&gt; /home/web/html/wp-config.php</span><br></pre></td></tr></table></figure><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;docker搭建建站环境，学习手动搭建网站。！&lt;/p&gt;
&lt;p&gt;我们在搭建过程会使用到LNMP （Linux Nginx Mysql Php）&lt;/p&gt;
&lt;p&gt;学会搭建以后，只要给我们源码就可以搭建网站。 &lt;/p&gt;
&lt;h2 id=&quot;更新系统&quot;&gt;&lt;a href=&quot;#更新系统&quot; c</summary>
      
    
    
    
    <category term="docker" scheme="https://www.dmark.us.kg/categories/docker/"/>
    
    
    <category term="docker" scheme="https://www.dmark.us.kg/tags/docker/"/>
    
    <category term="linux" scheme="https://www.dmark.us.kg/tags/linux/"/>
    
    <category term="nginx" scheme="https://www.dmark.us.kg/tags/nginx/"/>
    
    <category term="php" scheme="https://www.dmark.us.kg/tags/php/"/>
    
    <category term="mysql" scheme="https://www.dmark.us.kg/tags/mysql/"/>
    
  </entry>
  
  <entry>
    <title>Docker 基础命令大全</title>
    <link href="https://www.dmark.us.kg/html/docker-command/"/>
    <id>https://www.dmark.us.kg/html/docker-command/</id>
    <published>2024-02-29T18:16:44.000Z</published>
    <updated>2024-09-30T18:52:50.457Z</updated>
    
    <content type="html"><![CDATA[<p>Docker是一种容器化技术，允许开发者将应用程序和所有依赖项打包到一个独立的容器中，<br>以便在不同环境中轻松部署和运行。还可以发布到docker应用市场给别人用。</p><h2 id="更新系统"><a href="#更新系统" class="headerlink" title="更新系统"></a>更新系统</h2><h3 id="Debian和Ubuntu"><a href="#Debian和Ubuntu" class="headerlink" title="Debian和Ubuntu"></a>Debian和Ubuntu</h3><p>apt update -y  &amp;&amp; apt upgrade -y &amp;&amp; apt install -y curl wget sudo</p><h3 id="CentOS"><a href="#CentOS" class="headerlink" title="CentOS"></a>CentOS</h3><p>yum -y update &amp;&amp; yum -y upgrade &amp;&amp; yum -y install curl wget sudo</p><h2 id="docker环境"><a href="#docker环境" class="headerlink" title="docker环境"></a>docker环境</h2><h3 id="安装环境"><a href="#安装环境" class="headerlink" title="安装环境"></a>安装环境</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -fsSL https://get.docker.com | sh</span><br></pre></td></tr></table></figure><h3 id="启动环境"><a href="#启动环境" class="headerlink" title="启动环境"></a>启动环境</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl start docker</span><br></pre></td></tr></table></figure><p>开机自启动环境</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl <span class="built_in">enable</span> docker</span><br></pre></td></tr></table></figure><p>查看docker环境版本</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker --version</span><br></pre></td></tr></table></figure><h2 id="镜像"><a href="#镜像" class="headerlink" title="镜像"></a>镜像</h2><p>查看本地镜像列表</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker image <span class="built_in">ls</span></span><br></pre></td></tr></table></figure><h3 id="下载更新镜像"><a href="#下载更新镜像" class="headerlink" title="下载更新镜像"></a>下载更新镜像</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker pull nginx:latest</span><br></pre></td></tr></table></figure><h3 id="删除镜像"><a href="#删除镜像" class="headerlink" title="删除镜像"></a>删除镜像</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker rmi nginx:latest</span><br></pre></td></tr></table></figure><h2 id="容器"><a href="#容器" class="headerlink" title="容器"></a>容器</h2><h3 id="部署新容器"><a href="#部署新容器" class="headerlink" title="部署新容器"></a>部署新容器</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker run -d --name nginx --restart always -p 80:80 -p 443:443 -v /home/docker/nginx/conf.d:/etc/nginx/conf.d -v /home/docker/nginx/certs:/etc/nginx/certs -v /home/docker/nginx/html:/var/www/html nginx:latest</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker run -d --name nextcloud --restart=always -p 8080:80 -v /home/docker/nextcloud:/var/www/html -e NEXTCLOUD_ADMIN_USER=kejilion -e NEXTCLOUD_ADMIN_PASSWORD=kejilionYYDS nextcloud</span><br></pre></td></tr></table></figure><p>查看所有容器</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker ps -a</span><br></pre></td></tr></table></figure><p>查看运行的容器</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker ps</span><br></pre></td></tr></table></figure><h3 id="启动容器"><a href="#启动容器" class="headerlink" title="启动容器"></a>启动容器</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker start nginx</span><br></pre></td></tr></table></figure><p>暂停容器</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker stop nginx</span><br></pre></td></tr></table></figure><p>删除容器</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">rm</span> nginx</span><br></pre></td></tr></table></figure><p>强制删除容器</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">rm</span> -f nginx</span><br></pre></td></tr></table></figure><p>启动所有容器</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker start $(<span class="built_in">sudo</span> docker ps -a -q)</span><br></pre></td></tr></table></figure><p>暂停所有容器</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker stop $(<span class="built_in">sudo</span> docker ps -a -q)</span><br></pre></td></tr></table></figure><p>暂停所有容器</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">rm</span> -f $(<span class="built_in">sudo</span> docker ps -a -q)</span><br></pre></td></tr></table></figure><h3 id="进入容器"><a href="#进入容器" class="headerlink" title="进入容器"></a>进入容器</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">exec</span> -it nginx bash</span><br></pre></td></tr></table></figure><p>查看容器日志</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker logs nginx</span><br></pre></td></tr></table></figure><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;Docker是一种容器化技术，允许开发者将应用程序和所有依赖项打包到一个独立的容器中，&lt;br&gt;以便在不同环境中轻松部署和运行。还可以发布到docker应用市场给别人用。&lt;/p&gt;
&lt;h2 id=&quot;更新系统&quot;&gt;&lt;a href=&quot;#更新系统&quot; class=&quot;headerlink&quot;</summary>
      
    
    
    
    <category term="linux" scheme="https://www.dmark.us.kg/categories/linux/"/>
    
    
    <category term="docker" scheme="https://www.dmark.us.kg/tags/docker/"/>
    
    <category term="linux" scheme="https://www.dmark.us.kg/tags/linux/"/>
    
  </entry>
  
  <entry>
    <title>Nginx 安装配置</title>
    <link href="https://www.dmark.us.kg/html/nginx/"/>
    <id>https://www.dmark.us.kg/html/nginx/</id>
    <published>2020-09-30T01:16:03.000Z</published>
    <updated>2024-09-30T06:38:59.287Z</updated>
    
    <content type="html"><![CDATA[<h2 id="Nginx-安装"><a href="#Nginx-安装" class="headerlink" title="Nginx 安装"></a>Nginx 安装</h2><h3 id="系统平台：CentOS-release-6-6-Final-64位。"><a href="#系统平台：CentOS-release-6-6-Final-64位。" class="headerlink" title="系统平台：CentOS release 6.6 (Final) 64位。"></a>系统平台：CentOS release 6.6 (Final) 64位。</h3><h2 id="一、安装编译工具及库文件"><a href="#一、安装编译工具及库文件" class="headerlink" title="一、安装编译工具及库文件"></a>一、安装编译工具及库文件</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yum -y install make zlib zlib-devel gcc-c++ libtool  openssl openssl-devel</span><br></pre></td></tr></table></figure><h2 id="二、首先要安装-PCRE"><a href="#二、首先要安装-PCRE" class="headerlink" title="二、首先要安装 PCRE"></a>二、首先要安装 PCRE</h2><p>PCRE 作用是让 Nginx 支持 Rewrite 功能。</p><h3 id="1、下载-PCRE-安装包，"><a href="#1、下载-PCRE-安装包，" class="headerlink" title="1、下载 PCRE 安装包，"></a>1、下载 PCRE 安装包，</h3><p>下载地址： <a href="http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz">http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz</a></p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">[root@abc src]# <span class="built_in">cd</span> /usr/local/src/</span><br><span class="line">[root@abc src]# wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz</span><br></pre></td></tr></table></figure><h3 id="2、解压安装包"><a href="#2、解压安装包" class="headerlink" title="2、解压安装包:"></a>2、解压安装包:</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[root@abc src]# tar zxvf pcre-8.35.tar.gz</span><br></pre></td></tr></table></figure><h3 id="3、进入安装包目录"><a href="#3、进入安装包目录" class="headerlink" title="3、进入安装包目录"></a>3、进入安装包目录</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[root@abc src]# <span class="built_in">cd</span> pcre-8.35</span><br></pre></td></tr></table></figure><h3 id="4、编译安装"><a href="#4、编译安装" class="headerlink" title="4、编译安装"></a>4、编译安装</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">[root@abc pcre-8.35]# ./configure</span><br><span class="line">[root@abc pcre-8.35]# make &amp;&amp; make install</span><br></pre></td></tr></table></figure><h3 id="5、查看pcre版本"><a href="#5、查看pcre版本" class="headerlink" title="5、查看pcre版本"></a>5、查看pcre版本</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[root@abc pcre-8.35]# pcre-config --version</span><br></pre></td></tr></table></figure><h2 id="安装-Nginx"><a href="#安装-Nginx" class="headerlink" title="安装 Nginx"></a>安装 Nginx</h2><h3 id="1、下载-Nginx，下载地址：https-nginx-org-en-download-html"><a href="#1、下载-Nginx，下载地址：https-nginx-org-en-download-html" class="headerlink" title="1、下载 Nginx，下载地址：https://nginx.org/en/download.html"></a>1、下载 Nginx，下载地址：<a href="https://nginx.org/en/download.html">https://nginx.org/en/download.html</a></h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">[root@abc src]# <span class="built_in">cd</span> /usr/local/src/</span><br><span class="line">[root@abc src]# wget http://nginx.org/download/nginx-1.6.2.tar.gz</span><br></pre></td></tr></table></figure><h3 id="2、解压安装包-1"><a href="#2、解压安装包-1" class="headerlink" title="2、解压安装包"></a>2、解压安装包</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[root@abc src]# tar zxvf nginx-1.6.2.tar.gz</span><br></pre></td></tr></table></figure><h3 id="3、进入安装包目录-1"><a href="#3、进入安装包目录-1" class="headerlink" title="3、进入安装包目录"></a>3、进入安装包目录</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[root@abc src]# <span class="built_in">cd</span> nginx-1.6.2</span><br></pre></td></tr></table></figure><p>###4、编译安装</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@abc nginx-1.6.2]# ./configure --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.35</span><br><span class="line">[root@abc nginx-1.6.2]# make</span><br><span class="line">[root@abc nginx-1.6.2]# make install</span><br></pre></td></tr></table></figure><h3 id="5、查看nginx版本"><a href="#5、查看nginx版本" class="headerlink" title="5、查看nginx版本"></a>5、查看nginx版本</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[root@abc nginx-1.6.2]# /usr/local/webserver/nginx/sbin/nginx -v</span><br></pre></td></tr></table></figure><h2 id="到此，nginx安装完成。"><a href="#到此，nginx安装完成。" class="headerlink" title="到此，nginx安装完成。"></a>到此，nginx安装完成。</h2><h2 id="Nginx-配置"><a href="#Nginx-配置" class="headerlink" title="Nginx 配置"></a>Nginx 配置</h2><p>创建 Nginx 运行使用的用户 www：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">[root@abc conf]# /usr/sbin/groupadd www </span><br><span class="line">[root@abc conf]# /usr/sbin/useradd -g www www</span><br></pre></td></tr></table></figure><p>配置nginx.conf ，将&#x2F;usr&#x2F;local&#x2F;webserver&#x2F;nginx&#x2F;conf&#x2F;nginx.conf替换为以下内容</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[root@abc conf]#  <span class="built_in">cat</span> /usr/local/webserver/nginx/conf/nginx.conf</span><br></pre></td></tr></table></figure><p>user www www;<br>worker_processes 2; #设置值和CPU核心数一致<br>error_log &#x2F;usr&#x2F;local&#x2F;webserver&#x2F;nginx&#x2F;logs&#x2F;nginx_error.log crit; #日志位置和日志级别<br>pid &#x2F;usr&#x2F;local&#x2F;webserver&#x2F;nginx&#x2F;nginx.pid;<br>#Specifies the value for maximum file descriptors that can be opened by this process.<br>worker_rlimit_nofile 65535;<br>events<br>{<br>  use epoll;<br>  worker_connections 65535;<br>}<br>http<br>{<br>  include mime.types;<br>  default_type application&#x2F;octet-stream;<br>  log_format main  ‘$remote_addr - $remote_user [$time_local] “$request” ‘<br>               ‘$status $body_bytes_sent “$http_referer” ‘<br>               ‘“$http_user_agent” $http_x_forwarded_for’;</p><p>#charset gb2312;</p><p>  server_names_hash_bucket_size 128;<br>  client_header_buffer_size 32k;<br>  large_client_header_buffers 4 32k;<br>  client_max_body_size 8m;</p><p>  sendfile on;<br>  tcp_nopush on;<br>  keepalive_timeout 60;<br>  tcp_nodelay on;<br>  fastcgi_connect_timeout 300;<br>  fastcgi_send_timeout 300;<br>  fastcgi_read_timeout 300;<br>  fastcgi_buffer_size 64k;<br>  fastcgi_buffers 4 64k;<br>  fastcgi_busy_buffers_size 128k;<br>  fastcgi_temp_file_write_size 128k;<br>  gzip on;<br>  gzip_min_length 1k;<br>  gzip_buffers 4 16k;<br>  gzip_http_version 1.0;<br>  gzip_comp_level 2;<br>  gzip_types text&#x2F;plain application&#x2F;x-javascript text&#x2F;css application&#x2F;xml;<br>  gzip_vary on;</p><p>  #limit_zone crawler $binary_remote_addr 10m;<br> #下面是server虚拟主机的配置<br> server<br>  {<br>    listen 80;#监听端口<br>    server_name localhost;#域名<br>    index index.html index.htm index.php;<br>    root &#x2F;usr&#x2F;local&#x2F;webserver&#x2F;nginx&#x2F;html;#站点目录<br>      location ~ .*.(php|php5)?$<br>    {<br>      #fastcgi_pass unix:&#x2F;tmp&#x2F;php-cgi.sock;<br>      fastcgi_pass 127.0.0.1:9000;<br>      fastcgi_index index.php;<br>      include fastcgi.conf;<br>    }<br>    location ~ .*.(gif|jpg|jpeg|png|bmp|swf|ico)$<br>    {<br>      expires 30d;</p><h1 id="access-log-off"><a href="#access-log-off" class="headerlink" title="access_log off;"></a>access_log off;</h1><pre><code>&#125;location ~ .*\.(js|css)?$&#123;  expires 15d;</code></pre><h1 id="access-log-off-1"><a href="#access-log-off-1" class="headerlink" title="access_log off;"></a>access_log off;</h1><pre><code>&#125;access_log off;</code></pre><p>  }</p><p>}</p><h2 id="检查配置文件nginx-conf的正确性命令："><a href="#检查配置文件nginx-conf的正确性命令：" class="headerlink" title="检查配置文件nginx.conf的正确性命令："></a>检查配置文件nginx.conf的正确性命令：</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[root@abc conf]# /usr/local/webserver/nginx/sbin/nginx -t</span><br></pre></td></tr></table></figure><h3 id="启动-Nginx"><a href="#启动-Nginx" class="headerlink" title="启动 Nginx"></a>启动 Nginx</h3><p>Nginx 启动命令如下：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[root@abc conf]# /usr/local/webserver/nginx/sbin/nginx</span><br></pre></td></tr></table></figure><h3 id="访问站点"><a href="#访问站点" class="headerlink" title="访问站点"></a>访问站点</h3><p>从浏览器访问我们配置的站点ip：</p><h3 id="Nginx-其他命令"><a href="#Nginx-其他命令" class="headerlink" title="Nginx 其他命令"></a>Nginx 其他命令</h3><p>以下包含了 Nginx 常用的几个命令：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">/usr/local/webserver/nginx/sbin/nginx -s reload            <span class="comment"># 重新载入配置文件</span></span><br><span class="line">/usr/local/webserver/nginx/sbin/nginx -s reopen            <span class="comment"># 重启 Nginx</span></span><br><span class="line">/usr/local/webserver/nginx/sbin/nginx -s stop              <span class="comment"># 停止 Nginx</span></span><br></pre></td></tr></table></figure><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;h2 id=&quot;Nginx-安装&quot;&gt;&lt;a href=&quot;#Nginx-安装&quot; class=&quot;headerlink&quot; title=&quot;Nginx 安装&quot;&gt;&lt;/a&gt;Nginx 安装&lt;/h2&gt;&lt;h3 id=&quot;系统平台：CentOS-release-6-6-Final-64位。&quot;&gt;&lt;a hr</summary>
      
    
    
    
    <category term="linux" scheme="https://www.dmark.us.kg/categories/linux/"/>
    
    <category term="centos" scheme="https://www.dmark.us.kg/categories/linux/centos/"/>
    
    
    <category term="nginx" scheme="https://www.dmark.us.kg/tags/nginx/"/>
    
    <category term="centos" scheme="https://www.dmark.us.kg/tags/centos/"/>
    
  </entry>
  
  <entry>
    <title>Docker Hello World</title>
    <link href="https://www.dmark.us.kg/html/docker-hello-world/"/>
    <id>https://www.dmark.us.kg/html/docker-hello-world/</id>
    <published>2020-09-29T18:43:50.000Z</published>
    <updated>2024-09-30T06:39:46.789Z</updated>
    
    <content type="html"><![CDATA[<h2 id="Docker-Hello-World"><a href="#Docker-Hello-World" class="headerlink" title="Docker Hello World"></a>Docker Hello World</h2><p>Docker 允许你在容器内运行应用程序， 使用 docker run 命令来在容器内运行一个应用程序。</p><p>输出Hello world</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@root:~$ docker run ubuntu:15.10 /bin/echo <span class="string">&quot;Hello world&quot;</span></span><br></pre></td></tr></table></figure><h3 id="Hello-world"><a href="#Hello-world" class="headerlink" title="Hello world"></a>Hello world</h3><p>各个参数解析：</p><p>docker: Docker 的二进制执行文件。</p><p>run: 与前面的 docker 组合来运行一个容器。</p><p>ubuntu:15.10 指定要运行的镜像，Docker 首先从本地主机上查找镜像是否存在，如果不存在，Docker 就会从镜像仓库 Docker Hub 下载公共镜像。</p><p>&#x2F;bin&#x2F;echo “Hello world”: 在启动的容器里执行的命令</p><p>以上命令完整的意思可以解释为：Docker 以 ubuntu15.10 镜像创建一个新容器，然后在容器里执行 bin&#x2F;echo “Hello world”，然后输出结果。</p><h3 id="运行交互式的容器"><a href="#运行交互式的容器" class="headerlink" title="运行交互式的容器"></a>运行交互式的容器</h3><p>我们通过 docker 的两个参数 -i -t，让 docker 运行的容器实现”对话”的能力：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@root:~$ docker run -i -t ubuntu:15.10 /bin/bash</span><br></pre></td></tr></table></figure><p>root@0123ce188bd8:&#x2F;#<br>各个参数解析：</p><p>-t: 在新容器内指定一个伪终端或终端。</p><p>-i: 允许你对容器内的标准输入 (STDIN) 进行交互。</p><p>注意第二行 root@0123ce188bd8:&#x2F;#，此时我们已进入一个 ubuntu15.10 系统的容器</p><p>我们尝试在容器中运行命令 cat &#x2F;proc&#x2F;version和ls分别查看当前系统的版本信息和当前目录下的文件列表</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@0123ce188bd8:/#  <span class="built_in">cat</span> /proc/version</span><br></pre></td></tr></table></figure><p>Linux version 4.4.0-151-generic (buildd@lgw01-amd64-043) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #178-Ubuntu SMP Tue Jun 11 08:30:22 UTC 2019</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@0123ce188bd8:/# <span class="built_in">ls</span></span><br></pre></td></tr></table></figure><p>bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@0123ce188bd8:/# </span><br></pre></td></tr></table></figure><p>我们可以通过运行 exit 命令或者使用 CTRL+D 来退出容器。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@0123ce188bd8:/#  <span class="built_in">exit</span></span><br></pre></td></tr></table></figure><p>exit<br>root@root:<del>#<br>注意第三行中 root@root:</del># 表明我们已经退出了当前的容器，返回到当前的主机中。</p><h3 id="启动容器（后台模式）"><a href="#启动容器（后台模式）" class="headerlink" title="启动容器（后台模式）"></a>启动容器（后台模式）</h3><p>使用以下命令创建一个以进程方式运行的容器</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@root:~$ docker run -d ubuntu:15.10 /bin/sh -c <span class="string">&quot;while true; do echo hello world; sleep 1; done&quot;</span></span><br></pre></td></tr></table></figure><p>2b1b7a428627c51ab8810d541d759f072b4fc75487eed05812646b8534a2fe63<br>在输出中，我们没有看到期望的 “hello world”，而是一串长字符</p><p>2b1b7a428627c51ab8810d541d759f072b4fc75487eed05812646b8534a2fe63</p><p>这个长字符串叫做容器 ID，对每个容器来说都是唯一的，我们可以通过容器 ID 来查看对应的容器发生了什么。</p><p>首先，我们需要确认容器有在运行，可以通过 docker ps 来查看：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@root:~$ docker ps</span><br></pre></td></tr></table></figure><p>CONTAINER ID        IMAGE                  COMMAND              …<br>5917eac21c36        ubuntu:15.10           “&#x2F;bin&#x2F;sh -c ‘while t…”    …</p><h3 id="输出详情介绍："><a href="#输出详情介绍：" class="headerlink" title="输出详情介绍："></a>输出详情介绍：</h3><p>CONTAINER ID: 容器 ID。</p><p>IMAGE: 使用的镜像。</p><p>COMMAND: 启动容器时运行的命令。</p><p>CREATED: 容器的创建时间。</p><p>STATUS: 容器状态。</p><h2 id="状态有7种："><a href="#状态有7种：" class="headerlink" title="状态有7种："></a>状态有7种：</h2><p>created（已创建）<br>restarting（重启中）<br>running 或 Up（运行中）<br>removing（迁移中）<br>paused（暂停）<br>exited（停止）<br>dead（死亡）<br>PORTS: 容器的端口信息和使用的连接类型（tcp\udp）。</p><p>NAMES: 自动分配的容器名称。</p><p>在宿主主机内使用 docker logs 命令，查看容器内的标准输出：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@root:~$ docker logs 2b1b7a428627</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@root:~$ docker logs amazing_cori</span><br></pre></td></tr></table></figure><p>停止容器</p><h3 id="我们使用-docker-stop-命令来停止容器"><a href="#我们使用-docker-stop-命令来停止容器" class="headerlink" title="我们使用 docker stop 命令来停止容器:"></a>我们使用 docker stop 命令来停止容器:</h3><p>通过 docker ps 查看，容器已经停止工作:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@root:~$ docker ps</span><br></pre></td></tr></table></figure><p>可以看到容器已经不在了。</p><p>也可以用下面的命令来停止:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">root@root:~$ docker stop amazing_cori</span><br></pre></td></tr></table></figure><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;h2 id=&quot;Docker-Hello-World&quot;&gt;&lt;a href=&quot;#Docker-Hello-World&quot; class=&quot;headerlink&quot; title=&quot;Docker Hello World&quot;&gt;&lt;/a&gt;Docker Hello World&lt;/h2&gt;&lt;p&gt;Docker</summary>
      
    
    
    
    <category term="linux" scheme="https://www.dmark.us.kg/categories/linux/"/>
    
    
    <category term="docker" scheme="https://www.dmark.us.kg/tags/docker/"/>
    
  </entry>
  
  <entry>
    <title>Docker 安装 MySQL</title>
    <link href="https://www.dmark.us.kg/html/docker-to-mysql/"/>
    <id>https://www.dmark.us.kg/html/docker-to-mysql/</id>
    <published>2020-09-29T18:33:44.000Z</published>
    <updated>2024-09-30T06:39:39.085Z</updated>
    
    <content type="html"><![CDATA[<h2 id="Docker-安装-MySQL"><a href="#Docker-安装-MySQL" class="headerlink" title="Docker 安装 MySQL"></a>Docker 安装 MySQL</h2><p>MySQL 是世界上最受欢迎的开源数据库。凭借其可靠性、易用性和性能，MySQL 已成为 Web 应用程序的数据库优先选择。</p><h3 id="1、查看可用的-MySQL-版本"><a href="#1、查看可用的-MySQL-版本" class="headerlink" title="1、查看可用的 MySQL 版本"></a>1、查看可用的 MySQL 版本</h3><p>访问 MySQL 镜像库地址：<a href="https://hub.docker.com/_/mysql?tab=tags">https://hub.docker.com/_/mysql?tab=tags</a> 。</p><p>可以通过 Sort by 查看其他版本的 MySQL，默认是最新版本 mysql:latest 。</p><p>你也可以在下拉列表中找到其他你想要的版本：</p><h3 id="此外，我们还可以用-docker-search-mysql-命令来查看可用版本："><a href="#此外，我们还可以用-docker-search-mysql-命令来查看可用版本：" class="headerlink" title="此外，我们还可以用 docker search mysql 命令来查看可用版本："></a>此外，我们还可以用 docker search mysql 命令来查看可用版本：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ docker search mysql</span><br></pre></td></tr></table></figure><p>NAME                     DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED<br>mysql                    MySQL is a widely used, open-source relati…   2529      [OK]<br>mysql&#x2F;mysql-server       Optimized MySQL Server Docker images. Crea…   161                  [OK]<br>centurylink&#x2F;mysql        Image containing mysql. Optimized to be li…   45                   [OK]<br>sameersbn&#x2F;mysql                                                          36                   [OK]<br>google&#x2F;mysql             MySQL server for Google Compute Engine          16                   [OK]<br>appcontainers&#x2F;mysql      Centos&#x2F;Debian Based Customizable MySQL Con…   8                    [OK]<br>marvambass&#x2F;mysql         MySQL Server based on Ubuntu 14.04              6                    [OK]<br>drupaldocker&#x2F;mysql       MySQL for Drupal                                2                    [OK]<br>azukiapp&#x2F;mysql           Docker image to run MySQL by Azuki - http:…   2                    [OK]<br>…</p><h3 id="2、拉取-MySQL-镜像"><a href="#2、拉取-MySQL-镜像" class="headerlink" title="2、拉取 MySQL 镜像"></a>2、拉取 MySQL 镜像</h3><p>这里我们拉取官方的最新版本的镜像：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ docker pull mysql:latest</span><br></pre></td></tr></table></figure><h3 id="3、查看本地镜像"><a href="#3、查看本地镜像" class="headerlink" title="3、查看本地镜像"></a>3、查看本地镜像</h3><p>使用以下命令来查看是否已安装了 mysql：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ docker images</span><br></pre></td></tr></table></figure><p>在上图中可以看到我们已经安装了最新版本（latest）的 mysql 镜像。</p><h3 id="4、运行容器"><a href="#4、运行容器" class="headerlink" title="4、运行容器"></a>4、运行容器</h3><p>安装完成后，我们可以使用以下命令来运行 mysql 容器：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ docker run -itd --name mysql-test -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql</span><br></pre></td></tr></table></figure><p>参数说明：</p><p>-p 3306:3306 ：映射容器服务的 3306 端口到宿主机的 3306 端口，外部主机可以直接通过 宿主机ip:3306 访问到 MySQL 的服务。<br>MYSQL_ROOT_PASSWORD&#x3D;123456：设置 MySQL 服务 root 用户的密码。</p><h3 id="5、安装成功"><a href="#5、安装成功" class="headerlink" title="5、安装成功"></a>5、安装成功</h3><p>通过 docker ps 命令查看是否安装成功：</p><h2 id="本机可以通过-root-和密码-123456-访问-MySQL-服务。"><a href="#本机可以通过-root-和密码-123456-访问-MySQL-服务。" class="headerlink" title="本机可以通过 root 和密码 123456 访问 MySQL 服务。"></a>本机可以通过 root 和密码 123456 访问 MySQL 服务。</h2><style>.video-container {    position: relative;    width: 100%;    padding-top: 56.25%; /* 16:9 aspect ratio (height/width = 9/16 * 100%) */}.video-container iframe {    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;}</style>]]></content>
    
    
      
      
    <summary type="html">&lt;h2 id=&quot;Docker-安装-MySQL&quot;&gt;&lt;a href=&quot;#Docker-安装-MySQL&quot; class=&quot;headerlink&quot; title=&quot;Docker 安装 MySQL&quot;&gt;&lt;/a&gt;Docker 安装 MySQL&lt;/h2&gt;&lt;p&gt;MySQL 是世界上最受欢迎的开源数</summary>
      
    
    
    
    <category term="linux" scheme="https://www.dmark.us.kg/categories/linux/"/>
    
    
    <category term="docker" scheme="https://www.dmark.us.kg/tags/docker/"/>
    
  </entry>
  
  <entry>
    <title>你好世界</title>
    <link href="https://www.dmark.us.kg/html/hello-world/"/>
    <id>https://www.dmark.us.kg/html/hello-world/</id>
    <published>2011-09-30T01:16:03.000Z</published>
    <updated>2024-09-30T06:39:22.568Z</updated>
    
    <content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;Welcome to &lt;a href=&quot;https://hexo.io/&quot;&gt;Hexo&lt;/a&gt;! This is your very first post. Check &lt;a href=&quot;https://hexo.io/docs/&quot;&gt;documentation&lt;/a&gt; for</summary>
      
    
    
    
    <category term="生活" scheme="https://www.dmark.us.kg/categories/%E7%94%9F%E6%B4%BB/"/>
    
    
    <category term="linux" scheme="https://www.dmark.us.kg/tags/linux/"/>
    
  </entry>
  
  <entry>
    <title>我是来测试的。</title>
    <link href="https://www.dmark.us.kg/html/test/"/>
    <id>https://www.dmark.us.kg/html/test/</id>
    <published>2011-09-28T16:12:45.000Z</published>
    <updated>2024-10-01T14:09:34.142Z</updated>
    
    <content type="html"><![CDATA[<p>欢迎来到我的世界。</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;欢迎来到我的世界。&lt;/p&gt;
</summary>
      
    
    
    
    <category term="生活" scheme="https://www.dmark.us.kg/categories/%E7%94%9F%E6%B4%BB/"/>
    
    
    <category term="linux" scheme="https://www.dmark.us.kg/tags/linux/"/>
    
  </entry>
  
</feed>
