首页 > 系统服务 > 详细

flask+uwsgi+openresty(nginx)+linux服务部署---实现负载均衡

时间:2020-07-01 19:15:04      阅读:75      评论:0      收藏:0      [点我收藏+]

一、OpenResty安装

  官网下载相应版本源码包:http://openresty.org/en/download.html

 1 #准备编译环境
 2 yum install pcre-devel openssl-devel gcc curl(centos)
 3 apt-get install libpcre3-dev libssl-dev perl make build-essential curl (Ubuntu)
 4 
 5 #编译安装
 6 wget https://openresty.org/download/openresty-1.15.8.3.tar.gz
 7 tar -xvf openresty-VERSION.tar.gz
 8 cd openresty-VERSION/
 9 ./configure 
10 make 
11 sudo make install
12 
13 #添加环境变量
14 vim ~/.bashrc
15 export PATH=/usr/local/openresty/bin:$PATH
16 source ~/.bashrc

  测试

resty -e print("hello, world")

  启动/停止/重启服务命令(热加载)

#同样添加nginx环境变量
export PATH=/usr/local/openresty/nginx/sbin:$PATH

#启动服务
nginx

#停止服务
nginx -s stop

#热加载
nginx -s reload

 

flask+uwsgi+openresty(nginx)+linux服务部署---实现负载均衡

原文:https://www.cnblogs.com/lhsblog/p/13220658.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!