Adobe Commerce - Developer Install of Magento in a WSL Ubuntu Shell on Windows


Install Options

Two ways to install Magento locally....

1) Warden Method: Refer to the documentation - https://docs.warden.dev/environments/magento2.html

2) WSL Docker Image: The following post is a condensed version of https://github.com/markshust/docker-magento to install Magento on Windows. A good tutorial - https://courses.m.academy/courses/set-up-magento-2-development-environment-docker/lectures/9205849


Instructions

1) Before starting, Disconnect from any VPN, so you are able to download necessary sources...

2) Install Docker Desktop

3) Open Windows Terminal and Install Ubuntu on WSL. Unix user account used: nalabotu / nalabotu


    > wsl --install -d Ubuntu
   


4) Grab your Access Keys. Go to https://commercemarketplace.adobe.com/customer/account/, Sign-In with AdobeID and get your Public and Private keys. Keys look like, Public Key: bcfbxxxxxxxxxxxxf2745, Private Key: 1xxxxxxxxxxxxxxxxx7


5) Open Ubuntu Terminal in Windows. You'll start in /home/nalabotu


      > mkdir eaem-commerce && cd eaem-commerce

      > curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento.test community 2.4.8-p5
     


6) If it doesn't prompt for Access Keys (or you're retrying the install). Manually add your public/private keys to /home/nalabotu/.composer/auth.json. Get them from https://commercemarketplace.adobe.com/customer/accessKeys/


7)  If you hit this error after install. OCI runtime exec failed: exec failed: unable to start container process: exec: "bin/magento": stat bin/magento: no such file or directory, check https://github.com/markshust/docker-magento#install-fails-because-project-directory-is-not-empty. Run the following commands to start over (or if install fails for any reason, go back and check there could be a documentation link to resolve it)


      > /home/nalabotu/eaem-commerce/bin/removeall

      > rm -rf eaem-commerce



8) When prompted for a system password to update hosts file, it is asking for your Linux/WSL password, not your Windows password. Even with the right password, it can't actually update the Windows hosts file from within WSL, so instead, manually edit C:\Windows\System32\drivers\etc\hosts and add:


    127.0.0.1 ::1 magento.test


9) After install, Disable 2FA. From /home/nalabotu/eaem-commerce,


      > bin/magento module:disable Magento_TwoFactorAuth Magento_AdminAdobeImsTwoFactorAuth

      > bin/magento security:recaptcha:disable-for-user-forgot-password


10) Install sample data. From /home/nalabotu/eaem-commerce:


    > bin/magento sampledata:deploy

    > bin/magento setup:upgrade

    > bin/magento setup:static-content:deploy -f

    > bin/magento cache:clean


11) Use bin/start, bin/stopall to start/stop Magento Instance. You should now be able to login Admin Panel (https://magento.test/admin john.smith/password123 ) and see...



12) Sample site https://magento.test/



No comments:

Post a Comment