Magento is an open source e-commerce site framework with a rich modular architecture and extended features that provide solutions for medium and large sites. Magento is developed in PHP, supports versions from PHP 5.6 to PHP 7.1, and uses MySQL to store data. This tutorial describes how to set up Magento e-commerce site on a CentOS 7 ECS instance.
Advantages of XRCLOUD ECS
The bilateral monitoring for historical data and real-time data can escort performance.
Performance and specification with elastic scalability can meet fluctuating business needs.
The data can be recovered to a specific time through a backup image.
You can create new hosts in batches based on the current host template.
Cloud server business can implement live migration in the same available zone (AZ) without business interruption.
With powerful computing and storage resources pools, you can easily obtain the corresponding cloud computing services, and quickly deploy a batch of ECS.
The operation process of setting up Magento e-commerce website (example) on XRCLOUD ECS is as follows:
Step 1: Install and configure Apache
Step 2: Install and configure MySQL
Step 3: Install and configure PHP
Step 4: Create the Magento database
Step 5: Install and configure Composer
Composer is a dependency management tool for PHP. Composer allows you to claim the code libraries that your project depends on and helps you install the dependent code libraries in your project.
Step 6: Install and configure Magento
You can install Magento in different ways, and you can choose whether to install sample data or not.
If you install Magento only for testing, you have the option of installing sample data.
If you install Magento for a production environment, it is recommended that you install a brand new Magento and configure it from scratch.
Step 7: Configure the Magento client
- Open your browser.
- In the address box of the browser, enter http://< PUBLIC IP address of the ECS instance >.
Step 8: Add a CRon job
Add the cron job by doing the following:
Run crontab -u apache -e to set cron to run scheduling.
Press I to enter edit mode.
Enter the following configuration information.
*/10 * * * * php -c /etc /var/www/html/bin/magento cron:run
*/10 * * * * php -c /etc /var/www/html/update/cron.php
*/10 * * * * php -c /etc /var/www/html/bin/magento setup:cron:run
After pressing Esc, type :wq and press Enter to save and exit.