使用配置文件在Amazon Elastic Beanstalk上安装Postgis

时间:2014-02-11 23:26:58

标签: linux amazon-web-services amazon-ec2 postgis geodjango

我正在尝试在我的beanstalk实例上安装postigs,但我找不到工作方法。 我的第一个,是通过apt软件包安装它,但我意识到它们不受EBS EC2 Linux实例的支持,所以我尝试了结合wget + install,但这种情况下的问题是我得到了超时错误,因为命令执行起来很慢...... 所以我尝试使用适当的配置下载源代码并仅使用shell命令来构建它们......但我仍然遇到超时异常。 我的最新配置是:

packages:
  yum:
    python-devel: []
    libpcap: []
    libpcap-devel: []
    libnet: []
    libnet-devel: []
    pcre: []
    pcre-devel: []
    gcc: []
    gcc-c++: []
    automake: []
    autoconf: []
    libtool: []
    make: []
    libyaml: []
    libyaml-devel: []
    libxml2: []
    libxml2-devel: []
    zlib: []
    zlib-devel: []
    file-devel: []
    postgresql: []
    postgresql-devel: []
    postgresql-contrib: []
    geoip: []
    geoip-devel: []
    graphviz: []
    graphviz-devel: []
    binutils: []

sources:
  /home/ec2-user: http://download.osgeo.org/proj/proj-4.8.0.zip
  /home/ec2-user: http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
  /home/ec2-user: http://download.osgeo.org/gdal/1.10.1/gdal1101.zip
  /home/ec2-user: http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz

commands:
  01_enable_root_access:
    command: test -e sudo-patched.txt || echo Defaults:root \!requiretty >> /etc/sudoers && echo 'yes' > sudo-patched.txt
  02_install_proj:
    cwd: /home/ec2-user/proj-4.8.0
    command: test -e proj-check.txt || ./configure && make && sudo make install && echo 'ok' > proj-check.txt
  03_install_geos:
    cwd: /home/ec2-user/geos-3.4.2
    command: test -e geos-check.txt || ./configure && make && sudo make install && echo 'ok' > geos-check.txt
  04_install_gdal:
    cwd: /home/ec2-user/gdal-1.10.1
    command: test -e gdal-check.txt || ./configure --with-python=yes && make && sudo make install && echo 'ok' > gdal-check.txt
  05_install_postgis:
    cwd: /home/ec2-user/postgis-2.1.1
    command: test -e postgis-check.txt || ./configure && make && sudo make install && echo 'ok' > postgis-check.txt

我迷路了...我花了3天时间没事......而且我被困住了,我的项目基于GeoDjango,我必须找到一种方法来安装它的依赖项。有没有办法在EBS实例上拥有这些库而无需创建自定义AMI? (我不喜欢自定义AMI的想法,因为我会放弃EBS更新和“自动化”的好处) (我正在使用Linux 64bit和python 2.7的微型实例)

0 个答案:

没有答案