自动部署Hexo
通过Github Action实现持续部署。
Markdown 语法
Markdown 自带语法,也支持传统的 HTML 标签,了解后可以方便写作
搭建自己的博客
记录下使用 hexo 搭建博客的过程。
博客生成
a78f0121370a7c499b98d3b76be39091804c964084ae821043692fc988ee00024ad4a6ef685e6d221ffac2af7414b1a9ec45eb853c895a264bbda8b33d8c839b475edda608c9c91349800632c7fa1a2d2291d46ae987af3e0e380b36b662f413d8779111ee20d3958af1d86eb114b03471b603d9bfff2bd013ec1b09c4bca21263a541b5e8e2d80aad9b9a3474c50681008b2377aa62a0401dae830434766fa78a7a401f2150a02c2f706a05059beb2742d76aaa6756a4ea48d3b008abfa6d5f7151aa14a0c6542ee4ec97e149c4a74ff4b5102bcb6e87e1d80075f03ec951d008167a6a83a9d21ab92679c6ecac2dc7d6b986ed76808e97d ...
oracle使用
Oracle语法介绍
2019年07月20日
a78f0121370a7c499b98d3b76be39091c3c93f540a01a01948c97f911b480261328999b4c8fcbc0b7c8750d7143be5c16e69cee6d35f7c702b00d0512de76218256bb6d322692b56e7efed163f387a0b504d50c3aad19c5bb46c4a56709a9b522685fbe67b09e725899a4741ffc836c289fc9f41998328ecd75544c2ef948692ff99cc72173bf087ab1b0581e6e96c2d73d4e68567210b0bed953dbe1097aebdf2451e2aaf5f5d56c75e89acd6c5ff4899a579aa6d471c53b76f4953c6869e5b18b5d61f08d96feb07a9871ffec77cd83c8b2bb4fe4490496e5a33a74f816d98283b5c88512d2e46d724f08c6bcb978e3aa59e66f09d01e72 ...
Nginx静态服务
1.静态资源类型Nginx 作为静态资源 Web 服务器部署配置, 传输⾮常的⾼效, 常常⽤于静态资源处理, 请求, 动静分离。
⾮服务器动态运⾏⽣成的⽂件属于静态资源
**类型 **
**种类 **
浏览器端渲染
HTML、CSS、JS
图⽚
JPEG、GIF、PNG
视频
FLV、Mp4
⽂件
TXT、任意下载⽂件
2.静态资源场景
静态资源传输延迟最⼩化
3.静态资源配置语法
3.1 ⽂件读取⾼效123Syntax: sendfile on | off;Default: sendfile off;Context: http, server, location, if in location
3.2** 提高网络传输效率** nopush
**sendfile开启情况下,**提⾼⽹络包的’传输效率’相当于等一个区域的快递到了后一起发货,实时性得不到保障
1234Syntax: tcp_nopush on | off;Default: tcp_nopush off;Context: http, server, location作⽤ ...
浏览器缓存Cache-Control Expires
缓存对于web开发有重要作用,尤其是大负荷web系统开发中。
缓存分很多种:
服务器缓存
第三方缓存
浏览器缓存。(代价最小,浏览器依赖的是客户端,几乎不耗费服务端的资源)
让浏览器做缓存需要给浏览器发送指定的Http头,告诉浏览器缓存多长时间,或者坚决不要缓存。
Expires (过期时间)
HTTP头信息Expires (过期时间)
属性是HTTP控制缓存的基本手段,这个属性告诉缓存器:相关副本在多长时间内是新鲜的。过了这个时间,缓存器就会向源服务器发送请求,检查文档是否被修改。几乎所有的缓存服务器都支持Expires (过期时间)属性;
大部分Web服务器支持你用几种方式设置Expires属性;一般的:可以设计一个绝对时间间隔:基于客户最后查看副本的时间(最后访问时间)或者根据服务器上文档最后被修改的时间;
1. Expires头信息: 对于设置静态图片文件(例如导航栏和图片按钮)特别有用;因为这些图片修改很少,你可以给它们设置一- 个特别长的过期时间,这会使你的网站对用户变得相应非常快;<br />他们对于控制有规律改变的网页也很有用,例如:你 ...
Nginx基本配置
启动启动代码格式:nginx安装目录地址 -c nginx配置文件地址例如:
1[root@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -c /etc/nginx/nginx.conf
停止nginx的停止有三种方式:
从容停止1、查看进程号
12[root@LinuxServer ~]# cat /var/run/nginx.pid[root@LinuxServer ~]# ps -ef|grep nginx
2、杀死进程
1[root@LinuxServer ~]# kill -9 22671
强制停止1[root@LinuxServer ~]# pkill -9 nginx
重启
1.验证nginx配置文件是否正确
方法一:进入nginx安装目录sbin下,输入命令 ./nginx -t看到如下显示nginx.conf test is successful说明配置文件正确!
方法二:在启动命令-c前加-t1/usr/local/nginx/sbin/nginx -t -c /etc ...
nginx介绍
Nginx基本简述Nginx是一个开源且高性能、可靠的HTTP中间件、代理服务。开源: 直接获取源代码高性能: 支持海量并发
常见的HTTP服务
1.HTTPD -> Apache基金会2.IIS -> 微软3.GWS -> Google4.openrestry ->5.tengline -> 淘宝基于Nginx开发6.lighttpd ->
Nginx应用场景
静态处理反向代理负载均衡资源缓存安全防护访问限制访问认证
Nginx优秀特性
Nginx基于IO多路复用IO复用解决的是并发性的问题,Socket作为复用,
IO复用(串行,产生阻塞)
多个描述符的I/O操作都能在一个线程内并发交替地顺序完成,这就叫I/O多路复用,这里的 “复用”指的是复用同一个线程。
IO多路复用的实现方式有select、poll、Epool
1.什么是select
select缺点1.能够监视文件描述符的数量存在最大限制2.线性遍历扫描效率低下
2.epool模型1.每当FD(file descriptor)就绪,采用系统的回调函 ...