VPS侦探论坛

 找回密码
 注册
查看: 4616|回复: 8

军哥请进,关于1.3版本在4核8G服务器上的nginx和PHP的性能优化建议

[复制链接]
发表于 2017-3-21 00:01:05 | 显示全部楼层 |阅读模式

如题,相关的性能优化,该怎么做合适?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-3-21 09:53:31 | 显示全部楼层

回复 1# 的帖子



默认都是自动优化了的
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-3-21 10:28:59 | 显示全部楼层

回复 2# 的帖子


好的,谢谢,阿军哥!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-3-21 14:49:08 | 显示全部楼层

回复 2# 的帖子




阿军哥,漏问一问题。对于别人恶意用压测工具如loadruner,Jmeter之类的工具来刷网站,能通过配置文件过滤掉吗?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-3-21 19:14:35 | 显示全部楼层

回复 4# 的帖子


如果是特定的useragent,可以屏蔽useragent

useragent可以日志里查看

nginx对应虚拟主机上设置

        if ($http_user_agent ~* abcde|fghijk|lmno) {
            return 444;
        }

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2017-3-23 11:48:28 | 显示全部楼层

回复 5# 的帖子


军哥,咱们的脚本在腾讯云上不能运行吗?
安装log会报 Couldn't resolve host 'mirrors.tencentyun.com' ,找不到这个地址,相应的脚本改怎么改,让它不连这个地址?
--- lnmp.org ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 311ms
rtt min/avg/max/mdev = 45.332/45.332/45.332/0.000 ms
DNS...ok
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
http://mirrors.tencentyun.com/epel/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tencentyun.com'"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
include/main.sh: line 250: lsb_release: command not found
CentOS
Setting timezone...
[+] Installing ntp...
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
http://mirrors.tencentyun.com/epel/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tencentyun.com'"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
23 Mar 11:43:12 ntpdate[25677]: adjust time server 173.255.246.13 offset -0.046718 sec
Thu Mar 23 11:43:12 CST 2017
[-] Yum remove packages...
error: package httpd is not installed
error: package httpd-tools is not installed
error: package mysql is not installed
error: package mysql-libs is not installed
error: package php-mysql is not installed
error: package php-cli is not installed
error: package php-gd is not installed
error: package php-common is not installed
error: package php is not installed
Loaded plugins: fastestmirror, security
Setting up Remove Process
 楼主| 发表于 2017-3-23 12:30:33 | 显示全部楼层

回复 5# 的帖子


我用的是lnmp1.3-full完整的安装包,安装上需要的东西应该已经齐全,不需要下载才是,腾讯云不知道搞什么飞机。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-3-23 13:11:13 | 显示全部楼层

解决了,解决办法如下


主要原因是腾讯云的dns问题,安装帖子中的方法目前能正常安装
http://bbs.qcloud.com/thread-3972-1-1.html
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-3-23 13:59:55 | 显示全部楼层

回复 6# 的帖子


腾讯云都是用内部dns才能用他们内网的源,不要就换成他们内部的dns,要不就换其他源
参考:https://bbs.vpser.net/thread-14732-1-1.html

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-27 15:19 , Processed in 0.028214 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表