-
# Centos7 安装 Nginx 或 OpenResty
## 一、 源码安装 Nginx
### 1. 首先在 Centos7 上安装编译器和依赖环境
# yum install gcc-c++ gcc
# yum install pcre pcre-devel
# yum install zlib zlib-devel
# yum install openssl openssl-devel openssl-devel
说明:gcc/gcc-c++是编译器,nginx的http模块要用pcre来解析正则表达式,nginx要用zlib对http内容进行压缩/解压缩,nginx还要用到ssl模块(openssl)
### 2. 下载 nginx 源代码并编译安装
在 https://nginx.org/en/download.html 查看各个版本的下载地址,选择目标版本,复制下载地址,然后在 centos7 centos7 上下载(或者在其他地方下载再复制到 centos7 系统里)
# wget -c https://nginx.org/download/nginx-1.18.xx.tar.gz //下载源代码压缩包
# ./configure --prefix=/usr/local/nginx \
--with-http_stub_status_module \
--with-http_ssl_module
0 码力 |
7 页 |
153.82 KB
| 2 年前 3
-
## 有了 NGINX 和 Kong 为什么还需要 Apache APISIX
演讲人:王院生@深圳支流科技公司
云原生社区Meetup
第四期·广州站
## 有了 NGINX 和 Kong 为什么还需要 Apache APISIX?
# 王院生@支流科技
## 目录 CONTENTS
1. 个人和公司介绍
2. 后端架构演变史
3. Nginx 和 Kong 的问题
4 /74f352d40d61cbb3689b82c15427faa5/p5_5.jpg)
## 支流科技
• 开源爱好者
• Apache APISIX、Apache SkyWalking、NGINX、Kubernetes 等贡献者构成
- 中美远程协作,没有 996
• 分布中国 9 个不同城市
- 一家绝对技术说了算的公司

## apache apisix
## 关于 OpenResty 和 Lua 的思考
Lua + Nginx = 难上加难,左右为难
## 03 基于 Apache APISIX of software engineering (FTSE)
## apache apisix
## 基于 Apache APISIX 破局
What about… Rust + Lua + Nginx?
让 Lua 回归胶水本质!
## apache apisix 基于 Apache APISIX 破局
## How ?
基于Lua的C API(lua_*), 构建原生lua模块,产物为一个Shared
0 码力 |
27 页 |
4.88 MB
| 2 年前 3
-
[Image](/uploads/documents/e/8/4/7/e84711086fba98bcabbdca945632670f/p9_2.jpg)
## 微信搜一搜
APISIX 微服务网关
讨论:Nginx 的版权问题
## 基于 Apache APISIX 的 下一代微服务架构
温铭 wenming@apache.org
## 大纲
• Apache APISIX 是什么?
• Apache /8/4/7/e84711086fba98bcabbdca945632670f/p12_1.jpg)
## Apache APISIX 是什么?
- 云原生微服务 API 网关
- 基于 Nginx 和 etcd 实现
• 集成了控制面和数据面
- 提供灵活的插件机制
- 动态上游、动态路由、插件热加载

## API 网关的传统功能
- 让 API 请求更安全、更高效的得到处理
- 覆盖 Nginx 的所有功能:反向代理、负载均衡
- 动态上游、动态 SSL 证书、动态限流限速
• 主动/被动健康检查、服务熔断
## 云原生下的新功能
• 对接 Prometheus、Zipkin、Skywalking
0 码力 |
33 页 |
1.55 MB
| 2 年前 3
-
Open Ta//k 公开课
# Traefik 在又拍云的应用和改造
陈卓 又拍云系统开发工程师
又拍云
## 分享内容
- Traefik 简介
- Traefik 跟 Ingress-Nginx 比较
- 我们为什么使用 Traefik
- Traefik 改造之路
## Traefik 简介
## traffic
" \
4 nginx
## Traefik 配置提供者 —Provider
|Provider|Type|Configuration Type|
|---|---|---|
|Docker|Orchestrator|Label| |File|Manual|TOML/YAML format|
|Consul|KV|KV|
|etcd|KV|KV|
|Redis|KV|KV|
|ZooKeeper|KV|KV|
## I ngress-Nginx 介绍
• Ingress-Nginx: K8S 官方的 Http 网关产品
• Ingress 配置:指的是 K8S 的 Ingress 的 configmap
Ingress 配置
 AGE
nginx NodePort 10.233.29.96 80:32345/TCP 14s
# 访问测试,如果能够正常返回NGINX首页,说明正常
]# curl localhost:32345
## 卸载
]# ansible-playbook -i inventory/mycluster/hosts.ini Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort:
0 码力 |
135 页 |
21.02 MB
| 2 年前 3
-
"default/nginx-59: has no endpoints" -m tcp --dport 80 -j REJECT --reject-with icmp-port-unreachable -A KUBE-SERVICES -d 10.96.61.252/32 -p tcp -m comment --comment "default/nginx-64: has no "default/nginx-67: has no endpoints" -m tcp --dport 80 -j REJECT --reject-with icmp-port-unreachable -A KUBE-SERVICES -d 10.98.85.41/32 -p tcp -m comment --comment "default/nginx-9: has no endpoints" "default/nginx-17: has no endpoints" -m tcp --dport 80 -j REJECT --reject-with icmp-port-unreachable -A KUBE-SERVICES -d 10.106.49.80/32 -p tcp -m comment --comment "default/nginx-37: has no
0 码力 |
11 页 |
444.46 KB
| 2 年前 3
-
controller with 4 replicas and nginx version 1.7.9. Wait for the replication controller to bring all 4 pods up:
apiVersion: v1
kind: ReplicationController
metadata:
name: my-nginx
spec:
replicas: 4
template: template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
Once the RC is up, let's go to the kubectl web console open the replication controller section in another browser tab.
kubectl rolling-update my-nginx -image=nginx:1.9.1
You will notice in the logs that Kubernetes decided to deploy only one pod at a time
0 码力 |
66 页 |
6.10 MB
| 2 年前 3
-
# vi pod-
nginx-web1-v1.19.5.yml #内容如下
apiVersion: v1
kind: Pod
metadata:
name: pod-
nginx-web1-v1.19.5 #pod 名,这个名称可带小数点
labels:
#给 pod 打标签,便于其他资源对它的选择
lbname: lbvalue-
nginx-web1
tcpSocket: -f pod-
nginx-web1-v1.19.5.yaml # 应用此文件,创建文件里定义的所有资源
# kubectl get pod -owide # 查看 pod 运行情况
# kubectl get svc # 查看 service
k8s-node01# docker ps | grep
nginx #查看容器
# kubectl delete -f pod-
nginx-web1-v1 pod
| NAME | READY | STATUS | RESTARTS | AGE | |
| nginx-pod-v1.19.5 | 0/1 | Running | 0 | 12s | |
| 0 码力 |
126 页 |
4.33 MB
| 2 年前 3 -
and the value 'my frontend running nginx',
overwriting any existing value
oc annotate -- overwrite pods foo description='my frontend running nginx'
# Update all pods in the namespace description='my frontend running nginx'
# Update pod 'foo' only if the resource is unchanged from version 1
oc annotate pods foo description='my frontend running nginx' --resource-version=1 manifest.yaml that matches label app=nginx and delete all other resources that are not in the file and match label app=nginx
oc apply --prune -f manifest.yaml -l app=nginx
# Apply the configuration in manifest 0 码力 |
120 页 |
1.04 MB
| 2 年前 3
|