Englishen
Your cart: 0
Cart Subtotal: €0.00

Namestitev Magento 2 preko terminala

Navodila za namestitev Magento 2 – korak po koraku od prenosa datotek do prvega zagona sistema.

Namestitev Magento 2 preko terminala
Challenging
Significant

Register to track your progress and customize your experience

Create Account

Namestitev Magento 2 preko terminala – korak po korak

Če želite svojo Magento 2 spletno trgovino pripraviti od začetka, je najbolje uporabiti terminal. To omogoča hitro, natančno in stabilno namestitev. Spodaj so podrobni koraki, primerni tudi za začetnike.

1. Preverite zahteve strežnika

  • PHP: Magento 2 podpira PHP 8.x (npr. 8.1 ali 8.2). Preverite z ukazom: php -v ali preko vaše nadzorne plošče gostovanja (cPanel)
  • Baza: MySQL ali MariaDB (priporočeno vsaj MySQL 8). Poskrbite, da imate uporabnika z dovoljenji za ustvarjanje tabel.
  • Prostor na disku: vsaj 2–3 GB za Magento + dodatki.
  • Pravice datotek: terminal mora imeti dovoljenje za ustvarjanje datotek v mapi, kjer bo Magento nameščen.

Uradne zahteve za namestiev Magento 2 preverite na Adobe strani.

2. Prenos Magento 2 datotek

Magento 2 prenesemo preko Composerja. V terminalu se prestavite v mapo (cd ime_mape) in tam poženite ukaz, da se prenesejo Magento 2 datoteke. Primer:

cd public_html 
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .

Composer prenese vse datoteke in knjižnice, potrebne za Magento 2.

Za prenos lahko, da boste potrebovali Magento API ključ, ki ga lahko pridobite z registracijo na Magento Marketplace. Če še nimate računa, se najprej registrirajte tukaj. Po prijavi v svoj račun poiščite sekcijo Access Keys (Dostopni ključi), kjer lahko ustvarite nov ključ za Composer. Ta ključ je sestavljen iz dveh delov: Public Key in Private Key. Ko Composer vpraša za uporabniško ime in geslo, kot uporabniško ime vnesite Public Key, kot geslo pa Private Key.

access key magento

3. Namestitev in osnovna konfiguracija

Po uspešni namestitvi lahko Magento 2 konfigurirate bodisi preko terminala, bodisi preko grafičnega vmesnika (Magento Web Setup Wizard), kjer lahko enostavno nastavite osnovne parametre trgovine in administratorski račun.

Za namestitev in nastavitev osnovnih parametrov uporabite ukaz:

php bin/magento setup:install \
--base-url=https://vasadomena.si \
--db-host=localhost \
--db-name=ime_baze \
--db-user=uporabnik_baze \
--db-password=geslo_baze \
--admin-firstname=Ime \
--admin-lastname=Priimek \
--admin-email=vas.email@domena.si \
--admin-user=admin \
--admin-password=MojeSifriranoGeslo123 \
--language=sl_SI \
--currency=EUR \
--use-rewrites=1 \
--disable-modules=Magento_TwoFactorAuth,Magento_AdminAdobeImsTwoFactorAuth

Ta ukaz ustvari bazo, nastavi URL, administratorski račun, jezik in valuto ter izklopi module, ki jih ne boste uporabljali.

4. Izklop Elasticsearch (opcijsko)

Privzeto Magento uporablja Elasticsearch za iskanje izdelkov. Če ga ne uporabljate predvsem, ko imate deljeno gostovanje, preklopite na MySQL:

composer config repositories.swissup composer https://docs.swissuplabs.com/packages/
composer require swissup/module-search-mysql-legacy --prefer-source --ignore-platform-reqs
bin/magento module:enable Swissup_SearchMysqlLegacy Swissup_Core
php bin/magento config:set catalog/search/engine 'lmysql'

5. Izklop nepotrebnih modulov

Če ne uporabljate dvofaktorske prijave ali Elasticsearcha, jih izklopite:

php bin/magento module:disable Magento_TwoFactorAuth Magento_AdminAdobeImsTwoFactorAuth

6. Končni koraki za zagon trgovine

Po namestitvi izvedite še naslednje ukaze:

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f

Ti ukazi počistijo predpomnilnike, posodobijo sistem in pripravijo statično vsebino.

7. Prijava v admin panel

Odprite brskalnik in pojdite v administracijo. Uporabite administratorja in geslo, ki ste ju nastavili pri namestitvi.

Url do adminsitracije dobite po uspešni namestitvi preko uporabniškega vmesnika ali preko terminala,

[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin_krg7qvd

Po tem je vaša Magento 2 trgovina pripravljena za konfiguracijo in dodajanje izdelkov.

Stop browsing. Start selling. Contact me now at anze@degriz.net.

Access Premium Content for Free

Subscribe to our newsletter and get free access to premium content. Discover valuable insights and exclusive resources available only to our subscribers.

Privacy Policy: Newsletter Subscription

By entering your email address, you are subscribing to the newsletter, through which Degriz will inform you about new online and in-store offerings, marketing activities, and other promotions.

By subscribing to the newsletter, you are also enrolled in the benefits database that Degriz offers to its users.

For the newsletter subscription, Degriz d.o.o. collects the following information: email address, IP address, and if you subscribe as a registered member, your name, surname, address, and phone number.

After submitting the form with your email address, you will receive a confirmation message at the specified address – by confirming this, you will be subscribed to the Degriz newsletter until you unsubscribe (so-called opt-in approval). You can request, in writing or by clicking the Unsubscribe button in the newsletter, that the data controller permanently or temporarily stops using your personal data for direct marketing purposes. Your request will be fulfilled within 15 days of receiving it, as prescribed by law. You can also request the transfer or access to your data.

Degriz d.o.o. is committed to protecting your data in accordance with the legislation governing personal data protection.

The sender of the newsletter and controller of your personal data is: Degriz, d.o.o., Gorica pri Šmartnem 45a, 3000 Celje, SI 67287743

Check out the full Privacy Policy

Newsletter

My name is Anže, and I am a Magento certified expert in solutions and a creator of multiple award-winning online stores.

I am the architect behind all Degriz projects. You will surely come across me if we collaborate. Even though the phone keeps ringing, you can always tap me on the shoulder if you need advice regarding online stores and their functioning.

I specialize in building custom online stores and I am a master of unique techniques to enhance conversion on your website.

© 2010 - 2026 Degriz. All rights reserved. Built with love on Magento.
Partial use of the content is permitted with mandatory attribution. The content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0) or under our own license.