Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
OrganizationEventAdvent CalendarQiitadon (β)
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

Amazon Linux に PHP7(remi)を入れる手順メモ

環境 t2.micro

cat /proc/version
Linux version 4.4.8-20.46.amzn1.x86_64 (mockbuild@gobi-build-60009) 


/etc/yum.repos.d/epel.repo は最初から入っていたので

  • Remi リポジトリを入れます。
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

  • epelからlibwebp を入れます。

gd-last が libwebpを必要としてますが、amzn-main.repo のはversionが合わない。

yum -y install libwebp --disablerepo=amzn-main --enablerepo=epel

  • amzn-mainから必要なライブラリ郡を入れます。
yum -y install libmcrypt libtool-ltdl libtidy libXpm libtiff gd-last autoconf automake

  • Remi70からPHP7を入れます。
yum -y install --disablerepo=amzn-main --enablerepo=remi-php70 php php-opcache php-devel php-mbstring php-mcrypt php-phpseclib-crypt-blowfish php-pecl-apc php-gd php-mysqlnd php-xml

※追記 AWS SDK for PHP 3.x の Aws\S3\Transfer::transfer で php-xmlが必要。

# php -v
PHP 7.0.7 (cli) (built: May 25 2016 18:36:46) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies


Amazon Linuxで nginx + php7 環境構築

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Help us understand the problem. What are the problem?