打印

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

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

如题,相关的性能优化,该怎么做合适?

TOP

回复 1# 的帖子

默认都是自动优化了的

Paypal信用卡代付/代购VPS/域名/软件/付费代维问题解决等 QQ 503228080 旺旺 lzhenbao
军哥淘宝店铺
QQ/旺旺仅提供代购及付费代维/问题解决等服务,其他不回复!LNMP相关问题请在本论坛发帖,提问前先搜索,按https://bbs.vpser.net/thread-2555-1-1.html 反馈信息!

TOP

回复 2# 的帖子

好的,谢谢,阿军哥!

TOP

回复 2# 的帖子

阿军哥,漏问一问题。对于别人恶意用压测工具如loadruner,Jmeter之类的工具来刷网站,能通过配置文件过滤掉吗?

TOP

回复 4# 的帖子

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

useragent可以日志里查看

nginx对应虚拟主机上设置

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

Paypal信用卡代付/代购VPS/域名/软件/付费代维问题解决等 QQ 503228080 旺旺 lzhenbao
军哥淘宝店铺
QQ/旺旺仅提供代购及付费代维/问题解决等服务,其他不回复!LNMP相关问题请在本论坛发帖,提问前先搜索,按https://bbs.vpser.net/thread-2555-1-1.html 反馈信息!

TOP

回复 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

TOP

回复 5# 的帖子

我用的是lnmp1.3-full完整的安装包,安装上需要的东西应该已经齐全,不需要下载才是,腾讯云不知道搞什么飞机。

TOP

解决了,解决办法如下

主要原因是腾讯云的dns问题,安装帖子中的方法目前能正常安装
http://bbs.qcloud.com/thread-3972-1-1.html

TOP

回复 6# 的帖子

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

Paypal信用卡代付/代购VPS/域名/软件/付费代维问题解决等 QQ 503228080 旺旺 lzhenbao
军哥淘宝店铺
QQ/旺旺仅提供代购及付费代维/问题解决等服务,其他不回复!LNMP相关问题请在本论坛发帖,提问前先搜索,按https://bbs.vpser.net/thread-2555-1-1.html 反馈信息!

TOP