1592

Centos7更换国内源

备份yum源

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

安装国内源

#阿里云源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

#网易源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
2892

Win10安装MSYS2和zsh

安装MSYS2

以下地址下载安装
https://www.msys2.org/

http://repo.msys2.org/distrib/

修改home目录

修改home目录为Windows home目录

vim /etc/nsswitch.conf

db_home: windows

安装zsh

pacman -S zsh
4633

Centos终端下显示图片

安装caca-utils

yum install caca-utils -y

查看图片

cacaview 1.jpg
385

docker访问宿主机

host模式,容器内共享宿主机的网络

--network host
4201

Centos用Certbot安装ssl证书

安装certbot

yum install certbot python2-certbot-nginx

1. 使用nginx插件自动配置

certbot --nginx