一,下載magento2安裝包
選擇安裝的magento路徑:
cd /var/www/ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition mv project-community-edition magento2
下載包之后
二,配置Magento密鑰
在Magento網站marketplace.magento.com上注冊一個帳戶。這個賬戶需要使用Magento和Magento Composer商店。注冊后,轉到選項卡My Profile > My Access Keys > Magento 2,然后生成密鑰。
三,安裝Magento的第三方組件
cd /var/www/magento2/ composer install -v
輸入生產的私鑰和公鑰字符串
四,命令行一鍵安裝M2
我們將在命令行上安裝M2。在M2目錄/var/www/magento2/bin/
中,有一個名為magento
的二進制文件,用於安裝和管理magento
。
在/var/www/magento2
下:
運行命令:
php bin/magento setup:install --backend-frontname="adminlogin" \ --key="65b07bf53f4d7ee8f4b884c102e5ee62" \ --base-url="http://magento2demo.texiaoyao.cn" \ --base-url-secure="https://magento2demo.texiaoyao.cn" \ --db-host=localhost \ --db-name=magento2 \ --db-user=magento_user \ --db-password='mi@$wEw*d8' \ --admin-firstname=Zou \ --admin-lastname=Last \ --admin-email=zouhongzhao@126.com \ --admin-user=admin \ --admin-password=123A_Zhz \ --language=en_US \ --currency=USD \ --timezone=America/Chicago \ --use-rewrites=1