All Projects → MagePsycho → magento2-installer-bash-script

MagePsycho / magento2-installer-bash-script

Licence: other
Simplistic Magento 2 Installer Bash Script

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to magento2-installer-bash-script

Chocolater
Chocolater is simply a PowerShell code generator and it was conceived in order to facilitate the selection and installation of your favorite applications in one go.
Stars: ✭ 26 (-31.58%)
Mutual labels:  installer, install-script, installer-script
Bpkg
Lightweight bash package manager
Stars: ✭ 1,601 (+4113.16%)
Mutual labels:  installer, bash-script, installer-script
nginx-virtual-host-bash-script
Nginx Virtual Host Bash Script
Stars: ✭ 35 (-7.89%)
Mutual labels:  magento, magento2, bash-script
termux-arch
You can use setupTermuxArch.sh 📲 to install Arch Linux in Termux on Android and Chrome. This setup script will attempt to set Arch Linux up in your Termux environment.
Stars: ✭ 25 (-34.21%)
Mutual labels:  installer, bash-script
Magento-2-aws-cluster-terraform
Magento 2 AWS autoscaling cluster with Terraform and Packer or ImageBuilder. Adobe Commerce Cloud alternative. The best ecommerce infrastructure. Drive more sales online. Transparent billing. Developer-friendly. No hidden bottlenecks.
Stars: ✭ 107 (+181.58%)
Mutual labels:  magento, magento2
installer-scripts
💻 Bash scripts for doing installations in one go.
Stars: ✭ 17 (-55.26%)
Mutual labels:  installer, bash-script
terraform-installer
Installer for HashiCorp Terraform - Automatic Download, Extract and Install of Latest or Specific Version
Stars: ✭ 74 (+94.74%)
Mutual labels:  installer, bash-script
nginx-installer
Bash script designed to ease the process of compiling nginx with multiple patches and modules manually.
Stars: ✭ 28 (-26.32%)
Mutual labels:  installer, bash-script
Fedora-KDE-Minimal-Install-Guide
Guide to install KDE Plasma desktop environment on a minimal Fedora installation
Stars: ✭ 125 (+228.95%)
Mutual labels:  installer, install-script
Termuxarch
You can use setupTermuxArch.bash 📲 to install Arch Linux in Amazon, Android, Chromebook and Windows. https://sdrausty.github.io/TermuxArch/docs/install
Stars: ✭ 653 (+1618.42%)
Mutual labels:  installer, bash-script
NSIS-UI-Plugin
Create NSIS Modern UI Setup by Using Thirdparty UI Library(such as Qt, DuiLib)
Stars: ✭ 55 (+44.74%)
Mutual labels:  installer, installer-script
magento2
For any issues or questions please get in touch with us via [email protected]
Stars: ✭ 15 (-60.53%)
Mutual labels:  magento, magento2
module-blog-m22
Fixes for Blog on Magento 2.2.x
Stars: ✭ 21 (-44.74%)
Mutual labels:  magento, magento2
Magento 2 Smtp
Magento 2 SMTP Extension helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers.
Stars: ✭ 228 (+500%)
Mutual labels:  magento, magento2
magento2-guest-to-customer
Guest to Customer for Magento2 - Quickly and easily convert existing guest checkout customers to registered customers.
Stars: ✭ 66 (+73.68%)
Mutual labels:  magento, magento2
Module Blog
Magento 2 Blog Extension
Stars: ✭ 213 (+460.53%)
Mutual labels:  magento, magento2
Warden
Warden is a CLI utility for orchestrating Docker based developer environments
Stars: ✭ 206 (+442.11%)
Mutual labels:  magento, magento2
Docker Compose Development
Clone and `bin/dev up`. Quickly start of developing locally with Nginx, PHP, Blackfire, Percona, Mailhog and Redis. Out of the box support for Magento2 Developer Box
Stars: ✭ 171 (+350%)
Mutual labels:  magento, magento2
Mage2vuestorefront
Magento to Vue-storefront datapump - synchronizes Products, Categories and Product-to-category links between your Magento2 API and NoSQL database of vue-storefront
Stars: ✭ 183 (+381.58%)
Mutual labels:  magento, magento2
zarch
The Ultimate Script For Arch Linux
Stars: ✭ 49 (+28.95%)
Mutual labels:  installer, bash-script

Simplistic Magento 2 Installer

This bash script helps you to quickly install Magento2 from different sources (tar, composer etc.) with sample data for development purpose.

INSTALL

You can simply download the script file and give the executable permission.

curl -0 https://raw.githubusercontent.com/MagePsycho/magento2-installer-bash-script/master/src/m2-installer.sh -o m2-installer.sh
chmod +x m2-installer.sh

To make it a system-wide command (preferred)

sudo mv m2-installer.sh /usr/local/bin/m2-installer

OR

mv m2-installer.sh ~/bin/m2-installer

Make sure your $HOME/bin folder is in executable path

USAGE

To display help

m2-installer --help

Magento 2 Installer Help

To install Magento CE v2.4.3 (with sample data)

m2-installer --version=2.4.3 --base-url=magento243.test --install-sample-data --db-user=root --db-pass=pass --db-name=magento243
  • --install-sample-data option is required to install the sample data.

If you want to install via composer, you can simply use --source=composer option:

m2-installer --source=composer --version=2.4.3 --base-url=magento243.test --install-sample-data --db-user=root --db-pass=pass --db-name=magento243

If --source option is not passed, default tar source is used for downloading.

Notes
Since elasticsearch is the default search engine since v2.4.0 onwards. Make sure to install it prior to M2 installation

You can explicitly pass elasticsearch params as

  • --search-engine (default: elasticsearch7)
  • --elasticsearch-host (default: 127.0.0.1)
  • --elasticsearch-port (default: 9200)
  • --elasticsearch-index (default: magento2)

Usage example:

m2-installer --version=2.4.3 --base-url=magento243.test --db-user=root --db-pass=pass --db-name=magento243 --search-engine=elasticsearch7 --elasticsearch-host=127.0.0.1

To install Magento CE 2.4.3 (without sample data)

m2-installer --version=2.4.3 --base-url=magento243.test --db-user=root --db-pass=pass --db-name=magento243

To install Magento with Redis Caching

If you want to use redis as session storage, frontend and full-page caching, you have to use the following params:

  • --use-redis-cache (required)
  • --redis-host (optional, default: 127.0.0.1)
  • --redis-port (optional, default: 6379)

Usage example:

m2-installer --version=2.4.3 --base-url=magento243.test --db-user=root --db-pass=pass --db-name=magento243 --use-redis-cache
m2-installer --version=2.4.3 --base-url=magento243.test --db-user=root --db-pass=pass --db-name=magento243 --use-redis-cache --redis-host=127.0.0.1 --redis-port=6379

Use of --force option

Use --force option, if you want to

  • Skip the installation wizard/confirmation
  • Clean up the directory prior installation

Usage example:

m2-installer --version=2.4.3 --base-url=magento243.test --db-user=root --db-pass=pass --db-name=magento243 --force

Use of config files

If you repeatedly install Magento on your development machine, it is recommended to use the config file in one of the following locations:

  1. ~/.m2-installer.conf - $HOME directory (global scope)
  2. ./.m2-installer.conf - project directory (local/project scope)

You can copy the sample config provided in the repo .m2-installer.conf.dist to the desired location

cp .m2-installer.conf.dist ~/.m2-installer.conf
# OR
cp .m2-installer.conf.dist ./.m2-installer.conf

And edit .m2-installer.conf config file as

# Web Settings
USE_SECURE=1
LANGUAGE='en_US'
CURRENCY='USD'
TIMEZONE='America/Chicago'

# Storage Settings
SESSION_SAVE='files'
# Use 'redis' for Redis caching
CACHING_TYPE=

# Admin Settings
BACKEND_FRONTNAME="backend"
ADMIN_FIRSTNAME='John'
ADMIN_LASTNAME='Doe'
ADMIN_EMAIL='[email protected]'
ADMIN_USER='admin'
ADMIN_PASSWORD=$(genRandomPassword)

# DB Settings
DB_HOST=localhost
DB_USER=root
DB_PASS=root

# Elasticsearch
SEARCH_ENGINE='elasticsearch7'
ELASTICSEARCH_HOST='127.0.0.1'
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_INDEX_PREFIX='magento2'

# Redis
REDIS_HOST='127.0.0.1'
REDIS_PORT=6379

To update the script

m2-installer --self-update

Note: This option will only work for version > 0.1.2

BONUS 1

You can use this script to quickly install the Magento in your beloved warden environment

cd /path/to/warden/m2/project
warden shell

After login to the container, you can download the script (as mentioned above) and install Magento as

# With sample data
m2-installer --version=2.4.3 --install-sample-data --use-secure --base-url=app.<project>.test --db-host=<project>_db_1 --db-user=magento --db-pass=magento --db-name=magento --elasticsearch-host=<project>_elasticsearch_1 --use-redis-cache --redis-host=<project>_redis_1 --force

# Without sample data
m2-installer --version=2.4.3 --use-secure --base-url=app.<project>.test --db-host=<project>_db_1 --db-user=magento --db-pass=magento --db-name=magento --elasticsearch-host=<project>_elasticsearch_1 --use-redis-cache --redis-host=<project>_redis_1 --force

BONUS 2

After installation, you can create virtual host with this FREE bash script - https://github.com/MagePsycho/nginx-virtual-host-bash-script

sudo vhost-nginx --domain=magento243.test --app=magento2

RoadMap

  • Support of installation parameters via config files (~/.m2-installer.conf or ./.m2-installer.conf)
  • Support multiple compression types (.gz, .zip, .tar.bz2)
  • Option to install Magento 2 Enterprise Edition
  • Option to install via composer
  • Option to install via git clone
  • Option to check system readiness (PHP & it's extensions, MySQL, Nginx/Apache)
  • Option to create virtual host (nginx)
  • Option to create crontab settings
  • Option to migrate with local codebase + database
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].