Skip to content

Instantly share code, notes, and snippets.

@keiya
Forked from Problematic/ec2script.sh
Created April 10, 2012 22:22
Show Gist options
  • Save keiya/2355062 to your computer and use it in GitHub Desktop.
Save keiya/2355062 to your computer and use it in GitHub Desktop.
Amazon EC2 Setup Script
#!/bin/bash
# Script for quick configuration of an EC2 Server
# Installs the necessaries for most PHP Jobs
# Run as Root or suffer the consequences of stuff telling you it can't get a lock and whatnot
ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
cd /etc/yum.repos.d
wget http://rpms.famillecollet.com/enterprise/remi.repo
sed -i.bak -e '1,/remi-test/ s/#baseurl/baseurl/' -e '1,/remi-test/ s/$releasever\/remi/5\/remi/' remi.repo
cd
yum -y install httpd-devel mod_ssl php* gcc make pcre-devel git-all
pecl install apc
# auto-start apache services
/sbin/chkconfig --levels 235 httpd on
service httpd start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment