LAMP服务器优化---Nginx
来源:互联网 发布:机构投资者持股数据 编辑:程序博客网 时间:2024/05/01 20:26
本文将服务器Apache换成Nginx
在Nginx下优化对比Apache的性能。
下载Nginx源码包
wget http://nginx.org/download/nginx-1.10.3.tar.gz
下载 zlib
wget http://www.zlib.net/zlib-1.2.11.tar.gz
下载OpenSSL
wget https://www.openssl.org/source/openssl-1.1.0e.tar.gz
将zlib openssl解压到 Nginx/src 目录下
编译安装
./configure --prefix=/usr/local/nginx --with-zlib=src/zlib --with-openssl=src/openssl
nginx启动/停止/重载
To start nginx, run the executable file. Once nginx is started, it can be controlled by invoking the executable with the -s parameter. Use the following syntax:
nginx -s signal
Where signal may be one of the following:
stop — fast shutdown
quit — graceful shutdown
reload — reloading the configuration file
reopen — reopening the log files
配置nginx fcgi代理
重启Nginx
通过 ab 模拟1000个客户端发起200000个并发请求
nginx能够接受的请求太小了。
更改worker进程的最大打开文件数限制。
再次测试
cpu及/io
内存
开始优化
修改如下配置
再次测试
cpu/io
内存
经过调节后,每秒并发达到了10K多。内存的使用也相对较少了。
0 0
- LAMP服务器优化---Nginx
- LAMP服务器优化----PHP优化
- lamp/lnmp优化2--nginx
- LAMP服务器优化--优化前准备
- LAMP服务器优化----Linux内核优化
- LAMP服务器优化----mysql优化(myisam)
- lamp服务器的优化 PHP优化
- nginx 服务器系统优化
- nginx服务器访问优化
- LAMP 架构服务器性能优化建议
- lamp 架构服务器性能优化建议
- LAMP 架构服务器性能优化建议
- Ubuntu下Lamp服务器的性能优化
- 低内存服务器LAMP的内存优化
- LAMP服务器优化----mysql(innodb)
- nginx服务器优化(重要)
- nginx和tomcat服务器优化
- 我的服务器开发之路-LAMP+NGINX=LNMPA
- NHibernate+FluentNHibernate+MySql 运行报错问题
- c++第二次实验:输出完数
- Spring AOP 实现原理
- 【HDU 1431】素数回文
- python,Cocos2d-x,关于配置python后出现的问题,导致命令行失效,
- LAMP服务器优化---Nginx
- GYM 100247 A. The Power of the Dark Side(水~)
- Spring AOP
- [IOS APP]曾仕强演说精选-有声系列
- HDU 3652 B-number
- 数据库事务四种隔离级别
- spring 的platformTrasactionoManager API讲解(翻译)
- 一天一个LINUX命令教程[4]-chmod命令
- 树的广度优先遍历(非递归)和深度优先遍历