diff --git a/content/小白手册/服务器日常/_index.md b/content/小白手册/服务器日常/_index.md new file mode 100644 index 0000000..72091cc --- /dev/null +++ b/content/小白手册/服务器日常/_index.md @@ -0,0 +1,13 @@ ++++ +title = "服务器日常" +date = 2021-10-18T16:58:57+08:00 +weight = 5 +chapter = true +pre = "" + ++++ + +### 服务器日常 + +这里存放一些服务器类的笔记与教程 + diff --git a/content/小白手册/服务器日常/docker.md b/content/小白手册/服务器日常/docker.md index 2763674..5aa2522 100755 --- a/content/小白手册/服务器日常/docker.md +++ b/content/小白手册/服务器日常/docker.md @@ -1,6 +1,8 @@ -docker使用笔记 - ----------------------- +--- +title: "docker使用笔记" +date: 2021-10-18T16:59:28+08:00 +draft: false +--- 基础 diff --git a/content/小白手册/服务器日常/ecs添加swap.md b/content/小白手册/服务器日常/ecs添加swap.md index ca26c1a..91cc0ab 100755 --- a/content/小白手册/服务器日常/ecs添加swap.md +++ b/content/小白手册/服务器日常/ecs添加swap.md @@ -1,3 +1,9 @@ +--- +title: "阿里云ecs添加swap" +date: 2021-10-18T16:59:28+08:00 +draft: false +--- + 查看当前是没有swap的 diff --git a/content/小白手册/疑难解答/README.md b/content/小白手册/疑难解答/README.md deleted file mode 100755 index 7442ea6..0000000 --- a/content/小白手册/疑难解答/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# 小白手册 - -# **前言** - -​ 也许这是你第一次使用linux。 - -​ 既然这是关于deepin的小白手册,那么本手册当然是围绕deepin来叙述的了。说到deepin,他的中文名为“深度”。deepin操作系统是基于debian的linux系统,deepin作为中国土生土长的发行版,也深受大家的喜爱。 - -​ 为什么选择linux而不是Windows?为什么非要在linux大家族中挑deepin,而不是选择像Ubuntu,arch,manjaro这些发行版呢?说到这里,不得不扯一些家国情怀了。不得不说的是,虽然deepin不是完全自主研发,但他是完全自主可控的系统,他不会被美帝等国家掐脖子,也不会发生“windows黑屏事件”。为了尽早抛弃对Windows的依赖,我们要选择linux,为了支持国产,我选择了deepin。当然,linux基本上都是触类旁通,弄懂一个发行版,其他也就不是什么问题了。 - -我第一次接触到linux,好像是在上初中,使用的是Ubuntu虚拟机,说实在话,当时的Ubuntu给我的第一印象是卡(似乎是虚拟机的锅),丑,垃圾,没用多久扔掉Ubuntu继续使用Windows。在接下来的日子里,我的主力机依然是Windows,直到遇见了deepin。 - -诚然,遇到deepin的时候真的吸引了我,半透明界面,扁平化UI,光从界面上就甩Windows10十几条街,我掏出来垃圾平板(没错,atom处理器,2GB+30G),反手装了个64位deepin,当时我还在想,2G内存装64位系统会不会卡死呢,其实真的是多虑了。一直到deepin的经典系统,deepin15.11,我对deepin的喜爱之情溢于言表。 - -当然,有喜就有哀,linux虽好,但有个致命的缺点就是生态不足,所以你在给电脑刷deepin的时候要做好思想准备(安卓是个异类,他也是linux,但他成功逆袭了,站在智能机的风口上,成功的被捧起)。 - -不过呢,也不要悲观,先天不足可以后天补齐短板。wine应运而生,让他可以运行Windows应用(只不过能完美运行的很少)。还有一个就是xdroid,一个安卓虚拟机,让你可以跑起来安卓应用(我觉得这个用起来非常不错,但是有些用户在使用的时候会出现卡死现象)。再有呢就是纯正虚拟机了,vbox,vmware,任意系统都可以跑,这样的话,就可以了完美运行任意应用,但也有个缺点就是低配机就别想这么完了,因为跑虚拟是很耗内存的。 - -如果你对生态比较介意的话,建议你安装双系统或者在虚拟机上运行deepin。 - -接下来,就可以了开始我们的deepin之旅了 - ---momen编辑于2020/07/31 - diff --git a/content/小白手册/疑难解答/_index.md b/content/小白手册/疑难解答/_index.md new file mode 100755 index 0000000..64adb76 --- /dev/null +++ b/content/小白手册/疑难解答/_index.md @@ -0,0 +1,10 @@ ++++ +title = "疑难解答" +date = 2021-10-18T16:58:57+08:00 +weight = 5 +chapter = true +pre = " " + ++++ + +零散的知识都在这里! diff --git a/content/小白手册/疑难解答/bbr加速.md b/content/小白手册/疑难解答/bbr加速.md index d7b6b80..a807c65 100755 --- a/content/小白手册/疑难解答/bbr加速.md +++ b/content/小白手册/疑难解答/bbr加速.md @@ -1 +1,8 @@ +--- +title: "bbr加速" +date: 2021-10-18T16:59:28+08:00 +draft: false +--- + + wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh \ No newline at end of file diff --git a/content/小白手册/疑难解答/deepin添加ppa.md b/content/小白手册/疑难解答/deepin添加ppa.md index 8418607..36322bf 100755 --- a/content/小白手册/疑难解答/deepin添加ppa.md +++ b/content/小白手册/疑难解答/deepin添加ppa.md @@ -1,3 +1,9 @@ +--- +title: "deepin添加ppa" +date: 2021-10-18T16:59:28+08:00 +draft: false +--- + ```bash sudo apt-get install python-software-properties sudo apt-get install software-properties-common diff --git a/content/小白手册/疑难解答/打包.md b/content/小白手册/疑难解答/打包.md index 8b73560..bf473aa 100755 --- a/content/小白手册/疑难解答/打包.md +++ b/content/小白手册/疑难解答/打包.md @@ -1,3 +1,9 @@ +--- +title: "打deb包" +date: 2021-10-18T16:59:28+08:00 +draft: false +--- + 打包 by:shenmo 解包:dpkg -x ./xxx.deb ./x/ 解出来文件 diff --git a/content/小白手册/疑难解答/查看进程.md b/content/小白手册/疑难解答/查看进程.md index 47b7c0c..abfbdd7 100755 --- a/content/小白手册/疑难解答/查看进程.md +++ b/content/小白手册/疑难解答/查看进程.md @@ -1,3 +1,9 @@ +--- +title: "linux 查看进程" +date: 2021-10-18T16:59:28+08:00 +draft: false +--- + ```bash ps aux | less ``` diff --git a/content/小白手册/疑难解答/桌面环境启动.md b/content/小白手册/疑难解答/桌面环境启动.md index d8460b2..c7b0935 100755 --- a/content/小白手册/疑难解答/桌面环境启动.md +++ b/content/小白手册/疑难解答/桌面环境启动.md @@ -1,4 +1,10 @@ -# Deepin启动 关闭 桌面环境/图形界面 +--- +title: "Deepin启动 关闭 桌面环境/图形界面" +date: 2021-10-18T16:59:28+08:00 +draft: false +--- + + 查看桌面环境状态:sudo service lightdm status diff --git a/public/404.html b/public/404.html index 2227a04..2a42dd5 100644 --- a/public/404.html +++ b/public/404.html @@ -9,15 +9,15 @@ 404 Page not found - - - - - - - + + + + + + + - + + + + + + + + + +
+
+
+ +
+
+ + + + +
+
+ +
+ +
+ +
+ +
+ + + + + + +

服务器日常

+

这里存放一些服务器类的笔记与教程

+ + + + + +
+ +
+ + +
+ +
+ + +
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/public/小白手册/服务器日常/index.xml b/public/小白手册/服务器日常/index.xml new file mode 100644 index 0000000..d0b8da8 --- /dev/null +++ b/public/小白手册/服务器日常/index.xml @@ -0,0 +1,46 @@ + + + + 服务器日常 on 星火文档中心 + 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/ + Recent content in 服务器日常 on 星火文档中心 + Hugo -- gohugo.io + en-us + Mon, 18 Oct 2021 16:58:57 +0800 + + docker使用笔记 + 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/ + Mon, 18 Oct 2021 16:59:28 +0800 + + 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/ + 基础 +docker ps -a 查看容器列表 +docker ps 查看正在运行的容器 +exit 退出容器 +docker start <docker container id> 启动一个已停止的容器 +docker stop <容器id>停止容器 +docker restart <容器id>重启容器 +进入容器的两个命令 exec命名(好) docker exec -it <容器id> /bin/bash attach命令(退出后会终止容器) docker attach <容器id> docker rm -f <容器id>删除容器 + 进阶 +docker container prune删除所有容器 + 镜像操作 +docker images列出本机镜像 +rocket.chat <none> 30f3e81eb8ad 6 months ago 816MB rocket.chat <none> 077d87f42281 6 months ago 816MB rocket.chat <none> 666b6ddfd746 6 months ago 816MB rocket.chat 3.10.5 63bd37a1c5e9 8 months ago 816MB mongo 4. + + + + 阿里云ecs添加swap + 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/ + Mon, 18 Oct 2021 16:59:28 +0800 + + 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/ + 查看当前是没有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. + + + + diff --git a/public/小白手册/疑难解答/bbr加速/index.html b/public/小白手册/疑难解答/bbr加速/index.html index 091b202..464acd6 100644 --- a/public/小白手册/疑难解答/bbr加速/index.html +++ b/public/小白手册/疑难解答/bbr加速/index.html @@ -9,25 +9,25 @@ - :: 星火文档中心 + bbr加速 :: 星火文档中心 - - - - - - - - - - + + + + + + + + + + - + - + + + + + + + + + +
+
+
+ +
+
+ + + + +
+
+ +
+ +
+ +
+ +
+ + + + + + +

零散的知识都在这里!

+ + + + + +
+ +
+ + +
+ +
+ + +
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/public/小白手册/疑难解答/index.xml b/public/小白手册/疑难解答/index.xml new file mode 100644 index 0000000..60c9a9c --- /dev/null +++ b/public/小白手册/疑难解答/index.xml @@ -0,0 +1,125 @@ + + + + 疑难解答 on 星火文档中心 + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/ + Recent content in 疑难解答 on 星火文档中心 + Hugo -- gohugo.io + en-us + Mon, 18 Oct 2021 16:58:57 +0800 + + bbr加速 + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/bbr%E5%8A%A0%E9%80%9F/ + Mon, 18 Oct 2021 16:59:28 +0800 + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/bbr%E5%8A%A0%E9%80%9F/ + wget -N –no-check-certificate “https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh + + + + Deepin启动 关闭 桌面环境/图形界面 + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/%E6%A1%8C%E9%9D%A2%E7%8E%AF%E5%A2%83%E5%90%AF%E5%8A%A8/ + Mon, 18 Oct 2021 16:59:28 +0800 + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/%E6%A1%8C%E9%9D%A2%E7%8E%AF%E5%A2%83%E5%90%AF%E5%8A%A8/ + 查看桌面环境状态:sudo service lightdm status +启动桌面环境:sudo service lightdm start +停止桌面环境:sudo service lightdm stop +重启桌面环境:sudo service lightdm restart + + + + deepin添加ppa + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/deepin%E6%B7%BB%E5%8A%A0ppa/ + Mon, 18 Oct 2021 16:59:28 +0800 + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/deepin%E6%B7%BB%E5%8A%A0ppa/ + sudo apt-get install python-software-properties sudo apt-get install software-properties-common sudo apt-get update + + + + linux 查看进程 + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/%E6%9F%A5%E7%9C%8B%E8%BF%9B%E7%A8%8B/ + Mon, 18 Oct 2021 16:59:28 +0800 + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/%E6%9F%A5%E7%9C%8B%E8%BF%9B%E7%A8%8B/ + ps aux | less + + + + 打deb包 + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/%E6%89%93%E5%8C%85/ + Mon, 18 Oct 2021 16:59:28 +0800 + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/%E6%89%93%E5%8C%85/ + 打包 by:shenmo +解包:dpkg -x ./xxx.deb ./x/ 解出来文件 +dpkg -e ./xxx.deb ./x/ 解出来debian +应用程序放在 /opt +快捷方式 .desktop 放 /usr/share/applications +卸载脚本 删除 /opt/程序目录 (/usr/share/applications自动删) +修改快捷方式模板对应到 /opt/应用/可执行文件 +修改快捷方式模板使其正确读取图标 +创建卸载脚本 +打包目录当/目录 +DEBIAN 放包描述信息和卸载脚本 +opt 放应用程序 +/usr/share/applications 放desktop +DEBIN 下control放信息 postrm放删除信息 +StartupWMClass=mentohust +如果这个应用有多个窗口,在dock栏和进程管理里面会统一显示为mentohust + + + + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/linux%E5%90%8E%E5%8F%B0%E8%BF%90%E8%A1%8C%E7%A8%8B%E5%BA%8F/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/linux%E5%90%8E%E5%8F%B0%E8%BF%90%E8%A1%8C%E7%A8%8B%E5%BA%8F/ + + + + + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/rpm%E8%BD%ACdeb/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/rpm%E8%BD%ACdeb/ + nohup +nohup可以把东西挂后台 + + + + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/sed%E5%91%BD%E4%BB%A4/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/sed%E5%91%BD%E4%BB%A4/ + sed命令 + + + + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/%E6%9B%B4%E6%94%B9ip%E5%9C%B0%E5%9D%80/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/%E6%9B%B4%E6%94%B9ip%E5%9C%B0%E5%9D%80/ + 更改ip地址 +cd /etc/sysconfig/network-scripts/ vi ifcfg-*** 注意:ifcfg打头的文件可能有多个,建议逐个排查 +以我的为例,我的叫ifcfg-eno16780032,打开后是以下内容 +TYPE="Ethernet" BOOTPROTO="none" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" NAME="eno16780032" UUID="71d75a18-06fc-4fbd-be98-d76ddb1a7cde" DEVICE="eno16780032" ONBOOT="yes" IPADDR="192.168.51.199" PREFIX="24" GATEWAY="192.168.51.254" DNS1="119.29.29.29" IPV6_PEERDNS="yes" IPV6_PEERROUTES="yes" IPV6_PRIVACY="no" 按“a”编写,按“esc”完成编写 +编写完成后按“:” 如果保存就用“w”(代表write)如果不保存就按“q!“强制退出(q代表quit,!代表强制) + + + + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/%E7%AC%AC%E4%B8%80%E6%AC%A1%E4%BD%BF%E7%94%A8%E5%90%AF%E7%94%A8%E7%BD%91%E5%8D%A1/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94/%E7%AC%AC%E4%B8%80%E6%AC%A1%E4%BD%BF%E7%94%A8%E5%90%AF%E7%94%A8%E7%BD%91%E5%8D%A1/ + 第一次使用启用网卡(主要针对centos) +cd /etc/sysconfig/network-scripts ls vi ifcfg-*** service network restart + + + + diff --git a/public/小白手册/疑难解答/linux后台运行程序/index.html b/public/小白手册/疑难解答/linux后台运行程序/index.html index 0fa6a8b..2e1e293 100644 --- a/public/小白手册/疑难解答/linux后台运行程序/index.html +++ b/public/小白手册/疑难解答/linux后台运行程序/index.html @@ -12,22 +12,22 @@ :: 星火文档中心 - - - - - - - - - - + + + + + + + + + + - + - +