Last active
October 18, 2016 13:14
-
-
Save yamagucci/d15e3dff01908236cde9258a79299ad3 to your computer and use it in GitHub Desktop.
【保存版】EC2(Amazon Linux)の環境構築でphp5.6を正しくインストールする手順 ref: http://qiita.com/yamaguchi_takashi/items/d4b7b2693b42679dc3ae
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum -y remove httpd* | |
$ sudo yum -y remove php-* | |
$ sudo yum clean all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum -y update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
$ sudo sed -i -e "s/enabled = 1/enabled = 0/g" /etc/yum.repos.d/remi.repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum -y update --enablerepo=epel,remi,remi-php56 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum -y install --disablerepo=amzn-main --enablerepo=epel libwebp | |
$ sudo yum -y install libmcrypt libtool-ltdl libtidy libXpm libtiff gd-last autoconf automake | |
$ sudo yum -y install --enablerepo=remi,remi-php56 t1lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum -y install httpd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum -y install --disablerepo=amzn-main --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysql php-phpunit-PHPUnit php-pecl-xdebug php-cli php-common php-pecl-redis php-gd php-fpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo sed -i -e 's/;default_charset = "iso-8859-1"/default_charset = "UTF-8"/g' /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.language = Japanese/mbstring.language = Japanese /g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.internal_encoding = EUC-JP/mbstring.internal_encoding = UTF-8/g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.http_input = auto/mbstring.http_input = pass/g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.http_output = SJIS/mbstring.http_output = pass/g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.http_input = auto/mbstring.http_input = pass/g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.encoding_translation = Off/mbstring.encoding_translation = Off/g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.detect_order = auto/mbstring.detect_order = auto/g" /etc/php.ini | |
$ sudo sed -i -e "s/;date.timezone =/date.timezone = Asia\/Tokyo/g" /etc/php.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo sed -i -e 's/;default_charset = "iso-8859-1"/default_charset = "UTF-8"/g' /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.language = Japanese/mbstring.language = Japanese /g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.internal_encoding = EUC-JP/mbstring.internal_encoding = UTF-8/g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.http_input = auto/mbstring.http_input = pass/g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.http_output = SJIS/mbstring.http_output = pass/g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.http_input = auto/mbstring.http_input = pass/g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.encoding_translation = Off/mbstring.encoding_translation = Off/g" /etc/php.ini | |
$ sudo sed -i -e "s/;mbstring.detect_order = auto/mbstring.detect_order = auto/g" /etc/php.ini | |
$ sudo sed -i -e "s/;date.timezone =/date.timezone = Asia\/Tokyo/g" /etc/php.ini |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment