摘要: 测试机器为腾讯云服务器1核1G内存,swap分区2G,停用除SSH外的所有服务,仅保留nginx,优化思路主要包括两个层面:系统层面+nginx层面。 一、系统层面 1、调整同时打开文件数量 ulimit -n 20480 2、TCP最大连接数(somaxconn) echo 10000 > /pr 阅读全文
posted @ 2018-01-16 19:03 sun111 阅读(21321) 评论(0) 推荐(0) 编辑
摘要: yum 安装 gcc 编译环境,为编译 lnmp 做准备yum install gcc automake autoconf libtool gcc-c++ 14.1 编译 nginx 1: 下载 http://nginx.org/en/download.html选择 stable 版本下载2: 解压 阅读全文
posted @ 2018-01-17 22:06 sun111 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1、进入nginx源码目录,重新配置编译参数 ./configure --prefix=/usr/local/nginx/ --with-http_stub_status_module 2、重新编译安装 make && make install 3、重启nginx pkill -9 nginx /u 阅读全文
posted @ 2018-01-16 19:08 sun111 阅读(1593) 评论(0) 推荐(0) 编辑