How to Install Magento on CentOS 8


Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing Magento on CentOS 8

Magento is a popular open-source e-commerce platform that allows businesses to set up online stores. It provides a flexible and customizable solution for online merchants to manage their products, orders, payments, and other aspects of their online business.

Here are the steps to install Magento on CentOS 8:

  1. Update your system:
    sudo dnf update
  2. Install Apache web server, MariaDB database server, and PHP:
    sudo dnf install httpd mariadb-server php php-cli php-common php-mbstring php-intl php-soap php-gd php-xml php-json php-mysqlnd
  3. Start and enable Apache and MariaDB services:
    sudo systemctl start httpd
    sudo systemctl enable httpd
    sudo systemctl start mariadb
    sudo systemctl enable mariadb
  4. Secure your MariaDB installation:
    sudo mysql_secure_installation
  5. Create a new database and user for Magento:
    sudo mysql -u root -p
    CREATE DATABASE magento;
    CREATE USER 'magentouser'@'localhost' IDENTIFIED BY 'password';
    GRANT ALL PRIVILEGES ON magento.* TO 'magentouser'@'localhost';
  6. Download Magento from the official website or using composer:
    cd /var/www/html
    sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
    sudo composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento
  7. Set proper file permissions and ownership:
    sudo chown -R apache:apache /var/www/html/magento
    sudo chmod -R 755 /var/www/html/magento
  8. Configure Apache virtual host:
    sudo nano /etc/httpd/conf.d/magento.conf
    Add the following content to the file:
    Listen 8080
      ServerName your-domain.com
      DocumentRoot /var/www/html/magento
        AllowOverride All
  9. Restart Apache service:
    sudo systemctl restart httpd
  10. Open your web browser and visit your Magento site at http://your-domain.com:8080 to start the installation process.

Congratulations! You have successfully installed Magento on CentOS 8. You can now proceed with the Magento installation wizard to configure your online store.

Refer A Friend
Get $25

installing Magento on CentOS 8
Magento installation guide on CentOS 8
Magento setup on CentOS 8
how to install Magento on CentOS 8
installing Magento on CentOS 8 step by step
Magento installation tutorial on CentOS 8
Magento on CentOS 8 installation instructions
installing Magento e-commerce platform on CentOS 8
Magento installation requirements on CentOS 8
installing Magento on CentOS 8 server.

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.