0%

0. 前提知识 BIO、NIO和AIO这三个概念分别对应三种通讯模型:阻塞、非阻塞、非阻塞异步 这三个概念的区别如下: BIO:一个连接一个线程,客户

1.安装服务端 # Debian sudo apt install nfs-kernel-server # RedHat sudo yum install rpcbind nfs-utils 2. 更改配置文件 sudo vim /etc/exports 填入一下内容 # * 表示允许任何网段 IP 的系统访问该 NFS 目录 /nfs *(rw,sync,no_root_squash) 配置说明 NFS配置参数权

location语法 location [=|~|~|^~] /url/ { … } 注:uri是指匹配路径, [ =| ~ | ~ | ^~ | @ ] 是指匹配规则(可选) = : 完全匹配,表示精确匹配后面的url ^~ : 无

nginx -t 测试配置文件 nginx -s reload 修改配置后重载生效 nginx -s reopen 重新打开日志文件 nginx -s stop 快速停止 nginx -s quit

高级配置 原文地址:https://juejin.cn/post/7112826654291918855 1. Nginx反向代理-负载均衡 首先通过

1. 跨域配置 server { listen 80; server_name localhost 127.0.0.1; location / { # 允许跨域请求的“域”,此处可以填具体域名、地址或通配符* add_header 'Access-Control-Allow-Origin' $http_origin always; # 允许客户端提交Cookie add_header 'Access-Control-Allow-Credentials' 'true'; # 允许客户

1. 打开阿里云RAM访问控制,创建用户 访问链接: https://ram.console.aliyun.com/users 2. 给用户添加权限 3. 打开Bucket列表创建Bucket 链接: https://oss.console.aliyun.com/bucket 4. 点击用户中心,查看或创建Ke

安装pip 安装脚本链接 python get-pip.py install Linux Linux下,修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件。文件夹要加“.”,表示是隐藏文件夹) 内容如下: [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host =

1. 交换 # 交换 a = 3 b = 5 print(f'a: {a}, b: {b}') a, b = b, a print(f'a: {a}, b: {b}') # 输出 a: 3, b: 5 a: 5, b: 3 2. yield的使用 # yield的使用 def fibonacci(n): a = 0 b = 1 for _ in range(n): yield a a, b