cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a shell script to install Magento 2.3 and it's dependencies (Apache, PHP, MySQL)?

Highlighted

Is there a shell script to install Magento 2.3 and it's dependencies (Apache, PHP, MySQL)?

Installing and setting up Magento is complex and sometimes frustrating (at least for beginners). One of the main issue is the specific versions, modules and configs that are required of Apache, PHP and MySQL.

 

The only i could find is https://bitnami.com/stack/magento/installer but having issues with this as well on Linux VM's. Some lib files missing, php configs missing, apache not running (these can be issues to Bitnami dev/community).

 

A script like this https://github.com/teddysun/lamp/blob/master/lamp.sh (with Magento), this way we can control and fix what is installed.

 

Is there any such for Magento?

2 REPLIES 2
Highlighted

Re: Is there a shell script to install Magento 2.3 and it's dependencies (Apache, PHP, MySQL)?

@surenkonathala 

Steps for install and setup Magento 2 using CLI:

1. Setup on server or local :

(a)Magento Open Source
$composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition /var/www/html/testing-magento2

(b)Magento Commerce
$composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition <install-directory-name>

2. Set file permissions:

cd /var/www/html/<magento install directory>
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R :www-data . # Ubuntu
chmod u+x bin/magento


3. Command line:

$php bin/magento setup:install \
--base-url=http://localhost/testing-magento2 \
--db-host=localhost \
--db-name=testing-magento2 \
--db-user=root \
--db-password=root \
--admin-firstname=admin \
--admin-lastname=admin \
--admin-email=admin@admin.com \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1

NOTE: Please set your folder name, db name according to your requirement.

Homepage_magento2.pngsetup_magento2.png

Highlighted

Re: Is there a shell script to install Magento 2.3 and it's dependencies (Apache, PHP, MySQL)?

Thanks @Bhanu Periwal 

This may solve one part of the problem - installing Magento via command line. 

The other major part is the system/environment prep - PHP (with specific version & modules); Apache (with specific modules); MySQL (specific version).

Im planning to work on developing a script to make installation simpler.