Cara Install PrestaShop di Ubuntu
PrestaShop adalah perangkat lunak CMS (Content Management System) untuk membangun website e-commerce dengan menggunakan bahasa pemrograman PHP. Tutorial install PrestaShop ini menggunakan distro Linux Ubuntu 16.04 LTS, Apache2, MariaDB 10, dan PHP 7.0.
1. Install Apache2
Install web server/httpd server Apache2
1 | sudo apt install apache2 -y |
Setelah instalasi Apache2, nonaktifkan directory listing
1 | sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf |
Kemudian aktifkan service Apache2
1 2 3 4 | sudo systemctl stop apache2 sudo systemctl start apache2 sudo systemctl enable apache2 sudo systemctl status apache2 |
2. Install MariaDB
Selanjutnya install database MariaDB
1 | sudo apt install mariadb-server mariadb-client -y |
Lalu aktifkan service MariaDB
1 2 3 4 | sudo systemctl stop mysql sudo systemctl start mysql sudo systemctl enable mysql sudo systemctl status mysql |
Amankan installasi MariaDB
1 2 3 4 5 6 7 8 9 10 | sudo mysql_secure_installation Enter current password for root (enter for none): Just press the Enter Set root password? [Y/n]: Y New password: Enter password Re-enter new password: Repeat password Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y |
Restart MariaDB
1 | sudo systemctl restart mysql |
3. Install PHP
Install PHP beserta module yang dibutuhkan
1 | sudo apt install php libapache2-mod-php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-mcrypt php-ldap php-zip php-curl -y |
Setelah install PHP, lakukan konfigurasi
1 | sudo nano /etc/php/7.0/apache2/php.ini |
Cari opsi di bawah ini dan sesuaikan nilainya
1 2 3 4 | file_uploads = On allow_url_fopen = On memory_limit = 256M upload_max_filesize = 64M |
Restart Apache
1 | sudo systemctl restart apache2 |
4. Membuat Database
Membuat database dan usernya untuk PrestaShop
1 2 3 4 5 6 | sudo mysql -u root -p CREATE DATABASE prestashop; CREATE USER 'userdb'@'localhost' IDENTIFIED BY 'passdb'; GRANT ALL PRIVILEGES ON prestashop.* TO 'userdb'@'localhost'; FLUSH PRIVILEGES; |
5. Download PrestaShop
Download dan extract PrestaShop
1 2 3 4 | cd /tmp && curl -O https://download.prestashop.com/download/releases/prestashop_1.7.4.1.zip unzip prestashop_1.7.4.1.zip sudo mkdir -p /var/www/html/prestashop sudo unzip prestashop.zip -d /var/www/html/prestashop/ |
Ubah user dan hak akses folder
1 2 | sudo chown -R www-data:www-data /var/www/html/prestashop/ sudo chmod -R 755 /var/www/html/prestashop/ |
6. Konfigurasi Apache2
Buat virtualhost untuk PrestaShop
1 | sudo nano /etc/apache2/sites-available/prestashop.conf |
Silakan ganti prestashop.local dengan nama domain anda. Isi dari file prestashop.conf:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <VirtualHost *:80> ServerAdmin admin@example.com DocumentRoot /var/www/html/prestashop/ ServerName prestashop.local ServerAlias www.prestashop.local <Directory /var/www/html/prestashop/> Options +FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/prestashop_error.log CustomLog ${APACHE_LOG_DIR}/prestashop_access.log combined </VirtualHost> |
Aktifkan virtualhost
1 | sudo a2ensite prestashop.conf |
Aktifkan module Rewrite
1 | sudo a2enmod rewrite |
Restart Apache2
1 | sudo systemctl restart apache2 |
7. Installer PrestaShop
Akses ServerName/domain dari PrestaShop, http://prestashop.local
Klik Next
Centang I agree to the above terms and conditions., Next.
Memeriksa kebutuhan system. Next.
Masukkan informasi toko, dan akun admin. Next.
Masukkan database yang sudah dibuat. Next.
Proses instalasi sedang berjalan.
Instalasi selesai.
Hapus folder install
1 | sudo rm -rf /var/www/html/prestashop/install/ |
Frontend PrestaShop http://prestashop.local
Backend PrestaShop http://prestashop.local/admin
Selamat mencoba 🙂
thanks bro informasinya sangat bermanfaat
Masih gagal login ke admin dashboard, padahal email dan password sudah benar, solusi bagaimana ya pak,
Terima kasih sebelumnya🙏
saya gak ada masalah, coba ulang lagi dari awal
hallo kak disini saya gagal waktu mau masuk ke halaman installasi prestashopnya mungkin ada solusi?
install di localhost? apa pesan errornya?