WordPressの最高速化
- kamata4649
- 2017年2月26日
- 読了時間: 1分
さて前回紹介したPHP7.1.2をインストールした時の高速化方法の紹介です
PHP7.1.2のインストール方法の紹介↓
WordPressの高速化は
HHVMでインストールし、実行しましょう。
まずは上から順番に実行してください。
yum update -y
yum install cpp gcc-c++ cmake git psmisc {binutils,boost,jemalloc,numactl}-devel \ {ImageMagick,sqlite,tbb,bzip2,openldap,readline,elfutils-libelf,gmp,lz4,pcre}-devel \ lib{xslt,event,yaml,vpx,png,zip,icu,mcrypt,memcached,cap,dwarf}-devel \ {unixODBC,expat,mariadb}-devel lib{edit,curl,xml2,xslt}-devel \ glog-devel oniguruma-devel ocaml gperf enca libjpeg-turbo-devel openssl-devel \ mariadb mariadb-server {fribidi,libc-client}-devel make -y
yum install inotify-tools -y
次に3.15.3HHVMを下のコマンドでインストールしましょう。
rpm -Uvh http://mirrors.linuxeye.com/hhvm-repo/7/x86_64/http://mirrors.linuxeye.com/hhvm-repo/7/x86_64/hhvm-3.15.3-1.el7.centos.x86_64.rpm
hhvm --versionでバージョンの確認をしてください
次にこのコマンドを実行し、Serviceの項目を
cp -p /usr/lib/systemd/system/hhvm.service /etc/systemd/system/
下の文字に書き換えてね
[Service]
ExecStart=/usr/local/bin/hhvm --config /etc/hhvm/server.ini --user nginx --mode daemon -vServer.Type=fastcgi
後は次のコマンドを実行してください。
systemctl daemon-reload
vi /etc/hhvm/server.iniを実行し。
hhvm.server.port を下のように書き換えてね
hhvm.server.port = 9000
date.timezoneを下のように書き換えたら完了です
date.timezone = UTC
最後に下のコマンドで再起動してください
systemctl disable php-fpm
systemctl stop php-fpm
systemctl enable hhvm
systemctl start hhvm
Opmerkingen