second commit
This commit is contained in:
46
public/小白手册/服务器日常/index.xml
Normal file
46
public/小白手册/服务器日常/index.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>服务器日常 on 星火文档中心</title>
|
||||
<link>http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/</link>
|
||||
<description>Recent content in 服务器日常 on 星火文档中心</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<lastBuildDate>Mon, 18 Oct 2021 16:58:57 +0800</lastBuildDate><atom:link href="http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/index.xml" rel="self" type="application/rss+xml" />
|
||||
<item>
|
||||
<title>docker使用笔记</title>
|
||||
<link>http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/docker/</link>
|
||||
<pubDate>Mon, 18 Oct 2021 16:59:28 +0800</pubDate>
|
||||
|
||||
<guid>http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/docker/</guid>
|
||||
<description>基础
|
||||
docker ps -a 查看容器列表
|
||||
docker ps 查看正在运行的容器
|
||||
exit 退出容器
|
||||
docker start &lt;docker container id&gt; 启动一个已停止的容器
|
||||
docker stop &lt;容器id&gt;停止容器
|
||||
docker restart &lt;容器id&gt;重启容器
|
||||
进入容器的两个命令 exec命名(好) docker exec -it &lt;容器id&gt; /bin/bash attach命令(退出后会终止容器) docker attach &lt;容器id&gt; docker rm -f &lt;容器id&gt;删除容器
|
||||
进阶
|
||||
docker container prune删除所有容器
|
||||
镜像操作
|
||||
docker images列出本机镜像
|
||||
rocket.chat &lt;none&gt; 30f3e81eb8ad 6 months ago 816MB rocket.chat &lt;none&gt; 077d87f42281 6 months ago 816MB rocket.chat &lt;none&gt; 666b6ddfd746 6 months ago 816MB rocket.chat 3.10.5 63bd37a1c5e9 8 months ago 816MB mongo 4.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>阿里云ecs添加swap</title>
|
||||
<link>http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/ecs%E6%B7%BB%E5%8A%A0swap/</link>
|
||||
<pubDate>Mon, 18 Oct 2021 16:59:28 +0800</pubDate>
|
||||
|
||||
<guid>http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/ecs%E6%B7%BB%E5%8A%A0swap/</guid>
|
||||
<description>查看当前是没有swap的
|
||||
$ free -m total used free shared buffers cached Mem: 498 310 187 0 17 170 -/+ buffers/cache: 122 375 Swap: 0 0 0 $ sudo df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/xvda1 ext4 20G 3.7G 16G 20% / tmpfs tmpfs 250M 0 250M 0% /dev/shm 我们将swap挂载到/var下
|
||||
$ sudo dd if=/dev/zero of=/var/swap bs=1M count=2048
|
||||
2048+0 records in
|
||||
2048+0 records out
|
||||
2147483648 bytes (2.1 GB) copied, 47.</description>
|
||||
</item>
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
Reference in New Issue
Block a user