Skip to content

Commit

Permalink
内容较少的修改
Browse files Browse the repository at this point in the history
  • Loading branch information
No-Github committed Mar 24, 2022
1 parent b9ebbc2 commit 1c898f9
Show file tree
Hide file tree
Showing 26 changed files with 290 additions and 209 deletions.
95 changes: 33 additions & 62 deletions 1earn/Integrated/Linux/Power-Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -3652,6 +3652,13 @@ use [数据库]
source /tmp/dbname.sql
```
**docker 部署**
```bash
docker login
docker run -d -p 3306:3306 --name mariadb-test -e MYSQL_ROOT_PASSWORD=root1234 mariadb:latest
# 这里密码里不能带 !
```
---
#### MySQL
Expand Down Expand Up @@ -5320,7 +5327,7 @@ setenforce 0 # 关闭 selinux
- 拉取镜像
```bash
docker images # 检查一下系统中已经有了哪些镜像
docker images ls # 检查一下系统中已经有了哪些镜像
docker pull nginx # 拉取一个镜像
docker search nginx # 搜索 Docker Hub 中的所有 Nginx 镜像
docker pull jwilder/nginx-proxy # 从非官方源拉取镜像
Expand Down Expand Up @@ -5356,74 +5363,15 @@ setenforce 0 # 关闭 selinux
docker cp xxx.txt [docker_id]:/home # 复制 xxx.txt 到容器的 /home 目录下
docker search [keyword] # 搜索镜像
docker image ls # 查看已下载的镜像列表
docker image rm [docker_image_id] # 删除本地的 docker 镜像
docker rmi -f [docker_image_id] # 删除本地的 docker 镜像
```
- 打包上传
```bash
# 容器打包镜像
docker commit -a "作者" -m "备注" 容器ID <image-name>:<tag>
# 将容器打包成规范的镜像
docker commit -m <exiting-Container> <hub-user>/<repo-name>[:<tag>]
# 登录 Docker Hub
docker login
# 上传推送镜像到公共仓库
docker push <hub-user>/<repo-name>:<tag>
# 当前目录的 Dockerfile 创建镜像
docker build -t <image-name>:<tag> .
# 指定文件构建镜像
docker build -f /path/to/a/Dockerfile -t <image-name>:<tag> .
# 将镜像保存 tar 包
docker save -o image-name.tar <image-name>:<tag>
# 导入 tar 镜像
docker load --input image-name.tar
```
- 默认情况下,只有管理员权限能够运行 docker 命令.考虑到安全问题,你不会想用 root 用户或使用 sudo 来运行 Docker 的.要解决这个问题,你需要将自己的用户加入到 docker 组中.
```bash
usermod -a -G docker $USER
```
- 完成操作后,登出系统然后再重新登录,应该就搞定了.不过若你的平台是 Fedora,则添加用户到 docker 组时会发现这个组是不存在的.那该怎么办呢?你需要首先创建这个组.命令如下:
```bash
groupadd docker && gpasswd -a ${USER} docker && systemctl restart docker
newgrp docker
docker hisotry [docker_name/docker_id] # 查看指定镜像的创建历史
```
**加速**
- [Docker 镜像加速](../../Plan/Misc-Plan.md#Docker)
**实验**
**更多**
- [Docker](./实验/Docker.md)
**常见报错**
- Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
```bash
systemctl daemon-reload
service docker restart
```
- docker timeout
```bash
echo "nameserver 8.8.8.8" > /etc/resolv.conf
sudo systemctl daemon-reload
sudo systemctl restart docker
```
- 容器 "Exited (0)" 自动退出
- 有时镜像内置的执行命令无法正确执行,于是容器就 Exited 了
- 尝试在 docker run 命令最后加上或删除 /bin/bash 选项
#### Docker-Compose
<p align="center">
Expand Down Expand Up @@ -5486,6 +5434,9 @@ docker-compose exec [service] sh # 进入容器内
python 版本的问题, 换 python3.7 以上或用 pip 安装即可
**更多**
- [Docker-Compose](./实验/Docker-Compose.md)
#### Docker-Portainer
<p align="center">
Expand All @@ -5507,6 +5458,26 @@ docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /va
---
### Kubernetes
#### kubectl
**显示和查找资源**
```bash
kubectl get services # 列出所有 namespace 中的所有 service
kubectl get pods -A # 列出所有 namespace 中的所有 pod
kubectl get pods -o wide # 列出所有 pod 并显示详细信息
kubectl get deployment -A # 列出所有 deployment
```
**与运行中的 Pod 交互**
```bash
kubectl logs my-pod # dump 输出 pod 的日志(stdout)
kubectl exec my-pod -- ls / # 在已存在的容器中执行命令(只有一个容器的情况下)
```
---
### QEMU
<p align="center">
Expand Down
12 changes: 12 additions & 0 deletions 1earn/Integrated/Linux/笔记/工具.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,18 @@ jo time=$(date +%s) dir=$HOME
jo -p -a spring summer winter
```

**csvtk**

> 命令行下处理 CSV/TSV格式
- https://github.com/shenwei356/csvtk

**dsq**

> 一个命令行工具,可以对 JSON、CSV、Excel 等格式的文件执行 SQL 查询语句。
- https://github.com/multiprocessio/dsq

---

## 图像视频
Expand Down
21 changes: 20 additions & 1 deletion 1earn/Plan/Misc-Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ npm config delete proxy # 取消代理

- 永久修改,一劳永逸:

1. Linux 下,修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件.文件夹要加".",表示是隐藏文件夹)
1. Linux 和 Mac 下,修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件.文件夹要加".",表示是隐藏文件夹)
```bash
mkdir -p ~/.pip/
tee ~/.pip/pip.conf <<-'EOF'
Expand Down Expand Up @@ -285,6 +285,13 @@ npm config delete proxy # 取消代理
> Setting-->Appearance & Behavior-->System Setting-->HTTP Proxy
### Chocolatey
- https://docs.chocolatey.org/en-us/guides/usage/proxy-settings-for-chocolatey#system-proxy-settings
```
choco config set proxy <locationandport>
```
---
## vscode
Expand Down Expand Up @@ -425,3 +432,15 @@ psexec.exe -accepteula -s -i -d cmd.exe
net stop audiosrv
net start audiosrv
```
**安装 chocolatey**
```
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
```
如果没有报错就可以用 choch 进行软件的安装了
```
choco install notepadplusplus.install
choco install 7zip
```
16 changes: 8 additions & 8 deletions 1earn/Plan/Team-Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

---

# 团队建设
## 团队建设

- [安全实验室的发展及展望](https://www.freebuf.com/articles/es/211571.html)

---

# 任务分配 & 项目管理
## 任务分配 & 项目管理

**看板**
- [Trello](https://trello.com/) - `强烈推荐`
Expand All @@ -45,7 +45,7 @@

---

# 群聊
## 群聊

- [钉钉](https://www.dingtalk.com)
- 好用,但只建议公司内团队使用,非企业类型的团队建议使用其他工具
Expand All @@ -62,7 +62,7 @@

---

# 文件共享
## 文件共享

- [坚果云](https://www.jianguoyun.com) - `强烈推荐`
- 好用,速度可以跑满带宽,免费不够用,团队版价格适中
Expand Down Expand Up @@ -91,7 +91,7 @@

---

# 知识库-Wiki
## 知识库-Wiki

- [GitBook](https://www.gitbook.com/) - `强烈推荐`
- [为知笔记](https://www.wiz.cn/) - `推荐`
Expand All @@ -103,15 +103,15 @@

---

# 在线编辑
## 在线编辑

- [石墨文档](https://shimo.im/) - `强烈推荐`
- [腾讯文档](https://docs.qq.com/)
- [Google 文档](https://docs.google.com/document)

---

# 远程访问
## 远程访问

- [GotoHTTP](http://gotohttp.com/) - `不推荐`
- 可以 web 访问的远程控制平台
Expand All @@ -120,6 +120,6 @@

---

# DNS
## DNS

- [AdguardTeam](https://github.com/AdguardTeam/AdGuardHome)
28 changes: 14 additions & 14 deletions 1earn/Plan/Thinking-Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

---

# 系统思维 - SYSTEMS THINKING
## 系统思维 - SYSTEMS THINKING

## 冰山模型 - Iceberg Model
### 冰山模型 - Iceberg Model

<img src="../../assets/img/Plan/Thinking-Plan/19.png" width="15%" align="right">

Expand Down Expand Up @@ -68,7 +68,7 @@

---

## 反馈循环 - Feedback loop
### 反馈循环 - Feedback loop

<img src="../../assets/img/Plan/Thinking-Plan/4.png" width="13%" align="right">

Expand Down Expand Up @@ -119,7 +119,7 @@

---

## 关系环 - Connection circles
### 关系环 - Connection circles

<img src="../../assets/img/Plan/Thinking-Plan/16.png" width="15%" align="right">

Expand All @@ -141,7 +141,7 @@

---

## 不做清单 - Not-To-Do list
### 不做清单 - Not-To-Do list

<img src="../../assets/img/Plan/Thinking-Plan/22.png" width="15%" align="right">

Expand All @@ -155,17 +155,17 @@

---

# 决策制定 - DECISION MAKING
## 决策制定 - DECISION MAKING

<img src="../../assets/img/Plan/Thinking-Plan/21.png" width="15%" align="right">

## 速度质量成本关系
### 速度质量成本关系

![](../../assets/img/Plan/Thinking-Plan/6.png)

---

## 二阶思维 - Second-order thinking
### 二阶思维 - Second-order thinking

<img src="../../assets/img/Plan/Thinking-Plan/20.png" width="15%" align="right">

Expand Down Expand Up @@ -194,7 +194,7 @@

---

## 决策矩阵 - Decision matrix
### 决策矩阵 - Decision matrix

<img src="../../assets/img/Plan/Thinking-Plan/17.png" width="15%" align="right">

Expand All @@ -212,7 +212,7 @@

---

## 选择模型 - choice model
### 选择模型 - choice model

<img src="../../assets/img/Plan/Thinking-Plan/18.png" width="15%" align="right">

Expand All @@ -230,7 +230,7 @@

---

## 沉没成本 - Sunk Cost
### 沉没成本 - Sunk Cost

<img src="../../assets/img/Plan/Thinking-Plan/23.png" width="35%" align="right">

Expand All @@ -244,9 +244,9 @@

---

# 问题处理 - PROBLEM SOLVING
## 问题处理 - PROBLEM SOLVING

## Issue trees
### Issue trees

<img src="../../assets/img/Plan/Thinking-Plan/12.png" width="15%" align="right">

Expand All @@ -262,7 +262,7 @@ Issue 树基本上是问题的地图。它们为你提供了一种清晰而系

---

## 抽象阶梯式 - Abstraction laddering
### 抽象阶梯式 - Abstraction laddering

<img src="../../assets/img/Plan/Thinking-Plan/15.png" width="15%" align="right">

Expand Down
6 changes: 4 additions & 2 deletions 1earn/Plan/VM-Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

---

# VMware 常见问题
## VMware 常见问题

**关闭虚拟内存**

Expand Down Expand Up @@ -58,7 +58,9 @@ yum install -y open-vm-tools-devel -y

出现此问题的错误是因为网络问题,连通网络,安装 ifconfig 即可

# VirtualBox
---

## VirtualBox

**常见报错**
- **Implementation of the USB 2.0 controller not found!**
Expand Down
Loading

0 comments on commit 1c898f9

Please sign in to comment.