ServersMan@VPS CentOS6 phpとWordPressのInstall

続けてphpのinstall。

  1. yumで確認

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile

  • base: ftp.iij.ad.jp

  • extras: ftp.iij.ad.jp

  • updates: ftp.iij.ad.jp Available Packages php.x86_64 5.3.3-22.el6 base php-fpm.x86_64 5.3.3-22.el6 base

    むぅ、5.3系か。6.4で5.4系になるんだっけ?

    • yumでInstall

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile

  • base: ftp.iij.ad.jp
  • extras: ftp.iij.ad.jp
  • updates: ftp.iij.ad.jp Setting up Install Process Resolving Dependencies –> Running transaction check —> Package php.x86_64 0:5.3.3-22.el6 will be installed –> Processing Dependency: php-common(x86-64) = 5.3.3-22.el6 for package: php-5.3.3-22.el6.x86_64 –> Processing Dependency: php-cli(x86-64) = 5.3.3-22.el6 for package: php-5.3.3-22.el6.x86_64 —> Package php-fpm.x86_64 0:5.3.3-22.el6 will be installed –> Running transaction check —> Package php-cli.x86_64 0:5.3.3-22.el6 will be installed —> Package php-common.x86_64 0:5.3.3-22.el6 will be installed –> Finished Dependency Resolution

Dependencies Resolved

================================================================================ Package Arch Version Repository Size

Installing: php x86_64 5.3.3-22.el6 base 1.1 M php-fpm x86_64 5.3.3-22.el6 base 1.1 M Installing for dependencies: php-cli x86_64 5.3.3-22.el6 base 2.2 M php-common x86_64 5.3.3-22.el6 base 524 k

Transaction Summary

Install 4 Package(s)

Total download size: 5.0 M Installed size: 16 M Is this ok [y/N]: y Downloading Packages: (1/4): php-5.3.3-22.el6.x86_64.rpm | 1.1 MB 00:00 (2/4): php-cli-5.3.3-22.el6.x86_64.rpm | 2.2 MB 00:00 (3/4): php-common-5.3.3-22.el6.x86_64.rpm | 524 kB 00:00 (4/4): php-fpm-5.3.3-22.el6.x86_64.rpm | 1.1 MB 00:00

Total 5.4 MB/s | 5.0 MB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : php-common-5.3.3-22.el6.x86_64 1/4 Installing : php-cli-5.3.3-22.el6.x86_64 2/4 Installing : php-5.3.3-22.el6.x86_64 3/4 Installing : php-fpm-5.3.3-22.el6.x86_64 4/4 Verifying : php-cli-5.3.3-22.el6.x86_64 1/4 Verifying : php-common-5.3.3-22.el6.x86_64 2/4 Verifying : php-5.3.3-22.el6.x86_64 3/4 Verifying : php-fpm-5.3.3-22.el6.x86_64 4/4

Installed: php.x86_64 0:5.3.3-22.el6 php-fpm.x86_64 0:5.3.3-22.el6

Dependency Installed: php-cli.x86_64 0:5.3.3-22.el6 php-common.x86_64 0:5.3.3-22.el6

Complete! [xxxxx@dti-vps-srvXX ~]$

  * php-fpmのlisten portとProcessのuser/groupの変更

    > <pre>[xxxxx@dti-vps-srvXX ~]$ sudo vi /etc/php-fpm.d/www.conf

編集内容 listen = 127.0.0.1:9000 を変更(loopbackだけなので変えなくてもいいかなと思うけど一応)。user = nginx/group = nginxk

  * nginxでphpの処理方法やら何やらを追加

    > <pre>[xxxxx@dti-vps-srvXX ~]$ sudo vi /etc/nginx/conf.d/default.conf

編集内容 *.phpのコメントアウトされていたところを戻してSCRIPT_FILENAMEやrootを適宜調整

  * php-fpmを自動起動するように設定

    > <pre>[xxxxx@dti-vps-srvXX ~]$ chkconfig --list php-fpm

php-fpm 0:off 1:off 2:off 3:off 4:off 5:off 6:off [xxxxx@dti-vps-srvXX ~]$ sudo chkconfig php-fpm on [xxxxx@dti-vps-srvXX ~]$ chkconfig –list php-fpm php-fpm 0:off 1:off 2:on 3:on 4:on 5:on 6:off

  * php-mysqlを入れ忘れてたので、追加install

    > <pre>[xxxxx@dti-vps-srvXX ~]$ sudo yum install php-mysql

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile

  • base: ftp.iij.ad.jp
  • extras: ftp.iij.ad.jp
  • updates: ftp.iij.ad.jp Setting up Install Process Resolving Dependencies –> Running transaction check —> Package php-mysql.x86_64 0:5.3.3-22.el6 will be installed –> Processing Dependency: php-pdo(x86-64) for package: php-mysql-5.3.3-22.el6.x86_64 –> Running transaction check —> Package php-pdo.x86_64 0:5.3.3-22.el6 will be installed –> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================== Package Arch Version Repository Size

Installing: php-mysql x86_64 5.3.3-22.el6 base 81 k Installing for dependencies: php-pdo x86_64 5.3.3-22.el6 base 75 k

Transaction Summary

Install 2 Package(s)

Total download size: 155 k Installed size: 383 k Is this ok [y/N]: y Downloading Packages: (1/2): php-mysql-5.3.3-22.el6.x86_64.rpm | 81 kB 00:00 (2/2): php-pdo-5.3.3-22.el6.x86_64.rpm | 75 kB 00:00

Total 2.4 MB/s | 155 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : php-pdo-5.3.3-22.el6.x86_64 1/2 Installing : php-mysql-5.3.3-22.el6.x86_64 2/2 Verifying : php-pdo-5.3.3-22.el6.x86_64 1/2 Verifying : php-mysql-5.3.3-22.el6.x86_64 2/2

Installed: php-mysql.x86_64 0:5.3.3-22.el6

Dependency Installed: php-pdo.x86_64 0:5.3.3-22.el6

Complete!

とりあえず、phpに関してはこんなもんかな。

あとはWordPressのInstallに従ってdb作って、config変えてアップロードすればOK

普通にInstallしたところMemory消費量900MB超えてて保証されている1GBまで少ししかない状態。

php-fpmとMySQLのMemory使用量を減らさないといかんかも。

次回ちょっと調整してみよう。