magento2 composer安装

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_32279193/article/details/88072695
  1. composer 下载magento
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition <install-directory-name>

指定版本:

composer create-project --repository=https://repo.magento.com/ magento/project-community-edition=2.1.2 <install-directory-name>
  1. 指定文件权限
cd /var/www/html/<magento install directory>
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
  1. 命令行安装magento
php bin/magento setup:install \
--base-url=http://demo2..com \
--db-host=127.0.0.1 \
--db-name=urvapin6 \
--db-user=ave40 \
--db-password=1lovejhin440 \
--backend-frontname=admin \
--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

4.修改服务器目录、配置域名

/etc/nginx/sites-available/
service nginx restart

5.php版本切换

update-alternatives --set php /usr/bin/php7.2
  1. php安装扩展
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql php7.0-curl php7.0-gd php7.0-xsl php7.0-json php7.0-mbstring php-gettext php7.0-mcrypt php7.0-xmlrpc libapache2-mod-php7.0 php7.0-intl php7.0-zip php7.0-cli php7.0-soap php7.0-common php7.0-mcrypt -y

猜你喜欢

转载自blog.csdn.net/qq_32279193/article/details/88072695