Link to home
Start Free TrialLog in
Avatar of Marthaj
MarthajFlag for United States of America

asked on

Installing AWS on Ubuntu And using AWS S3 Client

I am in the process of rolling out to a Ubuntu Desktop OS from Windows 10 platform.
I use PHP 5.6 and use the AWS S3 Client. Will the AWS S3 SDK for PHP install on Ubuntu ?
If not, can you redirect to where I can understand what to do??
DO I need to change my PHP coding for it ??
Thank you in advance.   
ASKER CERTIFIED SOLUTION
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As @Jan suggested.

1) Use Ubuntu Focal (LTS version - 20.04) providing 5+ years of updates.

2) If you use Xenial (16.04), standard support has already ended, with EOL in 2ish years.

3) Use latest LAMP Stack, today's latest stable versions...

Apache-2.4.48.1
MariaDB-10.5.10
PHP-7.4.20.1
OpenSSL-1.1.1f

Open in new window


Otherwise... running old Linux + Apache + PHP == Hacker's Paradise.
AWS S3 SDK for PHP will work fine on Ubuntu.  Latest Ubuntu comes with PHP 7.x, is there any reason you need PHP 5.6 ? You can always install a non-default PHP version on Ubuntu. To install PHP 5.6 on Ubuntu, you can use

wget https://raw.githubusercontent.com/serverok/server-setup/master/ubuntu/2-apache-php56-mysql.sh
chmod 755 2-apache-php56-mysql.sh
sudo ./2-apache-php56-mysql.sh

Open in new window



Avatar of Marthaj

ASKER

Thank you all for responding. It's appreciated. So can I just drag and drop my AWS folder from my Windows platform to my new location in Ubuntu ? Same with my entire project ?
I am confused about another item. AS I understand it, Apache must also be installed ?
I checked via terminal window for the installation of Apache and received:
sudo apachectl status apache 

Open in new window

And received: sudo apachectl command not found..
 sudo apachectl command not found.... 

Open in new window

I need to install PHP 5.6, curl and all related libraries etc because it matches most of what my clients are using.
And I need to make sure that PHP 5.6 will always be the default version to exceute.
You can install apache with command

sudo apt install apache2

Open in new window


> And I need to make sure that PHP 5.6 will always be the default version to execute

Following commands will install PHP 5.6

sudo add-apt-repository ppa:ondrej/php
sudo apt -y upgrade
sudo apt -y install php5.6-bcmath php5.6-bz2 php5.6-cgi php5.6-cli php5.6-common php5.6-curl php5.6-dba php5.6-dev php5.6-enchant php5.6-gd php5.6-gmp php5.6-imap php5.6-intl php5.6-json php5.6-mbstring php5.6-mysql php5.6-opcache php5.6-pgsql php5.6-pspell php5.6-readline php5.6-soap php5.6-sqlite3 php5.6-sybase php5.6-tidy php5.6-xml php5.6-xmlrpc php5.6-zip php5.6-xsl php5.6-mcrypt
sudo apt -y install libapache2-mod-php5.6.

Open in new window


To change the default PHP version for CLI, run

sudo  sudo update-alternatives --config php

Open in new window


To change apache PHP version, first disable whatever PHP version you are using (find it using phpinfo)

sudo a2dismod php7.x

Open in new window


To enable PHP 5.6 on apache, run

sudo a2enmod php5.6

Open in new window


Avatar of Marthaj

ASKER

Thank you all for responding. It is appreciated. I can move forward. Newbie to Ubuntu 20 but boy is it ever slick !!
And my client has decided to upgrade to PHP 7 - and am I ever glad too !  :)