独立站PrestaShop安装

2024-08-21 21:20
文章标签 安装 独立 prestashop

本文主要是介绍独立站PrestaShop安装,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

独立站PrestaShop安装

  • 独立站PrestaShop安装
    • 系统需求
    • 下载PrestaShop
      • 浏览器下载
      • 命令行下载
    • 解压PrestaShop
    • 创建数据库
    • 移动PrestaShop源码到web目录
    • composer安装依赖包
    • nginx配置
    • 访问域名进入安装页面
      • 选择语言
      • 许可协议
      • 系统兼容性
      • 店铺信息
      • Content of your store
      • 系统配置数据库
      • 店铺安装
    • 命令行脚本安装
      • 进入安装目录
      • 安装脚本参数
      • 删除parameters.yml和parameters.php
      • 执行安装脚本

独立站PrestaShop安装

系统需求

System: Unix, Linux, or Windows.
MySQL: 5.7 or later.
PHP: 8.1 or later.
In your php.ini file:
Useful settings

allow_url_fopen set to “On” ✅,
register_globals set to “Off” ❌,
upload_max_filesize set to “16MB” or more.
Must have PHP extensions:

CURL
DOM
Fileinfo
GD
Intl
Mbstring
Zip
JSON
Iconv

Useful server tools:
Cron/Crontab, Memcached.

下载PrestaShop

浏览器下载

下载页面

https://github.com/PrestaShop/PrestaShop/releases

在这里插入图片描述

命令行下载

wget https://github.com/PrestaShop/PrestaShop/archive/refs/tags/8.1.7.tar.gz

解压PrestaShop

tar -zxvf 8.1.7.tar.gz

创建数据库

在这里插入图片描述

移动PrestaShop源码到web目录

mv /usr/local/src/8.1.7/* /www/wwwroot/www.prestashop817.com/

composer安装依赖包

composer install

在这里插入图片描述
注: 安装过程中symfony老是会安装失败,请多次尝试

nginx配置

server
{listen 80;server_name www.prestashop817.com;index index.php index.html index.htm default.php default.htm default.html;root /www/wwwroot/www.prestashop817.com;#CERT-APPLY-CHECK--START# 用于SSL证书申请时的文件验证相关配置 -- 请勿删除include /www/server/panel/vhost/nginx/well-known/www.prestashop817.com.conf;#CERT-APPLY-CHECK--END#SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则#error_page 404/404.html;#SSL-END#ERROR-PAGE-START  错误页配置,可以注释、删除或修改error_page 404 /404.html;#error_page 502 /502.html;#ERROR-PAGE-END#PHP-INFO-START  PHP引用配置,可以注释或修改## include enable-php-81.conf;#PHP-INFO-END#REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效location / {try_files $uri $uri/ /index.php$is_args$args;}location /admin-dev/ {try_files $uri $uri/ /admin-dev/index.php$is_args$args;}#REWRITE-END#禁止访问的文件或目录location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md){return 404;}#一键申请SSL证书验证目录相关设置location ~ \.well-known{allow all;}#禁止在证书验证目录放入敏感文件if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) {return 403;}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${expires      30d;error_log /dev/null;access_log /dev/null;}location ~ .*\.(js|css)?${expires      12h;error_log /dev/null;access_log /dev/null;}access_log  /www/wwwlogs/www.prestashop817.com.log;error_log  /www/wwwlogs/www.prestashop817.com.error.log;####################prestashop官方配置##############################client_max_body_size 16M;error_page 404 /index.php?controller=404;# Images.rewrite ^/(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$1$2.jpg last;rewrite ^/(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3.jpg last;rewrite ^/(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg last;rewrite ^/(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg last;rewrite ^/(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg last;rewrite ^/(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg last;rewrite ^/(\d)(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg last;rewrite ^/(\d)(\d)(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg last;rewrite ^/c/([\w.-]+)/.+\.jpg$ /img/c/$1.jpg last;# AlphaImageLoader for IE and FancyBox.rewrite ^images_ie/?([^/]+)\.(gif|jpe?g|png)$ js/jquery/plugins/fancybox/images/$1.$2 last;# Web service API.rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;# Installation sandbox.rewrite ^(/install(?:-dev)?/sandbox)/.* /$1/test.php last;# .htaccess, .DS_Store, .htpasswd, etc.location ~ /\. {deny all;}# Source code directories.location ~ ^/(app|bin|cache|classes|config|controllers|docs|localization|override|src|tests|tools|translations|var|vendor)/ {deny all;}# vendor in modules directory.location ~ ^/modules/.*/vendor/ {deny all;}# Prevent exposing other sensitive files.location ~ \.(log|tpl|twig|sass|yml)$ {deny all;}# Prevent injection of PHP files.location /img {location ~ \.php$ { deny all; }}location /upload {location ~ \.php$ { deny all; }}location ~ [^/]\.php(/|$) {# Split $uri to $fastcgi_script_name and $fastcgi_path_info.fastcgi_split_path_info ^(.+?\.php)(/.*)$;# Ensure that the requested PHP script exists before passing it# to the PHP-FPM.try_files $fastcgi_script_name =404;# Environment variables for PHP.include fastcgi_params;fastcgi_param SCRIPT_FILENAME $request_filename;fastcgi_index index.php;fastcgi_keep_conn on;proxy_connect_timeout 100s;fastcgi_read_timeout 100s;fastcgi_send_timeout 100s;# Uncomment these in case of long loading or 502/504 errors.# fastcgi_buffer_size 256k;# fastcgi_buffers 256 16k;# fastcgi_busy_buffers_size 256k;# [EDIT] Connection to PHP-FPM unix domain socket.fastcgi_pass unix:/tmp/php-cgi-81.sock;}}

访问域名进入安装页面

选择语言

在这里插入图片描述
注: 首次安装程序会下载中文语言包,可自行连接VPN保证下载成功

许可协议

在这里插入图片描述

系统兼容性

在这里插入图片描述
我们web服务用的是nginx报错是Aapche,这是安装程序的BUG
我们修改项目目录的modules目录及里面的文件权限为0777

chmod 0777 modules -R

刷新信息
在这里插入图片描述
在这里插入图片描述

店铺信息

在这里插入图片描述

在这里插入图片描述

Content of your store

在这里插入图片描述

系统配置数据库

在这里插入图片描述
在这里插入图片描述

店铺安装

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

命令行脚本安装

如果页面安装失败报504错误且多次尝试无果,请采用安装脚本进行安装

进入安装目录

cd install-dev

在这里插入图片描述

安装脚本参数

To start the installation, you need to 5 arguments:

domain. The location where you want your store to appear.

db_server. The database server address.

db_name. The name of the database you want to use.

db_user. The username for the database you want to use.

db_password. The password for the database username used above.

删除parameters.yml和parameters.php

如果之前进行过页面安装操作需要删除app/config/parameters.yml和app/config/parameters.php

cd app/config
rm -f parameters.yml
rm -f parameters.php

执行安装脚本

chmod 0777 var/ -R
cd ..
chown www:www www.prestashop817.com/ -R
cd www.prestashop817.com/install-dev
php index_cli.php --domain=www.prestashop817.com --db_server=127.0.0.1 --db_name=prestashop_817 --db_user=root --db_password=123456789

这篇关于独立站PrestaShop安装的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1094320

相关文章

如何在Mac上安装并配置JDK环境变量详细步骤

《如何在Mac上安装并配置JDK环境变量详细步骤》:本文主要介绍如何在Mac上安装并配置JDK环境变量详细步骤,包括下载JDK、安装JDK、配置环境变量、验证JDK配置以及可选地设置PowerSh... 目录步骤 1:下载JDK步骤 2:安装JDK步骤 3:配置环境变量1. 编辑~/.zshrc(对于zsh

如何在pycharm安装torch包

《如何在pycharm安装torch包》:本文主要介绍如何在pycharm安装torch包方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录在pycharm安装torch包适http://www.chinasem.cn配于我电脑的指令为适用的torch包为总结在p

在PyCharm中安装PyTorch、torchvision和OpenCV详解

《在PyCharm中安装PyTorch、torchvision和OpenCV详解》:本文主要介绍在PyCharm中安装PyTorch、torchvision和OpenCV方式,具有很好的参考价值,... 目录PyCharm安装PyTorch、torchvision和OpenCV安装python安装PyTor

Python Transformer 库安装配置及使用方法

《PythonTransformer库安装配置及使用方法》HuggingFaceTransformers是自然语言处理(NLP)领域最流行的开源库之一,支持基于Transformer架构的预训练模... 目录python 中的 Transformer 库及使用方法一、库的概述二、安装与配置三、基础使用:Pi

如何解决mmcv无法安装或安装之后报错问题

《如何解决mmcv无法安装或安装之后报错问题》:本文主要介绍如何解决mmcv无法安装或安装之后报错问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录mmcv无法安装或安装之后报错问题1.当我们运行YOwww.chinasem.cnLO时遇到2.找到下图所示这里3.

Python 安装和配置flask, flask_cors的图文教程

《Python安装和配置flask,flask_cors的图文教程》:本文主要介绍Python安装和配置flask,flask_cors的图文教程,本文通过图文并茂的形式给大家介绍的非常详细,... 目录一.python安装:二,配置环境变量,三:检查Python安装和环境变量,四:安装flask和flas

Win11安装PostgreSQL数据库的两种方式详细步骤

《Win11安装PostgreSQL数据库的两种方式详细步骤》PostgreSQL是备受业界青睐的关系型数据库,尤其是在地理空间和移动领域,:本文主要介绍Win11安装PostgreSQL数据库的... 目录一、exe文件安装 (推荐)下载安装包1. 选择操作系统2. 跳转到EDB(PostgreSQL 的

Linux系统中卸载与安装JDK的详细教程

《Linux系统中卸载与安装JDK的详细教程》本文详细介绍了如何在Linux系统中通过Xshell和Xftp工具连接与传输文件,然后进行JDK的安装与卸载,安装步骤包括连接Linux、传输JDK安装包... 目录1、卸载1.1 linux删除自带的JDK1.2 Linux上卸载自己安装的JDK2、安装2.1

Linux卸载自带jdk并安装新jdk版本的图文教程

《Linux卸载自带jdk并安装新jdk版本的图文教程》在Linux系统中,有时需要卸载预装的OpenJDK并安装特定版本的JDK,例如JDK1.8,所以本文给大家详细介绍了Linux卸载自带jdk并... 目录Ⅰ、卸载自带jdkⅡ、安装新版jdkⅠ、卸载自带jdk1、输入命令查看旧jdkrpm -qa

MySQL Workbench 安装教程(保姆级)

《MySQLWorkbench安装教程(保姆级)》MySQLWorkbench是一款强大的数据库设计和管理工具,本文主要介绍了MySQLWorkbench安装教程,文中通过图文介绍的非常详细,对大... 目录前言:详细步骤:一、检查安装的数据库版本二、在官网下载对应的mysql Workbench版本,要是