1

I'm planning to use the following setup on EC2: PHP (recent version) plus memcached on an ec2 instance, and using Amazon's RDS service for the MySQL database.

Is there a recommended instance that has PHP and Memcached installed with the most often used php extensions? I am not much of a sysadmin and would prefer one that is already configured.

PeterV
  • 2,792
  • 3
  • 20
  • 22
  • 1
    This isn't the forum for a question like this try http://serverfault.com/ – GWW Nov 04 '10 at 17:15
  • 1
    I know you probably don't want to hear it, but AWS requires a sysadmin. If you don't want to become one or can't hire one, you should get a managed server somewhere. – Till Nov 05 '10 at 11:20
  • 1
    Agreed - it's one of those things most people overlook when beginning work with EC2 - I know I did and had to cram up on linux administration to get anywhere with EC2. – Jay Sidri May 11 '11 at 06:31

1 Answers1

2

I don't know of any image that comes only with LAMP and memcached - but I setup something a while back - on a Amazon Linux AMI (which is a cut down centOS distro). You can always use this as a guide and set it up yourself (and create your own image afterwards).

DISCLAIMER: I'm doing this off memory- I might have missed a step or two here so read the error messages and figure out what is missing.

Install Apache, PHP, mySQL:

yum -y install httpd php mysql mysql-server php-mysql

Make sure this services start when you start your instances:

chkconfig httpd on
chkconfig –add mysqld
chkconfig mysqld on

Start apache and mySQL:

service httpd start
service mysqld start

Login to mysql and setup a root account. Create your DBs, setup users, remove test db etc.

Before we install memcached, you need to add EPEL repo to yum for extra centOS packages and then install some dependencies:

Create a new file /etc/yum.repos.d/epel.repo and paste:

[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=0

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 5 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=0

[epel-source]
name=Extra Packages for Enterprise Linux 5 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=0

Install dependencies:

yum groupinstall "Development Tools"
yum install openssl-devel openssl

Now try installing memcached:

yum install memcached

Hope it helps

Jay Sidri
  • 6,271
  • 3
  • 43
  • 62