openresty--centos7下开发环境安装
1. 安装依赖的软件包
yum install readline-devel pcre-devel openssl-devel gcc
2. 安装openresty
-- 1. 下载openresty源码: http://openresty.org/cn/download.html
$ wget https://openresty.org/download/openresty-1.9.7.4.tar.gz
-- 2. 解压tar包
$ tar xzvf openresty-1.9.7.4.tar.gz
-- 3. 配置编译选项,可以根据你的实际情况增加、减少相应的模块
$ ./configure --prefix=/opt/openresty --with-luajit --without-http_redis2_module --with-http_iconv_module
-- 4. 编译并安装
$ make
$ make install
3. HelloWorld
-- 1. 修改配置文件如下:
$ cat /opt/openresty/nginx/conf/nginx.conf
worker_processes 1;
error_log logs/error.log info;
events {
worker_connections 1024;
}
http {
server {
listen 8003;
location / {
content_by_lua 'ngx.say("hello world.")';
}
}
}
-- 2. 启动nginx
$ /opt/openresty/nginx/sbin/nginx
-- 3. 检查nginx
$ curl http://127.0.0.1:8003/
hello world.
4. 性能测试
-- 1. 安装压力测试工具
$ yum install httpd-tools
-- 2. 测试
$ ab -c10 -n50000 http://localhost:8003/
...
Concurrency Level: 10
Time taken for tests: 2.825 seconds
Complete requests: 50000
Failed requests: 0
Write errors: 0
Total transferred: 8050000 bytes
HTML transferred: 650000 bytes
Requests per second: 17697.26 [#/sec] (mean)
Time per request: 0.565 [ms] (mean)
Time per request: 0.057 [ms] (mean, across all concurrent requests)
Transfer rate: 2782.48 [Kbytes/sec] received
...
ref
http://openresty.org/cn/installation.html
http://openresty.org/cn/getting-started.html
http://openresty.org/cn/using-luarocks.html
openresty--centos7下开发环境安装的更多相关文章
- 基于GTK+3 开发远程控制管理软件(C语言实现)系列二 Centos7下开发环境搭建
一.安装gcc gcc-c++ make等编译工具 yum install gcc gcc-c++ kernel-devel 这一步,其实可以不用做,你在安装Centos7的时候,如果选择开发模式安装 ...
- centos7下python2环境安装pip2、kazoo、bottle、beaker
摘自:https://mp.weixin.qq.com/s?src=11×tamp=1576355125&ver=2034&signature=mNp2na6VjFz ...
- linux系统下开发环境安装与配置
安装系统环境 CentOS 6.8 64位 jdk版本 7u80 64位 Tomcat版本 Tomcat7 maven版本 Apache Maven 3.6.0 vsftpd版本 vsftpd-2.2 ...
- centos7 php开发环境安装-composer
1.安装composer cd /usr/local/src curl -sS https://getcomposer.org/installer | php mv composer.phar /us ...
- 【转】android 最新 NDK r8 在window下开发环境搭建 安装配置与使用 详细图文讲解,完整实际配置过程记录(原创)
原文网址:http://www.cnblogs.com/zdz8207/archive/2012/11/27/android-ndk-install.html android 最新 NDK r8 在w ...
- 搭建centos7的开发环境3-Spark安装配置
说起大数据开发,必然就会提到Spark,在这片博文中,我们就介绍一下Spark的安装和配置. 这是Centos7开发环境系列的第三篇,本篇的安装会基于之前的配置进行,有需要的请回复搭建centos7的 ...
- android 最新 NDK r8 在window下开发环境搭建 安装配置与使用 详细图文讲解,完整实际配置过程记录(原创)
android 最新 NDK r8 在window下开发环境搭建 安装配置与使用 详细图文讲解,完整实际配置过程记录(原创) 一直想搞NDK开发却一直给其他事情耽搁了,参考了些网上的资料今天终于把 ...
- Android NDK r8 Cygwin CDT 在window下开发环境搭建 安装配置与使用 具体图文解说
版权声明:本博客全部文章均为原创.欢迎交流.欢迎转载:转载请勿篡改内容,而且注明出处,谢谢! https://blog.csdn.net/waldmer/article/details/3272500 ...
- legend3---Windows 7/8/10 系统下Laravel框架的开发环境安装及部署详解(Vagrant + Homestead)
legend3---Windows 7/8/10 系统下Laravel框架的开发环境安装及部署详解(Vagrant + Homestead) 一.总结 一句话总结: 1.安装的话就是下载好git,va ...
随机推荐
- 转载-找圆算法((HoughCircles)总结与优化-霍夫变换
原文链接: http://www.opencv.org.cn/forum.php?mod=viewthread&tid=34096 找圆算法((HoughCircles)总结与优化 Ope ...
- sublime3配置java开发环境
链接:http://www.jianshu.com/p/48a524a4f63c 或者:http://www.jianshu.com/p/9d167c4c4feb 侵权删!
- 《C++设计新思维》勘误,附C++14新解法
勘误: 原书(中文版)3.13节,65-69页中GenScatterHierarchy以及FieldHelper均存在问题,当TypeList中类型有重复时,无法通过编译(原因在于“二义性基类”). ...
- Vue.js项目中,当图片无法显示时则显示默认图片
使用require将图片进入,写法如下: data: () => ({logo: 'this.src="' + require('../assets/img.png') + '&quo ...
- Python3 函数式编程自带函数
一 map函数 引子 需求1:num1=[1,2,3,4],我的需求是把num1中的每个元素平方后组成新列表. ret = [] num1 = [1,2,3,4] for i in num1: ret ...
- 获取秒级时间戳和毫秒级时间戳---基于python
获取秒级时间戳和毫秒级时间戳 import timeimport datetime t = time.time() print (t) #原始时间数据print (int(t)) #秒级时间戳prin ...
- 【转】SWFUpload 官方说明文档(2.5.0版)
原文出自:http://www.runoob.com/w3cnote/swfupload-document.html SWFUpload使用指南请查阅:http://www.w3cschool.cc/ ...
- 王者荣耀交流协会 - 第6次Scrum会议(第二周)
Scrum master :刘耀泽 工作照片: 照片由刘耀泽(本人)拍摄,组内成员刘耀泽,高远博,王磊,王玉玲,王超,任思佳,袁玥全部到齐. 时间跨度: 2017年10月25日 17:00 — 17: ...
- struts通配符*的使用
<action name="user_*" class="com.wangcf.UserAction" method="{1}"> ...
- Python:列表操作总结
一.创建一个列表 只要把逗号分隔的不同数据项使用方括号括起来即可 list1=['physics','chemistry',1997,2000] list2=[1,2,3,4,5,6,7] [注]:1 ...