案例说明:
前面一层nginx+Keepalived部署的LB,后端两台web服务器部署了多实例的tomcat,通过https方式部署nginx反向代理tomcat请求。配置一如下:

1)LB层的nginx配置

访问http强制转到https
[root@external-lb01 ~]# cat /data/nginx/conf/vhosts/80-www.kevin.com.conf
server {
listen 80;
server_name kevin.com www.kevin.com; access_log /data/nginx/logs/www.kevin.com-access.log main;
error_log /data/nginx/logs/www.kevin.com-error.log; error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
} return 301 https://$server_name$request_uri;
} https反向代理的配置
[root@external-lb01 ~]# cat /data/nginx/conf/vhosts/443-www.kevin.com.conf
upstream scf_cluster {
ip_hash;
server 192.168.10.20:9020;
server 192.168.10.21:9020;
}
upstream portal_cluster {
ip_hash;
server 192.168.10.20:9040;
server 192.168.10.21:9040;
}
upstream file_cluster{
ip_hash;
server 192.168.10.20:9020;
}
upstream workflow_cluster{
ip_hash;
server 192.168.10.20:9020;
server 192.168.10.21:9020;
}
upstream batch_cluster{
server 192.168.10.20:9020;
server 192.168.10.21:9020;
} server {
listen 443;
server_name www.kevin.com; ssl on;
ssl_certificate /data/nginx/conf/ssl/kevin.cer;
ssl_certificate_key /data/nginx/conf/ssl/kevin.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
ssl_prefer_server_ciphers on; access_log /data/nginx/logs/www.kevin.com-access.log main;
error_log /data/nginx/logs/www.kevin.com-error.log; error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
} rewrite /portal-pc https://www.kevin.com break; location / {
proxy_pass http://portal_cluster/portal-pc/;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_redirect off; } location /scf {
proxy_pass http://scf_cluster/scf;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_redirect off; } location /msdp-file {
proxy_pass http://file_cluster/msdp-file;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_redirect off; } location /upload {
proxy_pass http://file_cluster/upload;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_redirect off; } location /activiti-workflow-console {
proxy_pass http://workflow_cluster/activiti-workflow-console;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_redirect off; } location /batch-framework-web {
proxy_pass http://batch_cluster/batch-framework-web;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_redirect off;
}
} 以上配置中,需要注意:
访问https://www.kevin.com 要求和访问http://192.168.10.20:9040/portal-pc/ 结果一致
访问https://www.kevin.com/portal-pc 要求和访问https://www.kevin.com 结果一致 2)后端两台机器192.168.10.20和192.168.10.21的tomcat配置。两台配置一致,这里以192.168.10.20配置为例:
[root@bl2-app01 ~]# cat /data/release/projects/tomcat_app_9020/conf/server.xml
......
<Connector port="9020" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"/>
......
<Connector port="9029" protocol="AJP/1.3" redirectPort="8443" /> [root@bl2-app01 ~]# cat /data/release/projects/tomcat_portal_9040/conf/server.xml
......
<Connector port="9040" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="4443" URIEncoding="UTF-8"/>
......
<Connector port="9049" protocol="AJP/1.3" redirectPort="4443" />
.....

===============================================================================
配置二:也可以采用如下proxy_redirect配置(指定修改被代理服务器返回的响应头中的location头域跟refresh头域数值)(注意下面proxy_redirect里由http -> https的代理返回设置)

[root@external-lb01 ~]# cat /data/nginx/conf/vhosts/443-www.kevin.com.conf
upstream scf_cluster {
ip_hash;
server 192.168.10.20:9020;
server 192.168.10.21:9020;
}
upstream portal_cluster {
ip_hash;
server 192.168.10.20:9040;
server 192.168.10.21:9040;
}
upstream file_cluster{
ip_hash;
server 192.168.10.20:9020;
}
upstream workflow_cluster{
ip_hash;
server 192.168.10.20:9020;
server 192.168.10.21:9020;
}
upstream batch_cluster{
server 192.168.10.20:9020;
server 192.168.10.21:9020;
} server {
listen 443;
server_name www.kevin.com; ssl on;
ssl_certificate /data/nginx/conf/ssl/bigtree.cer;
ssl_certificate_key /data/nginx/conf/ssl/bigtree.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
ssl_prefer_server_ciphers on; access_log /data/nginx/logs/www.kevin.com-access.log main;
error_log /data/nginx/logs/www.kevin.com-error.log; error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
} location /scf {
proxy_pass http://scf_cluster/scf;
proxy_redirect http://scf_cluster/scf https://www.kevin.com/scf;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 600;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_max_temp_file_size 128m;
} location / {
proxy_pass http://portal_cluster/portal-pc/;
proxy_redirect http://portal_cluster/portal-pc/ https://www.kevin.com/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 600;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_max_temp_file_size 128m;
} location /msdp-file {
proxy_pass http://file_cluster/msdp-file;
proxy_redirect http://file_cluster/msdp-file https://www.kevin.com/msdp-file;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 600;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_max_temp_file_size 128m;
} location /upload {
proxy_pass http://file_cluster/upload;
proxy_redirect http://file_cluster/upload https://www.kevin.com/upload;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 600;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_max_temp_file_size 128m;
} location /activiti-workflow-console {
proxy_pass http://workflow_cluster/activiti-workflow-console;
proxy_redirect http://workflow_cluster/activiti-workflow-console https://www.kevin.com/activiti-workflow-console;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 600;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_max_temp_file_size 128m;
} location /batch-framework-web {
proxy_pass http://batch_cluster/batch-framework-web;
proxy_redirect http://batch_cluster/batch-framework-web https://www.kevin.com/batch-framework-web;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 600;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_max_temp_file_size 128m;
}
} ======================温馨提示========================
上面启用了proxy_redirect配置(http->https),配置中就不需要"proxy_set_header Host $host;",即不需要"添加发往后端服务器的请求头"的配置了

================================================================================
如上,配置了80端口的http访问强制跳转为443端口的https访问方式:
1)如果域名配置为https的访问方式,则上面配置一和配置二都可以。
2)如果域名配置为http的访问方式,则如上配置一后,访问的结果都只会跳转到https的首页,故这种情况下需如上配置二。

如下,访问http://bpm.kevin.com的结果只会在强制跳转为https://www.kevin.com
[root@external-lb01 ~]# cat /data/nginx/conf/vhosts/bpm.kevin.com.conf
upstream os-8080 {
#ip_hash;
server 192.168.10.20:8080 max_fails=3 fail_timeout=15s;
server 192.168.10.21:8080 max_fails=3 fail_timeout=15s;
} server {
listen 80;
server_name bpm.kevin.com; access_log /data/nginx/logs/bpm.kevin.com-access.log main;
error_log /data/nginx/logs/bpm.kevin.com-error.log; location / {
proxy_pass http://os-8080;
proxy_redirect off ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 600;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_max_temp_file_size 128m;
#proxy_cache mycache;
#proxy_cache_valid 200 302 1h;
#proxy_cache_valid 301 1d;
#proxy_cache_valid any 1m;
} error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
} 如果想要访问http://bpm.kevin.com的结果不强制跳转为https://www.kevin.com,则需要启用proxy_redirect的配置:
[root@external-lb01 ~]# cat /data/nginx/conf/vhosts/bpm.kevin.com.conf
upstream os-8080 {
#ip_hash;
server 192.168.10.20:8080 max_fails=3 fail_timeout=15s;
server 192.168.10.21:8080 max_fails=3 fail_timeout=15s;
} server {
listen 80;
server_name bpm.kevin.com; access_log /data/nginx/logs/bpm.kevin.com-access.log main;
error_log /data/nginx/logs/bpm.kevin.com-error.log; location / {
proxy_pass http://os-8080;
proxy_set_header Host $host; //注意这个是http请求,没有http->https转发需求,必须要加上这个proxy_set_header设置,否则代理转发返回的头信息会有误!
proxy_redirect http://os-8080/ http://bpm.kevin.com/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
} error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}

===============================================================================
nginx做前端代理分发,tomcat处理请求。nginx反代tomcat实现https有二个方法

一、nginx配置https,tomcat也配置https
1)nginx配置https
upstream https_tomcat_web {
server 127.0.0.1:8443;
} server {
listen 443;
server_name www.test.com;
index index.html;
root /var/www/html/test; ssl on;
ssl_certificate /etc/nginx/go.pem;
ssl_certificate_key /etc/nginx/go.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1.2;
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on; location ~ ^/admin {
proxy_pass https://https_tomcat_web; //是https的
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 100m;
client_body_buffer_size 256k;
proxy_connect_timeout 60;
proxy_send_timeout 30;
proxy_read_timeout 30;
proxy_buffer_size 8k;
proxy_buffers 8 64k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
} error_page 404 /404.html;
location = /40x.html {
} error_page 500 502 503 504 /50x.html; location = /50x.html {
} } 2)tomcat的https配置,配置文件server.xml
<Service name="Catalina">
<Connector port="8001" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" /> <Connector port="8091"
protocol="AJP/1.3"
redirectPort="8443" /> //添加以下内容
<Connector port="8443"
protocol="HTTP/1.1"
SSLEnabled="true"
scheme="https"
secure="false"
keystoreFile="cert/gotom.pfx"
keystoreType="PKCS12"
keystorePass="214261272770418"
clientAuth="false"
SSLProtocol="TLSv1+TLSv1.1+TLSv1.2"
ciphers="TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256" /> ..................省略....................
</Service> 配置好后重新启动nginx,tomcat,就可以https访问了,这也是现在比较常见采用的配置方式 。 二、nginx采用https,tomcat采用http
1)nginx配置https
upstream https_tomcat_web {
server 127.0.0.1:8001;
} server {
listen 443;
server_name www.test.com;
index index.html;
root /var/www/html/test; ssl on;
ssl_certificate /etc/nginx/go.pem;
ssl_certificate_key /etc/nginx/go.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1.2;
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on; location ~ ^/admin {
proxy_pass http://https_tomcat_web; //是http的
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 100m;
client_body_buffer_size 256k;
proxy_connect_timeout 60;
proxy_send_timeout 30;
proxy_read_timeout 30;
proxy_buffer_size 8k;
proxy_buffers 8 64k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
} error_page 404 /404.html;
location = /40x.html {
} error_page 500 502 503 504 /50x.html; location = /50x.html {
} } 2)tomcat的http配置,配置文件server.xml
<Service name="Catalina">
<Connector port="8001" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443" /> //在这里重新定向到了443端口 <Connector port="8091"
protocol="AJP/1.3"
redirectPort="443" /> ..................省略....................
</Service>
重启nginx,tomcat,https就配置好了。

=====================Nginx非80端口代理转发配置=======================
注意:nginx使用非80端口转发时,proxy_set_header配置中的$host后面一定要跟端口!如下篇配置(proxy_set_header Host $host:8080; )。否则访问会有问题!(当https访问时,已配置了http强转https,则$host后面不需加443端口)。

[root@ng-lb01 vhosts]# cat fax.kevin.com.conf
upstream fax {
server 192.168.10.34:8080;
} server {
listen 8080;
server_name fax.kevin.com; access_log /data/nginx/logs/fax.kevin.com-access.log main;
error_log /data/nginx/logs/fax.kevin.com-error.log; location / {
proxy_pass http://fax;
proxy_set_header Host $host:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_redirect off; } error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}

nginx通过https方式反向代理多实例tomcat的更多相关文章

  1. NC 使用Nginx实现https的反向代理

    summary: [通过Nginx实现NCC的https访问,并解决UClient应用的问题] 1 概述 通过Nginx 安装配置反向代理,实现NC.NCC的https访问. 本文以NCC2005为例 ...

  2. 使用nginx做反向代理来访问tomcat服务器

    本次记录的是使用nginx来做一个反向代理来访问tomcat服务器.简单的来说就是使用nginx做为一个中间件,来分发客户端的请求,将这些请求分发到对应的合适的服务器上来完成请求及响应. 第一步:安装 ...

  3. 【架构师之路】Nginx负载均衡与反向代理—《亿级流量网站架构核心技术》

    本篇摘自<亿级流量网站架构核心技术>第二章 Nginx负载均衡与反向代理 部分内容. 当我们的应用单实例不能支撑用户请求时,此时就需要扩容,从一台服务器扩容到两台.几十台.几百台.然而,用 ...

  4. Nginx插件之openresty反向代理和日志滚动配置案例

    Nginx插件之openresty反向代理和日志滚动配置案例 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.openresty介绍 1>.Nginx介绍 Nginx是一款 ...

  5. nginx基于TCP的反向代理

    一.4层的负载均衡 Nginx Plus的商业授权版开始具有TCP负载均衡的功能.从Nginx 1.7.7版本开始加入的,现在变成了一个商业收费版本,想要试用,需要在官网申请.也就是说,Nginx除了 ...

  6. Nginx应用-Location路由反向代理及重写策略 请求转发-URL匹配规则 NGINX Reverse Proxy

    NGINX Docs | NGINX Reverse Proxy https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/ ...

  7. 利用nginx自带的反向代理以及轮询功能实现应用的负载均衡

    针对中间件部署的应用(war包),可使用nginx自带的反向代理以及轮询功能,实现应用的负载均衡. 一.架构图 二.环境准备 准备2套环境,如19.1.0.18:7001,19.1.0.16:7001 ...

  8. Nginx的安装及反向代理设置

    因为项目的缘故,接触到了Nginx的安装和反向代理设置,和大家分享下. 一.Nginx的下载.安装cd /homewget http://nginx.org/download/nginx-1.0.5. ...

  9. nginx与apache配合反向代理技术1

    序:最近在看Dimitri Aivaliotis的<Mastering Nginx>,刚好跆拳道课下班在路上看了反向代理服务器,准备在自己的博客VPS尝试一下 web代理服务器可以实现分布 ...

随机推荐

  1. python第九十六天 ---Django(1)

    django 模块 一  安装: pip3 install django 或 python -m pip install django 二  添加环境变量 相关命令: #cmd 下 django-ad ...

  2. 用友U8年度账结转 常用凭证丢失

    用友年度账结转常用凭证丢失解决方法 1.将新年度账两个表备份后清空:gl-bfreq和gl-bfreqinfo 2.复制旧年度账中gl-bfreq和gl-bfreqinfo两个表数据到新年度账即可.

  3. 15LaTeX学习系列之---LaTeX里插入数学公式

    目录 目录 前言 (一)常用的数学公式命令 ==1.上下标== ==2.矢量== ==3.括号== ==4.符号关系== ==5.三角形符号== ==6.求和与累积== ==7.积分与微分== ==8 ...

  4. Ubuntu 16.04 LTS 降级安装GCC 4.8

    转载自https://www.linuxidc.com/Linux/2017-03/142299.htm Ubuntu 16.04 LTS 降级安装GCC 4.8 [日期:2017-03-28] 来源 ...

  5. 【项目 · WonderLand】 系 统 设 计

    团 队 作 业 ---- 系 统 设 计 Part 0 · 简 要 目 录 Part 1 · 完 善 需 求 规 格 说 明 书 Part 2 · 团 队 编 码 规 范 Part 3 · 数 据 库 ...

  6. 布局:高度已知,布局一个三栏布局,左栏和右栏宽度为200px,中间自适应

    需求:高度已知为200px,写出三栏布局,左栏和右栏各位200px,中间自适应,如下图所示: 方法一:float浮动布局 原理是:定义三个区块,需要注意的是中间的区块放在右边区块的下面,统一设置高度为 ...

  7. 计算器和Menu

    MainActivity.java import android.app.Activity; import android.content.Intent; import android.os.Bund ...

  8. python第五十三课——time模块

    1.time.datatime.calendar模块的引入讲解(重视) Unix时间戳(timestamp):返回的是数值类型数据(float值), 概念:记录了从1970年00点00分00秒至今的秒 ...

  9. cpu的组成及分工

    控制单元是上帝:掌控一切: 运算单元只负责算术和逻辑运算,运算的指令由控制单元提供,数据由寄存器提供: 存储单元:一方面给运算单元提供输入输出,另一方面在控制单元的控制下和内存通信: 控制单元使用运算 ...

  10. the current differences between MyISAM and InnoDB storage engines

    原文地址:https://stackoverflow.com/questions/47680213/what-are-the-current-differences-between-myisam-an ...