CentOS下使用composer安装magento2.4

magneto2.4安装要求

https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html

php版本 7.3.x-7.4.0
PHP 7.3.21 (cli) (built: Aug 11 2020 15:36:15) ( NTS )

php扩展
fileinfo
xsl
redis
 

删除禁用函数
putenv
exec
syslog
openlog
pcntl_signal
proc_open

mysql版本MariaDB10.4
mysql  Ver 15.1 Distrib 10.4.12-MariaDB, for Linux (x86_64) using readline 5.1

邮件服务器可以不安装,一会禁用

Elasticsearch 要装

安装文档

https://devdocs.magento.com/guides/v2.4/install-gde/composer.html

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

文件权限

cd /www/wwwroot/www.xxx.com
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R :www-data . # Ubuntu
chmod u+x bin/magento

安装Magento
您必须使用命令行来安装Magento。

这个例子假设Magento的安装目录被命名magento2ee时,db-host是在同一台机器(上localhost),并且db-name,db-user和db-password都是magento:

bin/magento setup:install \
--base-url=http://www.xxx.com/ \
--db-host=localhost \
--db-name=magento \
--db-user=magento \
--db-password=magento \
--admin-firstname=admin \
--admin-lastname=admin \
[email protected] \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1

下载
https://magento.com/tech-resources/download


登陆遇到收邮件问题
https://magento.stackexchange.com/questions/318485/you-need-to-configure-two-factor-authorization-in-order-to-proceed

禁用验证命令

bin/magento module:disable Magento_TwoFactorAuth

 

你可能感兴趣的:(安装Magnto2)