{"id":474,"date":"2023-08-11T22:47:59","date_gmt":"2023-08-11T20:47:59","guid":{"rendered":"https:\/\/schoppe.it\/wiki\/?p=474"},"modified":"2024-09-03T08:50:58","modified_gmt":"2024-09-03T06:50:58","slug":"wie-man-prestashop-auf-einem-lamp-server-installiert","status":"publish","type":"post","link":"https:\/\/schoppe.it\/wiki\/wie-man-prestashop-auf-einem-lamp-server-installiert\/","title":{"rendered":"Wie man Prestashop auf einem LAMP Server installiert"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Serverpakete aktualisieren<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napt update\napt upgrade\nreboot\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"209\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/Screenshot-2023-08-14-120529.png\" alt=\"\" class=\"wp-image-496\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/Screenshot-2023-08-14-120529.png 1000w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/Screenshot-2023-08-14-120529-300x63.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/Screenshot-2023-08-14-120529-768x161.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Datenbank erstellen<\/h2>\n\n\n\n<p>Hetzner speichert das Root-Passwort f\u00fcr MariaDB in der Datei <strong>\/root\/.hcloud_password<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#Automatisch generiertes Passwort abfragen:\nnano .hcloud_password\n\n#Mit mysql einloggen und Datenbank erstellen:\nmysql -u root -p\n&#x5B;Passwort aus .hcloud_password einf\u00fcgen]\n\nCREATE DATABASE presta_db;\nCREATE USER &#039;presta_user&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;Passwort&#039;;\nGRANT ALL PRIVILEGES ON presta_db.* TO &#039;presta_user&#039;@&#039;localhost&#039;;\nFLUSH PRIVILEGES;\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Installationsdaten per FTP hochladen und vorbereiten<\/h2>\n\n\n\n<p>Auf der Webseite von Prestashop kann die aktuellste Version heruntergeladen werden.<\/p>\n\n\n\n<p><a href=\"https:\/\/prestashop.com\/prestashop-edition-basic\/\">https:\/\/prestashop.com\/prestashop-edition-basic\/<\/a> <\/p>\n\n\n\n<p>Die heruntergeladenen Datei entpacken und nur die <strong>prestashop.zip<\/strong> per <strong>FTP <\/strong>auf den Server ins Webseiten-Verzeichnis unter <strong>\/var\/www\/deien_webseite.de<\/strong> hochladen.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nls \/var\/www\/deine_webseite.de\n<\/pre><\/div>\n\n\n<p>Falls neben der prestashop.zip noch andere Dateien (wie bspw. eine index.php) vorhanden sind, m\u00fcssen diese entfernt werden.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrm index.php\n<\/pre><\/div>\n\n\n<p>Das Paket <strong>unzip <\/strong>installieren, damit wir die <strong>prestashop.zip<\/strong> entpacken k\u00f6nnen. Danach wird die <strong>prestashop.zip<\/strong> entfernt mit <strong>rm<\/strong>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napt install unzip\nunzip prestashop.zip\nrm prestashop.zip\n<\/pre><\/div>\n\n\n<p>Nun das Verzeichnis app\/Resources\/translations erstellen, damit wir auch daf\u00fcr schon die Verzeichnisrechte anpassen k\u00f6nnen.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmkdir \/var\/www\/deine_webseite.de\/app\/Resources\/translations\n<\/pre><\/div>\n\n\n<p>Verzeichnisrechte und -besitzer m\u00fcssen angepasst werden.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nchown -R www-data:www-data \/var\/www\/deine_webseite.de\/\nchmod -R 755 \/var\/www\/deine_webseite.de\/\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">PHP Extensions installieren<\/h2>\n\n\n\n<p>Prestashop ben\u00f6tigt und\/oder empfiehlt die Installation mehrere <strong>PHP-Extensions<\/strong>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napt install php-zip php-simplexml php-curl php-gd php-intl php-mbstring php-bcmath php-imagick\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">PHP Memcached installieren<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napt install memcached libmemcached-tools -y\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napt install php-memcached\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nservice apache2 restart\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"902\" height=\"647\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/10\/PHP-Extensions.png\" alt=\"\" class=\"wp-image-502\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/10\/PHP-Extensions.png 902w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/10\/PHP-Extensions-300x215.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/10\/PHP-Extensions-768x551.png 768w\" sizes=\"auto, (max-width: 902px) 100vw, 902px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">PHP-FPM installieren<\/h2>\n\n\n\n<p>Wir installieren zus\u00e4tzlich PHP-FPM<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napt install php-fpm\na2enconf php8.1-fpm\na2dismod php8.1\na2enmod mpm_event proxy_fcgi setenvif\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Empfohlene PHP Konfiguration<\/h2>\n\n\n\n<p>Die empfohlen Konfiguration kann \u00fcber die <strong>phppsinfo.php<\/strong> aufgerufen und \u00fcberpr\u00fcft werden. Die <strong>phppsinfo.php<\/strong> kann unter folgendem Link heruntergerladen werden.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/PrestaShop\/php-ps-info\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/PrestaShop\/php-ps-info\/<\/a><\/p>\n\n\n\n<p>Au\u00dferdem hat Prestashop eine Beitrag ver\u00f6ffentlicht, in dem mehrere Optimierungshinweise zu PHP enthalten sind.<\/p>\n\n\n\n<p><a href=\"https:\/\/devdocs.prestashop-project.org\/8\/scale\/optimizations\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/devdocs.prestashop-project.org\/8\/scale\/optimizations\/<\/a><\/p>\n\n\n\n<p>Im weiteren Verlauf wird nun die php.ini entsprechend den Empfehlungen angepasst.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#\u00c4nderungen in der www.conf\nnano \/etc\/php\/8.1\/fpm\/pool.d\/www.conf\n\npm.max_children = 15\n\n#\u00c4nderungen in der php.ini\nnano \/etc\/php\/8.1\/fpm\/php.ini\n\nmax_execution_time = 300\nmax_input_time = 300\nmax_input_vars = 5000\nmemory_limit = 512M\npost_max_size = 128M\nupload_max_filesize = 128M\n\nrealpath_cache_size = 4096K\nrealpath_cache_ttl = 600\n\nopcache.enable=1\nopcache.enable_cli=0\nopcache.memory_consumption=256\nopcache.interned_strings_buffer=32\nopcache.max_accelerated_files=16229\nopcache.max_wasted_percentage=10\nopcache.revalidate_freq=10\nopcache.fast_shutdown=1\nopcache.enable_file_override=0\nopcache.max_file_size=0\n<\/pre><\/div>\n\n\n<p>Alle Einstellungen werden erst nach Neustart wirksam. Daher einmal den apache2 Dienst neu starten.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystemctl restart php8.1-fpm\nsystemctl restart apache2\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"902\" height=\"441\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/PHP-Configuration.png\" alt=\"\" class=\"wp-image-495\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/PHP-Configuration.png 902w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/PHP-Configuration-300x147.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/PHP-Configuration-768x375.png 768w\" sizes=\"auto, (max-width: 902px) 100vw, 902px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Firewall installieren<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napt install ufw\nufw default deny incoming\nufw default allow outgoing\nufw allow from your_static_public_ip to any port ssh (ACHTUNG!)\nufw allow http\nufw allow https\nufw enable\nufw status\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Prestashop installieren<\/h2>\n\n\n\n<p>F\u00fcr die Installation die URL <strong>deine_webseite.de\/install<\/strong> im Browser aufrufen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"994\" height=\"593\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/Screenshot-2023-08-14-143158.png\" alt=\"\" class=\"wp-image-497\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/Screenshot-2023-08-14-143158.png 994w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/Screenshot-2023-08-14-143158-300x179.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/08\/Screenshot-2023-08-14-143158-768x458.png 768w\" sizes=\"auto, (max-width: 994px) 100vw, 994px\" \/><\/figure>\n\n\n\n<p>Nach der Installation und vor dem Aufrufen des Backends muss das Installationsverzeichnis \/install gel\u00f6scht werden.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrm -r \/var\/www\/deine_webseite.de\/install\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Serverpakete aktualisieren Datenbank erstellen Hetzner speichert das Root-Passwort f\u00fcr MariaDB in der Datei \/root\/.hcloud_password Installationsdaten per FTP hochladen und vorbereiten Auf der Webseite von Prestashop kann die aktuellste Version heruntergeladen werden. https:\/\/prestashop.com\/prestashop-edition-basic\/ Die heruntergeladenen Datei entpacken und nur die prestashop.zip per FTP auf den Server ins Webseiten-Verzeichnis unter \/var\/www\/deien_webseite.de hochladen. Falls neben der prestashop.zip noch&hellip; <a class=\"more-link\" href=\"https:\/\/schoppe.it\/wiki\/wie-man-prestashop-auf-einem-lamp-server-installiert\/\"><span class=\"screen-reader-text\">Wie man Prestashop auf einem LAMP Server installiert<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":497,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118,52,180],"tags":[182,181,198,183],"powershell":[],"wordpress":[],"exchange":[],"linux":[91,111,104,186,185,174,176,178,177,194,175,189,193,190,191,192,188,187,195,156,196,135],"class_list":["post-474","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-php","category-prestashop","tag-hetzner","tag-lamp","tag-onlineshop","tag-prestashop","linux-apt-install","linux-apt-update","linux-apt-upgrade","linux-chmod","linux-chown","linux-create-database","linux-create-user","linux-flush-privileges","linux-grant-all-privileges","linux-mpm_event","linux-mysql","linux-php-curl","linux-php-fpm","linux-php-gd","linux-php-intl","linux-php-mbstring","linux-php-simplexml","linux-php-zip","linux-proxy_fcgi","linux-rm","linux-setenvif","linux-ufw","entry"],"_links":{"self":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts\/474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/comments?post=474"}],"version-history":[{"count":14,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts\/474\/revisions"}],"predecessor-version":[{"id":560,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts\/474\/revisions\/560"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/media\/497"}],"wp:attachment":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/media?parent=474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/categories?post=474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/tags?post=474"},{"taxonomy":"powershell","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/powershell?post=474"},{"taxonomy":"wordpress","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/wordpress?post=474"},{"taxonomy":"exchange","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/exchange?post=474"},{"taxonomy":"linux","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/linux?post=474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}