|  | 이 가이드에서는 매번 동일한 작업을 수행하지 않도록 가상 서버에 OpenCart 애플리케이션을 설치하고 Debian 12의 웹 스택. 이 어셈블리는 PHP 및 MariaDB가 필요한 웹 애플리케이션을 신속하게 배포하도록 특별히 설계되었습니다. 공식 사이트에서 최신 버전을 다운로드하고 브라우저를 통해 설치하세요. 필요한 모든 서비스가 이미 설치 및 구성되어 있습니다. OpenCart가 사전 설치된 VPN 서버를 주문할 수도 있으며, 관리를 위한 로그인과 비밀번호만 지정하면 됩니다. |  | 
| 1. 최신 버전의 OpenCart를 다운로드하세요 |  | 
apt update && sudo apt upgrade
wget https://github.com/opencart/opencart/releases/download/4.0.2.2/opencart-4.0.2.2.zip
unzip opencart-4.0.2.2.zip -d /var/www/
mv /var/www/upload/ /var/www/domain.tld
mv /var/www/domain.tld/config-dist.php /var/www/domain.tld/config.php
mv /var/www/domain.tld/admin/config-dist.php /var/www/domain.tld/admin/config.php
2. 데이터베이스를 생성하고 설정에 쓰기
mariadb -u root
	
create database opencart;
grant all privileges on opencart.* to user@localhost identified by 'your-password';
flush privileges;
exit;
3. 웹 서비스 설정
도메인에 대한 권한을 할당하고 구성 파일을 만듭니다:
chown www-data:www-data /var/www/domain.tld/ -R
mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/domain.tld.conf
구성 파일:
/etc/nginx/conf.d/domain.tld.conf
server {
  listen 80;
  listen [::]:80;
  server_name _;
  root /var/www/domain.tld;
  index index.php index.html index.htm index.nginx-debian.html;
  location / {
    try_files $uri $uri/ /index.php;
  }
  location ~ \.php$ {
    fastcgi_pass unix:/run/php/php8.2-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    include snippets/fastcgi-php.conf;
  }
location /phpmyadmin {
        auth_basic "Admin Login";
        auth_basic_user_file /etc/nginx/pma_access;
    }
 # A long browser cache lifetime can speed up repeat visits to your page
  location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {
       access_log        off;
       log_not_found     off;
       expires           360d;
  }
  # disable access to hidden files
  location ~ /\.ht {
      access_log off;
      log_not_found off;
      deny all;
  }
}
ftp 사용자의 홈 디렉토리를 우리의 홈 디렉토리로 변경하십시오:
/etc/passwd
ftpuser:x:1000:1000:,,,:/var/www/domain.tld:/bin/bash
구성을 위해 phpMyAdmin의 경로를 변경해 보겠습니다:
ln -s /usr/share/phpmyadmin /var/www/domain.tld/
service nginx restart
domain.tld를 DNS 편집기에 이미 구성된 VPS 서버의 IP 주소로 변경합니다. 따라서 비유를 통해 여러 사이트를 추가할 수 있습니다. 이것으로 설치가 완료됩니다. 사이트 이전의 경우 기존 파일을 배치하고 데이터베이스를 가져올 수 있습니다.
이제 브라우저에서 http://server_ip/와 같은 링크를 열고 애플리케이션을 확인할 수 있습니다.
 
	
관리 메뉴에 들어가려면 양식의 링크를 따르십시오 http://server_ip/admin/
 
	
OpenCart 설치가 완료되었습니다.
        No Comments Yet
    
        
