dqpkea9486 2010-11-04 17:13
浏览 34

好的EC2图像与memcache和PHP

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.

  • 写回答

1条回答 默认 最新

  • dtkjthe4025 2011-05-11 06:27
    关注

    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

    评论

报告相同问题?

悬赏问题

  • ¥15 求视频摘要youtube和ovp数据集
  • ¥15 怎么改成输入一个要删除的数后现实剩余的数再输入一个删除的数再现实剩余的数用yes表示继续no结束程序
  • ¥15 在启动roslaunch时出现如下问题
  • ¥15 汇编语言实现加减法计算器的功能
  • ¥20 关于多单片机模块化的一些问题
  • ¥30 seata使用出现报错,其他服务找不到seata
  • ¥35 引用csv数据文件(4列1800行),通过高斯-赛德尔法拟合曲线,在选取(每五十点取1点)数据,求该数据点的曲率中心。
  • ¥20 程序只发送0X01,串口助手显示不正确,配置看了没有问题115200-8-1-no,如何解决?
  • ¥15 Google speech command 数据集获取
  • ¥15 vue3+element-plus页面崩溃