composer installation on aws ec2 instance ami ubuntu 18.04
Introduction:
Composer is not a package manager like yum/apt, it is a tool for dependency management in php. It allows to declare the libraries that your project depends on and it will manage 'install/update' the libraries for your project. Now you are thinking that it's not dealing with packages? yes it deals with 'packages' and 'libraries' and it manages all packages and libraries per project basis, installing them into a directory (as for vendor) inside your project. Actually it doesn't install anything globally that's why it is a dependency manager.
Tech Details:
aws ec2, amazon machine image ubuntu 18.04, Nginx(1.14), php(7.3).
Requirement:
1. aws account access
2. running ec2 instance
3. accessing the ec2 instance, if can't access please visit blogspot or medium
4. nginx installation, if not installed please visit blogspot or medium
5. php installed. if not, to follow the tutorial visit blogspot or medium
Step1: install 'unzip' and 'git' package, they are needed to install composer
Composer is not a package manager like yum/apt, it is a tool for dependency management in php. It allows to declare the libraries that your project depends on and it will manage 'install/update' the libraries for your project. Now you are thinking that it's not dealing with packages? yes it deals with 'packages' and 'libraries' and it manages all packages and libraries per project basis, installing them into a directory (as for vendor) inside your project. Actually it doesn't install anything globally that's why it is a dependency manager.
Tech Details:
aws ec2, amazon machine image ubuntu 18.04, Nginx(1.14), php(7.3).
Requirement:
1. aws account access
2. running ec2 instance
3. accessing the ec2 instance, if can't access please visit blogspot or medium
4. nginx installation, if not installed please visit blogspot or medium
5. php installed. if not, to follow the tutorial visit blogspot or medium
Step1: install 'unzip' and 'git' package, they are needed to install composer
$ sudo apt updateStep2: go to the following url https://getcomposer.org/download/ and execute the following command
$ sudo apt install unzip
$ sudo apt install git
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"$ php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"$ sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer$ php -r "unlink('composer-setup.php');"
Step3: execute the command composer
$ composer
BOOOOOOOOOMMMMMMEEEEEDDDDDDDDDDDDD .......................
Comments
Post a Comment