Net-Speeder爲OpenVZ加速

標籤:php

1. net-speeder安裝html

wget https://coding.net/u/njzhenghao/p/download/git/raw/master/net_speeder-installer.sh

bash net_speeder-installer.sh

 

 

2. 運行net-speedergit

nohup /usr/local/net_speeder/net_speeder venet0 "ip" >/dev/null 2>&1 &

 

開機啓動:緩存

echo 'nohup /usr/local/net_speeder/net_speeder venet0 "ip" >/dev/null 2>&1 & ' >> /etc/rc.local

 

 

3. 檢測是否運行bash

[root@default ~]# ping twitter.com memcached

PING twitter.com (199.16.156.198) 56(84) bytes of data.網站

64 bytes from 199.16.156.198: icmp_seq=1 ttl=56 time=118 msspa

64 bytes from 199.16.156.198: icmp_seq=1 ttl=56 time=118 ms (DUP!).net

64 bytes from 199.16.156.198: icmp_seq=1 ttl=88 time=118 ms (DUP!)code

64 bytes from 199.16.156.198: icmp_seq=1 ttl=88 time=118 ms (DUP!)

64 bytes from 199.16.156.198: icmp_seq=2 ttl=56 time=118 ms

64 bytes from 199.16.156.198: icmp_seq=2 ttl=56 time=118 ms (DUP!)

64 bytes from 199.16.156.198: icmp_seq=2 ttl=88 time=118 ms (DUP!)

64 bytes from 199.16.156.198: icmp_seq=2 ttl=88 time=118 ms (DUP!)

 

參考網站:

http://www.phpgao.com/vps_net_speeder.html

http://www.panggua.net/net-speeder-speed-up/#0-tsina-1-60858-397232819ff9a47a7b7e80a40613cfe1

 

 

在安裝WordPress以前,建議安裝PHP緩存加速類擴展,對下降VPS壓力和提升WordPress速度大有裨益。

推薦安裝兩個:OPcache和Memcached。

首先,須要進入LNMP解壓目錄lnmp1.3-full:

 

cd /root/lnmp1.3-full

 

 

回車,接下來安裝Opcache:

./addons.sh install opcache

 

回車,再回車。

當出現 「Opcache installed successfully, enjoy it!」 字樣時,即表示安裝成功。

接着安裝Memcached:

./addons.sh install memcached

 

回車,選擇2,回車,再回車。

當出現 「Memcached installed successfully, enjoy it!」 字樣時,即表示安裝成功。

相關文章
相關標籤/搜索