Installer Shopware6 via command line

Start med, at tjekke PHP versionen er 7.4 eller nyere. Det kan enten tjekkes via phcli eller blot via cli:

sw6pwa_host@phct-143:~$ php -v
PHP 7.4.21 (cli) (built: Jul 2 2021 15:33:15) ( NTS )

 

Herefter benytter vi igen phcli til at definere vores documentroot til public_html/public:

_ _ _
| | | (_)
_ __ | |__ ___| |_
| '_ \| '_ \ / __| | |
| |_) | | | | (__| | |
| .__/|_| |_|\___|_|_|
| |
|_| v. 0.6.0 (21/04/2021)

────────────────────────────────────────────
Edit document root
────────────────────────────────────────────
Edit docroot: /var/www/sw6pwa.powr.host/public_html/public/

 

Tilgå public_html og benyt de flg. kommandoer for, at initialisere git og hente filstrukturen fra det officielle github-repo:

cd public_html/
git init
git remote add origin https://github.com/shopware/production.git
git fetch origin
git checkout -b master --track origin/master

 

Stadig placeret i public_html kan vi nu starte installationen af Shopware6 med flg. kommandoer. Et par af dem vil prompte for credentials til bl.a. MySQL så ha’ dit fremsendte kodebrev klar:

composer install
bin/console system:setup
bin/console system:install --create-database --basic-setup

Herunder et eksempel på prompt:

sw6pwa_host@phct-143:~/public_html$ bin/console system:setup

Shopware setup process
======================

This tool will setup your instance.

Application information
-----------------------

Application environment [prod]:
[0] prod
[1] dev
> 1

URL to your /public folder [http://shopware.local]:
> http://sw6pwahost.swpwa.dk.powr.host

Application information
-----------------------

Blue Green Deployment [1]:
[0] 1
[1] 0
>

Generate keys and secrets
-------------------------

Database information
--------------------

Database user [app]:
> sw6pwa_host

Database password:
>

Database host [localhost]:
> 127.0.0.1

Database port [3306]:
>

Database name [shopware]:
> sw6pwa_host

! [NOTE] Checking database credentials

 

Efter installationen er gennemført kan det nyligt installerede website på den indtastede URL/admin. Default login er admin / shopware.

Om forfatter

Relaterede artikler

Nyhedsbrev... Privat, sikkert og spam-fri.