Toggle navigation

Magento Image Guide

Version 2.1.5
Websoft9 Magento is a pre-configured, ready to run image for running Magento on Alibaba Cloud.
Magento is the World’s #1 Commerce Platform,it is the most popular commerce platform in the world, with more than 250,000 merchants around the globe selling more and driving innovation. Just check out our customer stories to find out how the Magento Advantage really works.

Software Version: Magento 2.1.5
Software directory: /data/wwwroot/default/magento2

Basic software environment: LAMP
PHP Configuration File: /usr/local/php/etc/php.ini
Virtual host Configuration File directory: /usr/local/apache/conf/vhost
Virtual host Configuration Command: /root/oneinstack/vhost.sh

Database install directory: /usr/local/mysql
Database data directory: /data/mysql
Database Configuration File: /etc/my.cnf

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address/
  • If verify successfully,you can enter the boot page of Websoft9 below
  • If no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

This Image use MySQL for database

#default user/password:root/123456

MySQL User Guide: Click here

Step1. Create a database

1.login in MySQL:

Method 1:Use following URL to open phpMyAdmin page: http://< Public net IP >/phpMyAdmin

Method 2:Use SSH command to login in.

mysql -uroot –p                                #enter mysql console

 #default user/password:root/123456            More MySQL User Guide: Click here

 

2.create a database:

 

MySQL [(none)]> create database mydbname;

MySQL [(none)]> show databases;

 

3.Create a Database User and grants permissions to the User:

MySQL [(none)]> grant all privileges on mydbname.* to username@'localhost' identified by 'userpassword';

MySQL [(none)]> flush privileges;

MySQL [(none)]> exit;

 

before2

Step2. Add a virtual host

Use SSH Command to Add a virtual host:

[root@iZbp1i4rjdsy216yq7lgucZ ~]# cd /root/oneinstack

[root@iZbp1i4rjdsy216yq7lgucZ oneinstack]# ./vhost.sh

 

Step3. Install Magento

Open your domain name via browser:
1. Click “Agree and Setup Magento”;

2. Click “Next”;

3. Click “Next”;

4. Fill in your database configuration,Click “Next”;

5. Customize your store, Click “Next”;

6. Click “Next”;

7. Set Admin Account, Click “Next”;

8. Click “Install Now”;

9. OK, it has been installed successfully,The page displays the installed site information. Click “Magento Admin Address”.

10. Fill in Admin User and Password, Click “Sign in”; Icon is not displayed on the page.

11. Use SSH Command to install static content;
[root@iZbp1i4rjdsy216yq7lgucZ ~]# cd /data/wwwroot/default/magento2/bin

[root@iZbp1i4rjdsy216yq7lgucZ bin]# php magento setup:static-content:deploy

11. Refresh web pages with F5; The page display normal.

Use http://<domain name>/  to go to your index page.

Installing an extension is a three-step process that should take place during off-peak hours. Before the extension is installed, your store is put into maintenance mode, checked for readiness, and backed up. After the extension is installed, it must be configured for your store according to the developer’s instructions.

How to intall component?http://docs.magento.com/m2/ce/user_guide/system/component-manager.html

Your Magento installation can be upgraded from the Admin of your store, using the Web Setup Wizard. However, developers who work from the command line usually prefer to upgrade Magento using Composer.

1. Log in to the Admin of your Store as the primary Admin user.

To ensure the fastest upgrade, verify that Cron is configured to run every minute.

2. On the Admin sidebar, tap System. Then under Tools, choose Web Setup Wizard.

Web Setup Wizard
3. Tap System Upgrade.

System Upgrade
4. If available, your Public Access Key appears in the form. Follow the instructions to paste the matchingPrivate Access Key from the Markeplace tab of your Magento account.
5. Tap Submit, and do the following:
a. During Step 1 of the system upgrade, your current installation is analyzed. If your installation includes extensions and Other Components, select the “Yes” option.

If a more recent version is available, you will continue to the next step.


Step 1: Select Version
b. During the Readiness Check, the environment is verified for the required PHP version, settings, and extensions, and file permissions.

If your system passes the Readiness check, click Next to continue.

c. Continue to follow the prompts to create a backup of your system, and to upgrade your Magento installation.

Magento gives you the ability to back up different parts of the system—such as the file system, database, and media files—and to rollback automatically. A record for each backup appears in the grid on the Backups page. Deleting a record from the list deletes the archived file as well. Database backup files are compressed using the .GZ format. For the system backups and database and media backups, the .TGZ format is used. As a best practice, you should restrict access to backup tools, and back up before installing extensions and updates.

1.On the Admin sidebar, tap System. Then under Tools, choose Backups.
2.In the upper-right corner, tap the button for the type of backup you want to create:
System Backup:Creates a complete backup of the database and the file system. During the process, you can choose to include the media folder in the backup.
Database and Media Backup:Creates a backup of the database and the media folder.
Database Backup:Creates a backup of the database.

3.To put the store into maintenance mode during the backup, mark the checkbox. When the backup is complete, maintenance mode is turned off automatically.
4.For a system backup, mark the Include Media folder to System Backup checkbox if you want to include the media folder. Then when prompted, confirm the action.

To schedule backups

1. On the Admin sidebar, tap Stores. Then under Settings, choose Configuration.
2. In the panel on the left under Advanced, choose System.
3. Expand  the Scheduled Backup Settings section, and do the following:
4. When complete, tap Save Config.

Websoft9 Magento Image have installed the phpMyadmin

phpMyAdmin install directory: /data/wwwroot/default/phpMyAdmin

Linux

Following is the step for access phpMyadmin

  1. Open Chrome or Firefox on your local PC
  2. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page
  3. select you language,Username:root,Password:123456
  4. Click the button “Go”

Windows

Following is the step for access phpMyadmin

  1. User Remote Desktop Connection of Window to connect to you ECS
  2. Install a Chrome or Firefox browser on you ECS
  3. Open Chrome or Firefox on your ECS
  4. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page
  5. select you language,Username:root,Password:123456
  6. Click the button “Go”

In order to purge out-of-date items from the cache, you can clean or flush cache types:

  • Cleaning a cache type deletes all items from enabled Magento cache types only. In other words, this option does not affect other processes or applications because it only cleans the cache used by Magento. Disabled cache types are not cleaned.
  • Flushing a cache type purges the cache storage, which might affect other processes applications that are using the same storage.

Flush cache types if you’ve already tried cleaning the cache and you still have unresolved issues.

You can flush the Cache using The Web Interface

Flushing all cache types:

  1. Open the Administration panel and click on “System-> Tools-> Cache Management”.
  2. Select all cache types and “Refresh” action in the drop down box located on the top left margin.
  3. Click both buttons “Flush Magento Cache” and “Flush Cache Storage”.

Go to “System -> Tools -> Cache Management”, mark all cache types and select “Disable” in the action box. Click the “Submit” button.

When install new extension from back-end it will not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow:
file 644, folder 755 ,Permissions Users and groups www
If there is a file permissions problem, execute the following three commands:

chown -R www.www /data/wwwroot/default/magento
find /data/wwwroot/default/magento -type d -exec chmod 755 {} \;
find /data/wwwroot/default/magento -type f -exec chmod 644 {} \;

Modify the  /usr/local/php/etc/php.ini file to increase the allowed size for uploads:

; Maximum size of POST data that PHP will accept.
post_max_size = 16M
; Maximum allowed size for uploaded files.
upload_max_filesize = 16M

then,restart the apache

# service httpd restart

 

The PHP configuration file allows you to configure the modules enabled, the email settings or the size of the upload files. It is located at /usr/local/php/etc/php.ini.

There are some PHP settings that need to be sufficient for Magento to install.

The values for PHP.ini below are suggested values only.

  • memory_limit – Minimum: 64M Recommended: 128M or better
  • upload_max_filesize – Minimum: 20M
  • post_max_size – Minimum: 20M
  • max_execution_time: At Least 120 Recommended: 300

After modifying the PHP configuration file, restart both Apache and PHP-FPM for the changes to take effect:

# service httpd restart

 

If you receive the message “Maximum execution time of 30 seconds exceeded”.You may also like to extend the max_execution_time for PHP and you can modify it by two methods below

Method one: edit your  /usr/local/php/etc/php.ini


; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 90
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.

Method two: edit your .htaccess:


<IfModule mod_php5.c>
php_value max_execution_time 90
</IfModule>

1.Go to your Magento Marketplace account page.
2.Click the Marketplace tab. Then under My Products, click My Access Keys.
3.On the Magento 2 tab, click Create a New Access Key.
4.Assign a name for the key, and tap Generate New.
5.At the top of the My Access Keys page, click My Account to return to your Magento account.

Storing media files in a CDN is another alternative supported in Magento. There is no full integration with a specific CDN, and you are responsible for choosing and configuring a CDN on your own.

After configuring the CDN, you must complete the configuration from the Admin. The changes can be made at either the global or website level. When a CDN is used for media storage, all paths to media on store pages are changed to the CDN paths that are specified in the configuration.

To configure a content delivery network:

1. On the Admin sidebar, tap Stores. Then under Settings, choose Configuration.
2. In the panel on the left under General, choose Web.
3. In the upper-left corner, set Store View as needed.
4. Expand  the Base URLs section. Then, do the following:
a. Update the Base URL for Static View Files with the URL of the location on the CDN where static view files are stored.
b. Update the Base URL for User Media Files with the URL of the JavaScript files on the CDN.

Both these fields can be left blank, or can start with the placeholder: {{unsecure_base_url}}

5. Expand the Base URLs (Secure) section.
a. Update the Secure Base URL for Static View Files with the URL of the location on the CDN where static view files are stored.
b. Update the Secure Base URL for User Media Files with the URL of the JavaScript files on the CDN.

Both these fields can be left blank, or can start with the placeholder: {{unsecure_base_url}}

6. When complete,tap Save Config.