Last active
March 7, 2020 06:59
-
-
Save iamdylanngo/cf32a5c05a0396b6efffadf5e9426ba5 to your computer and use it in GitHub Desktop.
install magento2.x, nginx, mariadb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create database and grant permission | |
CREATE DATABASE m234; | |
CREATE USER 'm234'@'localhost' IDENTIFIED BY '123456'; | |
GRANT ALL ON m234.* to 'm234'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; | |
EXIT; | |
// Install magento with command | |
bin/magento setup:install \ | |
--backend-frontname=admin \ | |
--db-host=localhost \ | |
--db-name=m234 \ | |
--db-user=m234 \ | |
--db-password=123456AA \ | |
--base-url=http://m234.local/ \ | |
--admin-firstname=Admin \ | |
--admin-lastname=Admin \ | |
[email protected] \ | |
--admin-user=admin \ | |
--admin-password=123456 \ | |
--language=en_US \ | |
--currency=USD \ | |
--timezone=America/New_York \ | |
--use-rewrites=1 | |
// Fix permission | |
sudo find -type f -exec chmod 640 {} \; && sudo find -type d -exec chmod 750 {} \; | |
// Fix own | |
sudo adduser www-data $USER | |
// Change session: Save files to DB | |
app/etc/env.php | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment