Does there exist Amazon EC2 AMI preconfigured with PHP4? - amazon-ec2

I'm having a very difficult time setting up a PHP4 LAMP stack on an EC2 instance. Does anyone know of any pre-configured AMI which supports PHP4?
For the record, I do not have the option to develop in PHP5

Getting a php LAMP stack running on EC2 is rather painless, and you don't need a custom AMI. Using a standard Amazon Linux instance, log in as ec2-user and run these commands:
sudo yum update -y
sudo yum install -y mysql-server mysql-client mysql-libs mysql-devel
sudo yum install -y httpd php
Amazon does a good job of curating the packages in their yum repository, which is auto-configured with Amazon Linux. If you want to upgrade to php 5.4.8 simply execute this command instead:
sudo yum install -y php54
EDIT: Sorry, the php package is actually version 5.3.8, so if you really want to install php4, your best bet is to build it from source. It will likely be tough to support it ongoing. You'll likely need at least these standard packages installed to build it:
sudo yum install -y gcc gcc-c++ make zlib zlib-devel
sudo yum install -y openssl openssl-devel readline readline-devel
sudo yum install -y libxml2 libxml2-devel libxslt libxslt-devel

Related

How to install GTK3 and Firefox on Amazon Linux (EC2) instance?

I'm trying to install the firefox on amazon linux (ec2) instance.. but this seems very difficult as gtk3 cannot be installed directly via yum.
I've seen some articles here. but not very helpful.
Thanks,
Considering its an amazon-linux-2 (you can check with--> cat /etc/os-release)
Install Dependencies for Firefox->
sudo yum install -y gtk3
sudo yum install -y libdbusmenu
sudo yum install -y libdbusmenu-jsonloader
Installing FireFox:
cd /opt
sudo wget
https://download-installer.cdn.mozilla.net/pub/firefox/releases/93.0/linux-x86_64/en-US/firefox-93.0.tar.bz2
sudo tar xfj firefox-93.0.tar.bz2
firefox --version
sudo ln -s /opt/firefox/firefox /usr/bin/firefox

Installing moreutils on EC2 instance

How do I install moreutils on the default image Amazon EC2 instance? The instances are built off of CentOS but presumably have their own packages repo since
sudo yum install moreutils
fails with
No package moreutils available.
What is the yum repo I need to install moreutils?
The epel repo is on the default Amazon server but in not enabled by default. You can use it as follows:
sudo yum --enablerepo epel install moreutils
Note that epel has a very old version of moreutils (0.40 when 0.61 is out), which does not include chronic.
For update amazon linux, you can run following commands
sudo amazon-linux-extras install epel
sudo yum install moreutils
The EPEL repository has it, and other things. It works with Amazon Linux as well as CentOS, Fedora etc. (see http://fedoraproject.org/wiki/EPEL). To install the config that enables that repo, yum install epel-release.

Cannot install inotify on Amazon EC2

I have an AWS EC2 instance and wants to install inotify-tools. I've added the repository by executing the command: rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm then execute yum install inotify-tools but getting No package inotify-tools available.
Please help
I bumped into this issue as well. The solution below is a bit easier than grabbing an RPM or the source and compiling.
The Amazon Linux AMI comes with the EPEL repository source, but it's disabled. So you need to enable it.
Original Amazon Linux (1) AMI:
sudo yum-config-manager --enable epel
Amazon Linux 2 AMI:
sudo amazon-linux-extras install epel -y
Then run a regular yum update and install the toolset:
sudo yum update
sudo yum install inotify-tools
How do I enable the EPEL repository for my Amazon EC2 instance running CentOS, RHEL, or Amazon Linux?
Install and enable the EPEL rpm package on RHEL 7 and Amazon Linux 2
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo amazon-linux-extras install epel
sudo yum install inotify-tools
For me, none of the above answers worked. I had to install epel-release and then install inotify-tools

how to start scrapyd server on EC2 instance

I have setup an instance on aws. Now I want to start scrapyd on a particular port. according to documentation
aptitude install scrapyd-X.YY
but aptitude is not found. I have tried to installing aptitude using yum but there is no match found (may be it only works with apt-get, but I have yum ap-get is also missing)
can any one please help me that is there any other way to do this ??
If you first install pip:
sudo yum install python-pip
you can use pip to install scrapyd like so
pip install scrapyd
source: http://scrapyd.readthedocs.org/en/latest/install.html
You are using an yum based OS, not an apt based OS. Forget any commands that involve apt or a variation thereof.
Skip the steps you've already done:
yum install python
yum install python-pip
yum install libxml2-python
pip install Scrapy
As for libxml2-python, keep in mind that "versions prior to 2.6.28 are known to have problems parsing certain malformed HTML, and have also been reported to contain leaks, so 2.6.28 or above is highly recommended"

How do I install byobu in ec2 ami

I know it was possible usint a package manager since i did it once a time ago. But now if I try
sudo yum install byobu
it just fails ...
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror, priorities, security, update-motd
Loading mirror speeds from cached hostfile
* amzn-main: packages.us-east-1.amazonaws.com
* amzn-updates: packages.us-east-1.amazonaws.com
amzn-main
amzn-updates
Setting up Install Process
No package byobu available.
Error: Nothing to do
Not sure why, but the EPEL repo is installed, but disabled by default. You can enable it permanently by changing the setting "enabled=1" in the [epel] stanza of /etc/yum.repos.d/epel.repo
Or you can leave it disabled and still install byobu:
sudo yum install --enablerepo=epel byobu
You can have a look at what packages are available in the epel repo with:
sudo yum list --disablerepo=\* --enablerepo=epel
For Amazon Linux 2:
You would need to install the EPEL release package for EL7 based AMI and enable the EPEL repository.
You may execute below: ⤵︎
sudo amazon-linux-extras install epel # Install epel from Amazon's Linux Extras
sudo yum-config-manager --enable epel # Enable EPEL repo in case disabled
sudo yum install byobu -y # Install byobu
byobu -v # Verify Version
Here is the alternative source just in case Linux Extras don't work for you.
# (optional) Install EPEL repository from Fedora
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Reference: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/
Tested On
Name: Amazon Linux 2 AMI (HVM), SSD Volume Type - ami-0323c3dd2da7fb37d (64-bit x86) / ami-0ce2e5b7d27317779 (64-bit Arm)
The error message indicates that the package byobu is not available in the amzn-main repository.
You can manually install it from another repository
cd ~
wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/5/x86_64/byobu-3.4-2.el5.noarch.rpm
sudo yum install byobu-3.4-2.el5.noarch.rpm
Maybe someone needs a new link for
byobu
So you can install it by
wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/7/x86_64/b/byobu-5.73-4.el7.noarch.rpm
sudo yum install byobu-5.73-4.el7.noarch.rpm

Resources