magento2自动安装脚本

magento2自动安装脚本(根据自己的情况修改参数

#!/usr/bin/env bash

DB_NAME='magento2_dev'
DB_HOST='192.168.1.121'
DB_USER='root'
DB_PASSWORD='123456!=abcde'
DOMAIN='http://dev.abc.com'
LOCALE='zh_Hans_CN'
TIMEZONE='Asia/Shanghai'
CURRENCY='CNY'
ADMIN_URL='admin_'
ADMIN_FORENAME='admin'
ADMIN_SURNAME='admin'
ADMIN_NAME='admin'
ADMIN_EMAIL='[email protected]'
ADMIN_PASSWORD='123456!=abcde'

CURRENT=`pwd`
PHP_PATH=`which php`
BASENAME=`basename "$CURRENT"`

install_magento(){
    $PHP_PATH bin/magento setup:install --base-url=$DOMAIN/ \
    --db-host=$DB_HOST \
    --db-name=$DB_NAME \
    --db-user=$DB_USER \
    --db-password=$DB_PASSWORD \
    --language=$LOCALE \
    --timezone=$TIMEZONE \
    --currency=$CURRENCY \
    --backend-frontname=$ADMIN_URL \
    --admin-firstname=$ADMIN_FORENAME \
    --admin-lastname=$ADMIN_SURNAME \
    --admin-email=$ADMIN_EMAIL \
    --admin-user=$ADMIN_NAME \
    --session-save=db \
    --admin-password=$ADMIN_PASSWORD

}
install_magento

你可能感兴趣的:(magetno2)