6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS/EC2 に、HHVM・MySQL・PHP5.5・Redis・Nginxをインストール

Posted at

概要

AWSでLaravel+HHVMのDevサーバー作る手順
HHVMのチューニング方法が現在よくわからないが、特にチューンしなくても
Laravel+fastCGIに比べると2倍ほどレスポンス速度が向上した。
そして何より、CPU利用効率が最高に良かった。

remi取ってくる

sudo yum update
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

nginxインストール

sudo yum install -y nginx
sudo mkdir /var/cache/nginx

redisインストール

sudo yum --enablerepo=remi install -y redis

Mysqlインストール

sudo groupadd mysql
sudo adduser -g mysql -d /usr/local/var mysql
sudo yum install -y 'perl(Data::Dumper)'
wget -q http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-client-5.6.20-1.el6.x86_64.rpm http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-compat-5.6.20-1.el6.x86_64.rpm http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-server-5.6.20-1.el6.x86_64.rpm http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-devel-5.6.20-1.el6.x86_64.rpm http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-5.6.20-1.el6.x86_64.rpm

sudo yum install -y MySQL-{client,devel,server,shared-compat}-5.6.20-1.el6.x86_64.rpm

sudo yum install -y MySQL-shared-5.6.20-1.el6.x86_64.rpm

HHVMインストール

cd /etc/yum.repos.d
sudo wget http://www.hop5.in/yum/el6/hop5.repo
sudo sh -c "echo 'priority=9' >> hop5.repo"
sudo sh -c "echo 'includepkgs=glog,tbb' >> hop5.repo"
sudo wget http://yum.sexydev.com/sexydev-amazon.repo
sudo yum install -y hhvm

php5.5インストール

sudo yum install -y php55 php55-devel php55-fpm php55-mbstring php55-mcrypt php55-mysqlnd php55-opcache php55-pdo uuid-php55 php55-bcmath

composerインストール

sudo curl -sS https://getcomposer.org/installer | php
sudo chmod 777 composer.phar
sudo mv composer.phar /usr/local/bin/composer

HHVMをfastCGIモードでデーモン起動

hhvm --mode daemon --config /etc/hhvm/server.ini

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?