Last active
August 29, 2015 14:23
-
-
Save yu81/5ea9bc9c52c45934f3e5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
# Initialize Amazon Linux AMI 2015.03 for PHP7 Web Application | |
# yum | |
# update default | |
sudo yum upgrade --enablerepo="*" -y | |
# install php7 | |
[ ! -s remi-release-6.rpm ] && curl http://remi.kazukioishi.net/enterprise/remi-release-6.rpm > remi-release-6.rpm | |
sudo yum localinstall -y remi-release-6.rpm | |
sudo yum install scl-utils --enablerepo="*" -y | |
sudo yum install php70 php70-php php70-{runtime,scldevel} php70-php-{fpm,bcmath,cli,common,debuginfo,json,ldap,litespeed,mbstring,mcrypt,mysqlnd,odbc,opcache,pdo,pdo-dblib,pecl-{geoip,lzf,lzf-debuginfo,msgpack,uuid,uuid-debuginfo,xattr,xattr-debuginfo,xmldiff},pgsql,process,pspell,snmp,soap,tidy,zip} --enablerepo="*" -y | |
# install others | |
sudo yum install nginx --enablerepo="*" -y | |
sudo yum install git --enablerepo="*" -y | |
sudo yum install redis --enablerepo="*" -y | |
sudo yum install perl python golang gawk ghc bash zsh sed wget s3cmd rsync htop dstat memcached numpy scipy pypy spawn-fcgi npm --enablerepo="*" -y | |
# New Relic | |
[ ! -s newrelic-repo-5-3.noarch.rpm ] && curl 'http://download.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm' > newrelic-repo-5-3.noarch.rpm | |
sudo yum localinstall newrelic-repo-5-3.noarch.rpm -y | |
sudo yum install newrelic-sysmond -y | |
sudo nrsysmond-config --set license_key=LICENSE_KEY # LICENSE_KEY required | |
sudo /etc/init.d/newrelic-sysmond start | |
sudo chkconfig newrelic-sysmond on | |
sudo yum install newrelic-php5 -y | |
sudo newrelic-install install | |
# Additional manual configration required for New Relic. | |
# See below. | |
# https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-redhat-centos | |
# https://docs.newrelic.com/docs/agents/php-agent/advanced-installation/php-agent-installation-non-standard-php-advanced | |
# FuelPHP | |
curl get.fuelphp.com/oil | sh | |
# TODO : configuration of nginx,php-fpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment