Hugo' Blog


  • 首页

  • 分类

  • 归档

  • 标签

  • 关于

  • 搜索

nginx 常用

发表于 2018-01-26 | 分类于 linux | 阅读次数:

CentOS 7 (使用yum进行安装)

建议先替换CentOS 7阿里镜像地址

1
2
3
4
5
6
7
8
9
10
#添加CentOS 7阿里镜像地址
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#安装Nginx
sudo yum install -y nginx
#启动Nginx
sudo systemctl start nginx
#CentOS 7 开机启动Nginx
sudo systemctl enable nginx

常用配置

阅读全文 »

Let's Encrypt给网站免费加上https

发表于 2018-01-26 | 分类于 linux | 阅读次数:

推荐,acme.sh

acme.sh 实现了 acme 协议, 可以从 letsencrypt 生成免费的证书.

主要步骤:

  1. 安装 acme.sh
  2. 生成证书
  3. copy 证书到 nginx/apache 或者其他服务
  4. 更新证书
  5. 更新 acme.sh
  6. 出错怎么办, 如何调试

下面详细介绍.

阅读全文 »

docker 入门

发表于 2017-12-30 | 分类于 容器 , docker | 阅读次数:

docker

常用命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
杀死所有正在运行的容器
docker kill $(docker ps -a -q)

停止所有正在运行的容器
docker stop $(docker ps -a -q)

删除所有已经停止的容器
docker rm $(docker ps -a -q)

删除所有未打 dangling 标签的镜像
docker rmi $(docker images -q -f dangling=true)

删除所有镜像
docker rmi $(docker images -q)

强制删除镜像名称中包含“doss-api”的镜像
docker rmi --force $(docker images | grep doss-api | awk '{print $3}')

https://docs.docker.com/engine/installation/linux/centos/

阅读全文 »
Hugo Lew

Hugo Lew

a perfect circle

3 日志
3 分类
3 标签
RSS
0%
© 2017 — 2018 Hugo Lew | Site words total count: 3.3k
由 Hexo 强力驱动
|
主题 — NexT.Gemini