查看规则集
iptables --list -n // 加一个-n以数字形式显示IP和端口,看起来更舒服
定位到/usr/lib/systemd/system目录,新建’服务名称.service文件’
1 | [Unit] |
1 |
|
使用F2快速展开或隐藏它打开vim时自动展开NERDTree
申请证书
1 | certbot certonly --standalone -d abc.com |
续签,需要暂停web服务器,让出80端口
1 | certbot renew --cert-name abc.com |
当Hexo项目中只用到少量图片时,可以将图片统一放在source/images文件夹中,通过markdown语法访问它们。
1 |  |
图片既可以在首页内容中访问到,也可以在文章正文中访问到。
图片除了可以放在统一的images文件夹中,还可以放在文章自己的目录中。文章的目录可以通过站点配置文件_config.yml来生成。post_asset_folder: true
将_config.yml文件中的配置项post_asset_folder设为true后,执行命令$ hexo new post_name,在source/_posts中会生成文章post_name.md和同名文件夹post_name。将图片资源放在post_name中,文章就可以使用相对路径引用图片资源了。
路由的index.js里面createBrowserRouter时添加{basename:’/pan’}参数
nginx配置文件添加,否则刷新路由时会报找不到/pan/home
1 | location /pan { |
1 | // 客户端 |
1 | // 服务器端 |
创建git用户: useradd git 此用户不允许使用shell,编辑/etc/passwd文件将/bin/bash修改
为/usr/bin/git-shell
cd /home/git目录, 服务端初始化仓库 git init –bare pdf.git 客户端初始化仓库 git init
chown -R git:git pdf.git
配置ssh客户端,在C:\Users\YourUsername.ssh\目录下打开或者新建一个名为config的文件
添加一个配置块:
1 | Host node.gdfcq.top |
Host: 主机别名
ProxyCommand: 代理设置
使用git clone abc.com:/home/git/pdf.git
ssh-keygen命令生成id_rsa.pub公钥,复制公钥内容到/home/git/.ssh/authorize_keys文件内